Guide for CyanogenMod 10/10.1/10.2/11
Hello again guys, I want to share to you smali Guide how to port with settings. custom Notification Drawer style.
credit to AOKP, Slimroms, Crdroid :)
ok lets go to Guide:
first of all need some requirement for this MOD-GUIDE
REQUIREMENT:
- BRAIN
- Patient
- experience
- Know how to decompile/recompiling Apk and JAR file
- notepad++
- Tool for decompiling, : apkmanager/apktool/Virtous/apkmultitools/ or else
Settings.apk
CM10/CM10.1/CM10.2/CM11
Hello again guys, I want to share to you smali Guide how to port with settings. custom Notification Drawer style.
credit to AOKP, Slimroms, Crdroid :)
ok lets go to Guide:
first of all need some requirement for this MOD-GUIDE
REQUIREMENT:
- BRAIN
- Patient
- experience
- Know how to decompile/recompiling Apk and JAR file
- notepad++
- Tool for decompiling, : apkmanager/apktool/Virtous/apkmultitools/ or else
Settings.apk
CM10/CM10.1/CM10.2/CM11
Decompile your settings.apk
- Download attached file and merge it to your decompiled Settings.apk
- Settings.apk\res\values\arrays.xml
add this lines to end of it before </resources>
- Settings.apk\res\values\ids.xml
add this lines to end of it before </resources>
- Settings.apk\res\values\strings.xml
add this lines to end of it before </resources>
- Settings.apk\res\xml\display_settings.xml
put this line
but you can put the line whereever you like,.system_settings.xml/system_ui_settings.xml/notification_drawer.xml
/etc..
- Recompile your Settings.apk
- Decompile the newly recompiled APK again
go to your secondly decompiled Settings.apk\res\values\public.xml
search for all this lines :
Pay attention to this 0x7f?????? !!!
- Settings.apk\smali\net\margaritov\preference\color picker\ColorPickerDialog.smali
search this -> const v2, 0x7f040095
1. change this -> 0x7f040095 , according to the value you got in your own public.xml
do it too to all lines below, in the smali
2. const v2, 0x7f0708ed
3. const v2, 0x7f0a0233
4. const v2, 0x7f0a0234
5. const v2, 0x7f0a0235
6. const v2, 0x7f0a0236
7. const v2, 0x7f0a0237
8. const v2, 0x7f0a0238
9. const v1, 0x7f0a0235
- Settings.apk\smali\com\android\settings\adi\ SeekBarPreference.smali
search this -> const v4, 0x7f040096
1. change this -> 0x7f040096, according to the value you got in your own public.xml
do it too to all lines below, in the smali
2. const v3, 0x7f0a023a
3. const v3, 0x7f0a023b
- Settings.apk\smali\com\android\settings\adi\ NotificationDrawerStyle.smali
search this -> const v0, 0x7f0708ec
1. change this -> 0x7f0708ec, according to the value you got in your own public.xml
do it too to all lines below, in the smali
2. const v0, 0x7f0708ec
3. const v0, 0x7f0708eb
4. const v0, 0x7f0708ea
5. const v0, 0x7f0708eb
6. const v4, 0x7f05005c
7. const v18, 0x7f0708f5
8. const v18, 0x7f0708a6
9. const v18, 0x7f0700ec
- Done and recompile it, push to you system/app, or system/priv-app
- Download attached file and merge it to your decompiled Settings.apk
- Settings.apk\res\values\arrays.xml
add this lines to end of it before </resources>
Code:
<string-array name="adi_notification_wallpaper_entries">
<item>@string/adi_notification_background_color_fill</item>
<item>@string/adi_notification_background_custom_image</item>
<item>@string/adi_notification_background_default_wallpaper</item>
</string-array>
<string-array name="adi_notification_wallpaper_values">
<item>0</item>
<item>1</item>
<item>2</item>
</string-array>
<string-array name="adi_notification_wallpaper_landscape_entries">
<item>@string/adi_notification_background_custom_image</item>
<item>@string/adi_notification_background_default_wallpaper</item>
</string-array>
<string-array name="adi_notification_wallpaper_landscape_values">
<item>0</item>
<item>1</item>
</string-array>
</resources>
add this lines to end of it before </resources>
Code:
<item type="id" name="adi_color_picker_view">false</item>
<item type="id" name="adi_old_color_panel">false</item>
<item type="id" name="adi_new_color_panel">false</item>
<item type="id" name="adi_hex">false</item>
<item type="id" name="adi_enter">false</item>
<item type="id" name="adi_ics_color">false</item>
<item type="id" name="adi_color_panel_view">false</item>
<item type="id" name="monitor_box_adi">false</item>
<item type="id" name="seek_bar_adi">false</item>
</resources>
add this lines to end of it before </resources>
Code:
<string name="adi_notification_wallpaper_title">Notification drawer background</string>
<string name="adi_notification_wallpaper_landscape_title">Different landscape background</string>
<string name="adi_notification_background_color_fill">Color fill</string>
<string name="adi_notification_background_custom_image">Custom image</string>
<string name="adi_notification_background_default_wallpaper">Default background</string>
<string name="adi_dialog_color_picker">Color Picker</string>
<string name="adi_press_color_to_apply">Press on Color to apply</string>
<string name="adi_arrow_right">→</string>
<string name="adi_arrow_down">↓</string>
<string name="adi_hex">Hex:</string>
<string name="adi_hex_hint">\#FF000000</string>
<string name="adi_set">Set</string>
<string name="adi_ics_color">Holo</string>
<string name="adi_choose_color_title">Choose color</string>
<string name="adi_notification_style_grouptitle">Style</string>
<string name="adi_notification_style_title">Notification drawer style</string>
<string name="adi_notification_style_summary">Change your notification drawer style</string>
<string name="adi_notif_wallpaper_alpha_title">Notification background transparency</string>
<string name="adi_notif_alpha_title">Notification Rows transparency</string>
</resources>
put this line
Code:
<PreferenceScreen android:title="@string/adi_notification_style_title" android:key="notification_style" android:summary="@string/adi_notification_style_summary" android:fragment="com.android.settings.adi.NotificationDrawerStyle" />
Code:
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen android:title="@string/display_settings"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings">
<PreferenceScreen android:title="@string/adi_notification_style_title" android:key="notification_style" android:summary="@string/adi_notification_style_summary" android:fragment="com.android.settings.adi.NotificationDrawerStyle" />
<com.android.settings.BrightnessPreference android:title="@string/brightness" android:key="brightness" android:dialogTitle="@string/brightness" />
<PreferenceScreen android:title="@string/backlight_title" android:key="backlight_widget" android:summary="@string/backlight_summary" android:fragment="com.android.settings.cyanogenmod.Backlight" />
<PreferenceScreen android:title="@string/display_rotation_title" android:key="display_rotation" android:fragment="com.android.settings.cyanogenmod.DisplayRotation" />
<CheckBoxPreference android:title="@string/accelerometer_title" android:key="accelerometer" />
<ListPreference android:persistent="false" android:entries="@array/screen_timeout_entries" android:title="@string/screen_timeout" android:key="screen_timeout" android:summary="@string/screen_timeout_summary" android:entryValues="@array/screen_timeout_values" />
<PreferenceScreen android:title="@string/screensaver_settings_title" android:key="screensaver" android:fragment="com.android.settings.DreamSettings" />
<PreferenceScreen android:title="@string/notification_pulse_title" android:key="notification_pulse" android:fragment="com.android.settings.notificationlight.NotificationLightSettings" />
<PreferenceScreen android:title="@string/battery_light_title" android:key="battery_light" android:fragment="com.android.settings.notificationlight.BatteryLightSettings" />
<PreferenceCategory android:title="@string/display_category_wakeup_options_title" android:key="category_wakeup_options" />
<CheckBoxPreference android:title="@string/pref_volume_wake_title" android:key="pref_volume_wake" android:summary="@string/pref_volume_wake_summary" android:defaultValue="false" />
</PreferenceScreen>
/etc..
- Recompile your Settings.apk
- Decompile the newly recompiled APK again
go to your secondly decompiled Settings.apk\res\values\public.xml
search for all this lines :
Code:
<public type="layout" name="adi_dialog_color_picker" id="0x7f??????" />
<public type="layout" name="adi_slider_preference" id="0x7f??????" />
<public type="xml" name="adi_notification_drawer_style" id="0x7f??????" />
<public type="string" name="adi_notification_wallpaper_title" id="0x7f??????" />
<public type="string" name="adi_notification_wallpaper_landscape_title" id="0x7f??????" />
<public type="string" name="adi_notification_background_color_fill" id="0x7f??????" />
<public type="string" name="adi_notification_background_custom_image" id="0x7f??????" />
<public type="string" name="adi_notification_background_default_wallpaper" id="0x7f??????" />
<public type="string" name="adi_dialog_color_picker" id="0x7f??????" />
<public type="string" name="adi_press_color_to_apply" id="0x7f??????" />
<public type="string" name="adi_arrow_right" id="0x7f??????" />
<public type="string" name="adi_arrow_down" id="0x7f??????" />
<public type="string" name="adi_hex" id="0x7f??????" />
<public type="string" name="adi_hex_hint" id="0x7f??????" />
<public type="string" name="adi_set" id="0x7f??????" />
<public type="string" name="adi_ics_color" id="0x7f??????" />
<public type="string" name="adi_choose_color_title" id="0x7f??????" />
<public type="string" name="adi_notification_style_grouptitle" id="0x7f??????" />
<public type="string" name="adi_notification_style_title" id="0x7f??????" />
<public type="string" name="adi_notification_style_summary" id="0x7f??????" />
<public type="string" name="adi_notif_wallpaper_alpha_title" id="0x7f??????" />
<public type="string" name="adi_notif_alpha_title" id="0x7f??????" />
<public type="array" name="adi_notification_wallpaper_entries" id="0x7f??????" />
<public type="array" name="adi_notification_wallpaper_values" id="0x7f??????" />
<public type="array" name="adi_notification_wallpaper_landscape_entries" id="0x7f??????" />
<public type="array" name="adi_notification_wallpaper_landscape_values" id="0x7f??????" />
<public type="id" name="adi_color_picker_view" id="0x7f??????" />
<public type="id" name="adi_old_color_panel" id="0x7f??????" />
<public type="id" name="adi_new_color_panel" id="0x7f??????" />
<public type="id" name="adi_hex" id="0x7f??????" />
<public type="id" name="adi_enter" id="0x7f??????" />
<public type="id" name="adi_ics_color" id="0x7f??????" />
<public type="id" name="adi_color_panel_view" id="0x7f??????" />
<public type="string" name="ok" id="0x7f??????" />
<public type="string" name="cancel" id="0x7f??????" />
- Settings.apk\smali\net\margaritov\preference\color picker\ColorPickerDialog.smali
search this -> const v2, 0x7f040095
1. change this -> 0x7f040095 , according to the value you got in your own public.xml
Code:
<public type="layout" name="adi_dialog_color_picker" id="0x7f??????" />
2. const v2, 0x7f0708ed
Code:
<public type="string" name="adi_dialog_color_picker" id="0x7f??????" />
Code:
<public type="id" name="adi_color_picker_view" id="0x7f??????" />
Code:
<public type="id" name="adi_old_color_panel" id="0x7f??????" />
Code:
<public type="id" name="adi_new_color_panel" id="0x7f??????" />
Code:
<public type="id" name="adi_hex" id="0x7f??????" />
Code:
<public type="id" name="adi_enter" id="0x7f??????" />
Code:
<public type="id" name="adi_ics_color" id="0x7f??????" />
Code:
<public type="id" name="adi_new_color_panel" id="0x7f??????" />
- Settings.apk\smali\com\android\settings\adi\ SeekBarPreference.smali
search this -> const v4, 0x7f040096
1. change this -> 0x7f040096, according to the value you got in your own public.xml
Code:
<public type="layout" name="adi_slider_preference" id="0x7f??????" />
2. const v3, 0x7f0a023a
Code:
<public type="id" name="monitor_box_adi" id="0x7f??????" />
Code:
<public type="id" name="seek_bar_adi" id="0x7f??????" />
- Settings.apk\smali\com\android\settings\adi\ NotificationDrawerStyle.smali
search this -> const v0, 0x7f0708ec
1. change this -> 0x7f0708ec, according to the value you got in your own public.xml
Code:
<public type="string" name="adi_notification_background_default_wallpaper" id="0x7f??????" />
2. const v0, 0x7f0708ec
Code:
<public type="string" name="adi_notification_background_default_wallpaper" id="0x7f??????" />
Code:
<public type="string" name="adi_notification_background_custom_image" id="0x7f??????" />
Code:
<public type="string" name="adi_notification_background_color_fill" id="0x7f??????" />
Code:
<public type="string" name="adi_notification_background_custom_image" id="0x7f??????" />
Code:
<public type="xml" name="adi_notification_drawer_style" id="0x7f??????" />
Code:
<public type="string" name="adi_choose_color_title" id="0x7f??????" />
Code:
<public type="string" name="ok" id="0x7f??????" />
Code:
<public type="string" name="cancel" id="0x7f??????" />