Hello buddies..
From the concept SHARING IS CARING, I am going to share with you how to hack your GT-N7000 JellyBean system apps.
Keep in mind that there are different modding hacks that I couldn't figure out how it is done until now. So please let me know if you have any modding that I didn't mentione
So let's start!!
Needed tools:
1) APK-Multi tool. You can use my repacked one (Nov 2012) from here.
2) Backsmali/Smali Manager from here
3) Notepad++ program from here
4) Willing of learning and some patience and cold nerves!
I am not going to teach you how to use these programs because I am assuming that you already know how to use them!
You must deodex your app before proceeding.
A lot of works are done by various xda members, some are from other sites, some are mine. If you found the guide of your mod here and you haven't been credited, please PM.
Click to expand...
Click to collapse
TABLE OF CONTENTS
Code:
+----------------------------------------------------------------------------+
| Post #[URL="http://forum.xda-developers.com/showpost.php?p=35229966&postcount=2"]2[/URL] |
+----------------------------------------------------------------------------+
| |
| - 4-way Reboot Menu |
| - Call record enabling + Disabling ascending ringtone |
| - Smart Rotation enabling |
| - SMS hacks: displaying sent Time instead of the received time |
| - Unlimited Multiwindow apps |
| - Home screen wallpaper scrolling |
| - Changing number of icons in home screen and apps drawer (dpi modding) |
| - Camera & Camcorder hacks: Adding "Shutter Sound On/Off" in menu, flash |
| can be used in low battery, hard keys as shutter, increasing camcorder |
| quality..etc |
| |
+----------------------------------------------------------------------------+
| Post #[URL="http://forum.xda-developers.com/showpost.php?p=35229966&postcount=3"]3[/URL] |
+----------------------------------------------------------------------------+
| |
| - Change default home screen wallpaper and default lock screen wallpaper |
| - Battery theming |
| - 4 Lockscreen shortcuts enabling |
| - Toggle to choose AOSP lock screen |
| - Fixing home button lag |
| - Permanent disabling of SMS, MMS & Email log history to be logged in call |
| logs |
| - Disabling scrolling cache across OS |
| - Center clock in status bar |
| |
+----------------------------------------------------------------------------+
| Post #[URL="http://forum.xda-developers.com/showpost.php?p=47555368&postcount=4"]4[/URL] |
+----------------------------------------------------------------------------+
| | |
| - SMS hack: SMS 200 recipients, stop SMS to MMS auto-converting, increase |
| SMS hour limit, 1000 slides, group messages, scheduled messages and save |
| restore messages |
| - 23 toggles notification panel (Lidroid way) |
| - Notification panel lock screen and recent apps |
| |
+----------------------------------------------------------------------------+
| Post #[URL="http://forum.xda-developers.com/showpost.php?p=47555418&postcount=5"]5[/URL] |
+----------------------------------------------------------------------------+
| |
| - Extended Power Menu Addons (ScreenShot, Recovery, Download and safe |
| modes) + Toggle Switch On or Off |
| |
+----------------------------------------------------------------------------+
| Post #[URL="http://forum.xda-developers.com/showpost.php?p=47555459&postcount=6"]6[/URL] |
+----------------------------------------------------------------------------+
| |
| - LockScreen Torch |
| - Long press menu button to kill app |
| - Adjust timeout delay across OS |
| |
+----------------------------------------------------------------------------+
| Post #[URL="http://forum.xda-developers.com/showpost.php?p=47555227&postcount=7"]7[/URL] |
+----------------------------------------------------------------------------+
| |
| - Browser Edge Zoom Enabling |
| - Airview Enabling + Control Panel + S Pen Gesture |
| - Adding Extra About Info to Your ROM to Suit Your Ego |
| - Enable TW Launcher Rotation |
| - Enable LockScreen Rotation |
| |
+----------------------------------------------------------------------------+
| Post #[URL="http://forum.xda-developers.com/showpost.php?p=47555493&postcount=8"]8[/URL] |
+----------------------------------------------------------------------------+
| |
| - Ink effect enabling |
| - Integrating application in settings menu |
| |
+----------------------------------------------------------------------------+
| Post #[URL="http://forum.xda-developers.com/showpost.php?p=47555274&postcount=9"]9[/URL] |
+----------------------------------------------------------------------------+
| |
| - Framed Recent app windows |
| - Volume Rocker to Skip Sound Track |
| - CRT TV off effect |
| - Permanent Disable of Ongoing Notifications |
| - Remove Mobile Data Toggle off Warning Dialogue |
| |
+----------------------------------------------------------------------------+
| Post #[URL="http://forum.xda-developers.com/showpost.php?p=47555301&postcount=10"]10[/URL] |
+----------------------------------------------------------------------------+
| |
| - Control The Full Battery Notification With Toggle Switch On or Off |
| - Disable Low Battery Notification |
| - Remove cloudy overlay and improve ripple lockscreen |
| - Disable Auto Scroll in Statusbar quickpanel toggle |
| - Settings menu extra hidden options |
| |
+----------------------------------------------------------------------------+
| Post #[URL="http://forum.xda-developers.com/showpost.php?p=47555600&postcount=11"]11[/URL] |
+----------------------------------------------------------------------------+
| |
| - Notification panel extra toggles - the original way (Airplane, Torch, |
| and AllShareCast) |
| - Create CSC features controller tab in settings menu |
| - Disable TW UI and enable AOSP UI |
| |
+----------------------------------------------------------------------------+
| Post #[URL="http://forum.xda-developers.com/showpost.php?p=47555787&postcount=16"]16[/URL] CSC FEATURES |
+----------------------------------------------------------------------------+
| |
| - Adding Call Button to Contacts and Logs |
| - Call and message block |
| - Factory data reset password |
| - About device extra and hiding displays |
| - Enabling Folder view in message app |
| - Enabling Callback number in message app |
| - Disable Page Rotation in TW Launcher |
| - Disable Tilt Effect in TW Launcher |
| - Enable Home Screen Edit Mode in TW Launcher |
| - Change Day Color in SPlanner widget |
| - Adding Exit button in default web browser |
| - Adding Home button in default web browser |
| - Adding Version info in default web browser |
| - Desktop view by default in default web browser |
| - Enable prompt to exit in default web browser |
| - Enable Camera Shutter Sound menu |
| |
+----------------------------------------------------------------------------+
| Post #[URL="http://forum.xda-developers.com/showpost.php?p=47555546&postcount=17"]17[/URL] CSC FEATURES |
+----------------------------------------------------------------------------+
| |
| |
+----------------------------------------------------------------------------+
.
Continue moddings!!
Change default home screen wallpaper and default lock screen wallpaper
Remember to set compression level to 0 in APK-Multi tool before proceeding in these steps
Click to expand...
Click to collapse
1. Decompile framework-res.apk using APK-Multi tool
2. Go to \res\drawable-xhdpi folder and change the following pics to what you want:
default_wallpaper (Home screen wallpaper)
keyguard_default_wallpaper (Lock screen wallpaper)
3. Make sure to rename your wallpaper to the exact name as the one that you will change
4. Compile framework-res.apk and push it to your phone.
Here are some pics taken from SGN2: download
Battery theming
First download my battery icon packs from here and use it as a resource (of course you can create your own!!).
1. Decompile SystemUI.apk with APK-Multi tool.
2. In Battery icon pack folder choose your desired battery theme and copy all png icons ONLY.
3. Go to \res\drawable-xhdpi folder and paste your icons there.
4. Now go back to Battery icon pack folder and in your desired battery theme folder, copy the two xml files (stat_sys_battery.xml and stat_sys_battery_charge.xml).
5. Go to \res\drawable folder and paste them there and accept changes.
These xml files are encoded with a code that make battery discharging and charging animation; so if you got enough png icons, you can create your own lines in these xml files for better animation effects
Click to expand...
Click to collapse
6. Recompile and push it to your phone.
4 Lockscreen shortcuts enabling
1- Decompile SecSettings.apk and go to smali/com/android/settings/lockscreenshortcut/LockScreenShortcutSettings.smali
2- Open this file with notpad++ and change the following line:
Code:
# direct methods
.method static constructor <clinit>()V
.locals 2
.prologue
const/4 v1, 0x0
.line 79
[COLOR="Red"][B]const/4 v0, 0x4[/B][/COLOR]
sput v0, Lcom/android/settings/lockscreenshortcut/LockScreenShortcutSettings;->MAX_SHORTCUT_ICON:I
to:
Code:
# direct methods
.method static constructor <clinit>()V
.locals 2
.prologue
const/4 v1, 0x0
.line 79
[B][COLOR="Blue"]const/4 v0, 0x3[/COLOR][/B]
sput v0, Lcom/android/settings/lockscreenshortcut/LockScreenShortcutSettings;->MAX_SHORTCUT_ICON:I
3- Save changes
4- (The following step is provided by tkari4; thanks man) For some region this feature is disabled like Germany ; So navigate to smali/com/android/settings folder and open LockscreenMenuSettings.smali and search for "ro.csc.country_code" and change the following (red to blue):
Code:
if-nez v4, :cond_5
const-string v4, "[B][COLOR="Red"]Germany[/COLOR][/B]"
const-string v7, "ro.csc.country_code"
invoke-static {v7}, Landroid/os/SystemProperties;->get(Ljava/lang/String;)Ljava/lang/String;
to:
Code:
if-nez v4, :cond_5
const-string v4, "[B][COLOR="Blue"]none[/COLOR][/B]"
const-string v7, "ro.csc.country_code"
invoke-static {v7}, Landroid/os/SystemProperties;->get(Ljava/lang/String;)Ljava/lang/String;
3- Save file and recompile and push to your phone.
Results example:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Toggle to choose AOSP lock screen
This method is originally done by Mirko_ddd, so please go to his thread and thank him
Click to expand...
Click to collapse
We need to do our changes to two files; android.policy.jar and SecSettings.apk
A. android.policy.jar:
1. Decompile (backsmali) android.policy.jar
2. Go to classout\com\android\internal\policy\impl and open LockPatternKeyguardView.smali
3. Search for ".method createLockScreen()Landroid/view/View;" and the following lines (the blue ones):
Code:
.method createLockScreen()Landroid/view/View;
.registers 7
.prologue
.line 1351
[B][COLOR="Blue"]iget-object v0, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mContext:Landroid/content/Context;
invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v1, "aosp_lock"
const/4 v2, 0x0
invoke-static {v0, v1, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v0
if-nez v0, :cond_majdi[/COLOR][/B]
new-instance v0, Lcom/android/internal/policy/impl/sec/CircleLockScreen;
iget-object v1, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mContext:Landroid/content/Context;
iget-object v2, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mConfiguration:Landroid/content/res/Configuration;
iget-object v3, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;
iget-object v4, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mUpdateMonitor:Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;
iget-object v5, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mKeyguardScreenCallback:Lcom/android/internal/policy/impl/KeyguardScreenCallback;
invoke-direct/range {v0 .. v5}, Lcom/android/internal/policy/impl/sec/CircleLockScreen;-><init>(Landroid/content/Context;Landroid/content/res/Configuration;Lcom/android/internal/widget/LockPatternUtils;Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;Lcom/android/internal/policy/impl/KeyguardScreenCallback;)V
[B][COLOR="Blue"]goto :goto_yes[/COLOR][/B]
.line 1357
[B][COLOR="Blue"]:cond_majdi
new-instance v0, Lcom/android/internal/policy/impl/LockScreen;
iget-object v1, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mContext:Landroid/content/Context;
iget-object v2, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mConfiguration:Landroid/content/res/Configuration;
iget-object v3, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;
iget-object v4, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mUpdateMonitor:Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;
iget-object v5, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mKeyguardScreenCallback:Lcom/android/internal/policy/impl/KeyguardScreenCallback;
invoke-direct/range {v0 .. v5}, Lcom/android/internal/policy/impl/LockScreen;-><init>(Landroid/content/Context;Landroid/content/res/Configuration;Lcom/android/internal/widget/LockPatternUtils;Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;Lcom/android/internal/policy/impl/KeyguardScreenCallback;)V[/COLOR][/B]
.local v0, lockView:Landroid/view/View;
[B][COLOR="Blue"]:goto_yes[/COLOR][/B]
invoke-direct {p0, v0}, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->initializeTransportControlView(Landroid/view/View;)V
.line 1358
return-object v0
.end method
4. Save changes and compile (smali) your classout folder
B. SecSettings.apk:
1. Decompile SecSettings.apk by APK-Multi-tool
2. Go to /smali/com/android/settings/ folder and open LockscreenSettings.smali
3. As Mirko_ddd did we will use an unused code with the form of (checkbox preference). Here it is "mSayCommand"
4. Since this unused code is actually hidden, so we need to un-hide it first. Search for the following lines and delete them (the red lines only):
Code:
if-ge v9, v10, :cond_15
iget-object v9, p0, Lcom/android/settings/LockScreenSettings;-> mSayCommand:Landroid/preference/CheckBoxPreference;
if-eqz v9, :cond_11
[B][COLOR="Red"]invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getPreferenceScreen()Landroid/preference/PreferenceScreen;
move-result-object v9
iget-object v10, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;
invoke-virtual {v9, v10}, Landroid/preference/PreferenceScreen;->removePreference(Landroid/preference/Preference;)Z[/COLOR][/B]
:cond_11
if-eqz v7, :cond_12
5. Now search and replace all "mSayCommand" with "mAospLock" also search and replace all "wake_up_lock_screen" with "aosp_lock"
6. Search for "say_your_wakeup" and replace it with "majdi_aosp_lock"
7. Save changes and exit.
8. Go to res\values folder and open strings.xml file and add the following strings at the end before </resource>:
Code:
<string name="aosp_lock_screen">AOSP Lockscreen</string>
<string name="aosp_lock_screen_description">Original Jelly Bean Lockscreen</string>
9. Go to res\xml folder and open lockscreen_settings.xml file and add the following line at the end before </PreferenceScreen> (actually you can put it in a place that you want this mod to be shown in lock screen option menu later on):
Code:
<CheckBoxPreference android:title="@string/aosp_lock_screen" android:key="majdi_aosp_lock" android:summary="@string/aosp_lock_screen_description" />
10. Save all changes and recompile. Push the modified files to your phone.
Results example:
Fixing home button lag
This method is originally done by Mirko_ddd, so please go to his thread and thank him
Click to expand...
Click to collapse
1. Backsmali android.policy.jar
2. G to classout\com\android\internal\policy\impl folder and open PhoneWindowManager.smali
3. Search for ".method public interceptKeyBeforeDispatching" then search for "#statusbar:Lcom/android/internal/statusbar/IStatusBarService;" and go down for the line that has the following iput-boolean … with mHomePressed:Z field and add the following line bellow it (the blue one):
Code:
.line 3364
.end local v38 #statusbar:Lcom/android/internal/statusbar/IStatusBarService;
:cond_38c
:goto_38c
const/16 v46, 0x0
move/from16 v0, v46
move-object/from16 v1, p0
[B][COLOR="Red"]iput-boolean[/COLOR][/B] v0, v1, Lcom/android/internal/policy/impl/PhoneWindowManager;->[B][COLOR="Red"]mHomePressed:Z[/COLOR][/B]
[B][COLOR="Blue"]invoke-virtual/range {p0 .. p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->goHome()Z[/COLOR][/B]
4. save changes and recompile (smali) the classout folder.
Permanent disabling of SMS, MMS & Email log history to be logged in call logs
1. Backsmali SecMms.apk.
2. Go to classout\com\android\mms\transaction folder and open MessagingNotification.smali file.
3. Now what you need to do is to search for any line that contains the following command "Landroid/content/ContentResolver;->insert(Landroid/net/Uri;Landroid/content/ContentValues;)Landroid/net/Uri;", there might be 3 or 4 lines, and delete them all.
Example (delete the whole red line):
Code:
invoke-static {v6}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;
move-result-object v6
[COLOR="Red"]invoke-virtual {v5, v6, v7}, [B]Landroid/content/ContentResolver;->insert(Landroid/net/Uri;Landroid/content/ContentValues;)Landroid/net/Uri;[/B][/COLOR]
.line 1348
add-int/lit8 p2, p2, 0x1
4. save changes and recompile (smali) the classout folder.
Disabling scrolling cache across OS
1. Backsmali framework2.jar.
2. Navigate to classout\android\widget folder and open AbsListView.smali
3. Search for ".method private createScrollingCache()V" and change:
Code:
const/4 v1, 0x[B][COLOR="Red"]1[/COLOR][/B]
to:
Code:
const/4 v1, 0x[B][COLOR="Blue"]0[/COLOR][/B]
4. Search for ".method public setScrollingCacheEnabled(Z)V" and change:
Code:
.parameter "[B][COLOR="Red"]enabled[/COLOR][/B]"
to:
Code:
.parameter "[B][COLOR="Blue"]disabled[/COLOR][/B]"
5. Save changes and recompile (smali) your file and push to your phone.
Center clock in status bar
This mod was done by raubkatze and all credits go to him.
Click to expand...
Click to collapse
1. Decompile SystemUI.apk by Apk-Multi tool
2. Navigate to /res/layout/ folder and open tw_status_bar.xml
3. Delete all these lines:
Code:
<LinearLayout android:orientation="horizontal" android:id="@id/icons" android:paddingLeft="0.0dip" android:paddingRight="2.0dip" android:layout_width="fill_parent" android:layout_height="fill_parent">
<LinearLayout android:orientation="horizontal" android:id="@id/left_icons" android:paddingLeft="4.0dip" android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_weight="1.0">
<TextView android:textSize="15.0dip" android:gravity="center_vertical" android:id="@id/carrierLabel" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
<ImageView android:id="@id/operatorLogoIcon" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/tw_stat_notify_operator_logo" />
<ImageView android:id="@id/doNotDisturbIcon" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/tw_dnd" android:alpha="0.7" android:scaleX="0.85" android:scaleY="0.85" />
<com.android.systemui.statusbar.StatusBarIconView android:id="@id/moreIcon" android:visibility="gone" android:layout_width="@dimen/status_bar_icon_size" android:layout_height="fill_parent" android:src="@drawable/stat_notify_more" />
<com.android.systemui.statusbar.phone.IconMerger android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/notificationIcons" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_alignParentLeft="true" />
</LinearLayout>
<LinearLayout android:orientation="horizontal" android:id="@id/right_icons" android:paddingRight="4.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_alignParentRight="true">
<LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/statusIcons" android:layout_width="wrap_content" android:layout_height="fill_parent" />
<LinearLayout android:gravity="center" android:orientation="horizontal" android:id="@id/signal_battery_cluster" android:paddingLeft="2.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent">
<include android:id="@id/signal_cluster" android:layout_width="wrap_content" android:layout_height="wrap_content" layout="@layout/tw_signal_cluster_view" />
<TextView android:textSize="12.0dip" android:textColor="#ffa6a6a6" android:layout_gravity="center" android:id="@id/battery_text" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/status_bar_network_name_separator" />
<ImageView android:gravity="center" android:id="@id/battery" android:layout_width="wrap_content" android:layout_height="wrap_content" />
</LinearLayout>
<com.android.systemui.statusbar.policy.Clock android:textSize="@dimen/status_bar_clock_text_size" android:textColor="#ff959595" android:ellipsize="none" android:gravity="left|center" android:id="@id/clock" android:paddingLeft="3.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:includeFontPadding="false" />
</LinearLayout>
and substitute with the following:
Code:
<LinearLayout android:orientation="horizontal" android:id="@id/icons" android:paddingLeft="1.0dip" android:paddingRight="1.0dip" android:layout_width="fill_parent" android:layout_height="fill_parent">
<LinearLayout android:orientation="horizontal" android:id="@id/left_icons" android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_weight="1.0">
<TextView android:textSize="15.0dip" android:gravity="center_vertical" android:id="@id/carrierLabel" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
<ImageView android:id="@id/operatorLogoIcon" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/tw_stat_notify_operator_logo" />
<ImageView android:id="@id/doNotDisturbIcon" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/tw_dnd" android:alpha="0.7" android:scaleX="0.85" android:scaleY="0.85" />
<com.android.systemui.statusbar.StatusBarIconView android:id="@id/moreIcon" android:visibility="gone" android:layout_width="@dimen/status_bar_icon_size" android:layout_height="fill_parent" android:src="@drawable/stat_notify_more" />
<com.android.systemui.statusbar.phone.IconMerger android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/notificationIcons" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_alignParentLeft="true" />
</LinearLayout>
<LinearLayout android:gravity="center" android:orientation="horizontal" android:id="@id/clock" android:layout_width="wrap_content" android:layout_height="fill_parent">
<com.android.systemui.statusbar.policy.Clock android:textSize="@dimen/status_bar_clock_text_size" android:textColor="#[B][COLOR="Red"]ffffffff[/COLOR][/B]" android:gravity="center" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
</LinearLayout>
<LinearLayout android:gravity="right|center" android:orientation="horizontal" android:id="@id/right_icons" android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_weight="1.0" android:layout_alignParentRight="true">
<LinearLayout android:gravity="right|center" android:orientation="horizontal" android:id="@id/statusIcons" android:layout_width="wrap_content" android:layout_height="fill_parent" />
<LinearLayout android:gravity="right|center" android:orientation="horizontal" android:id="@id/signal_battery_cluster" android:paddingLeft="2.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent">
<include android:id="@id/signal_cluster" android:layout_width="wrap_content" android:layout_height="wrap_content" layout="@layout/tw_signal_cluster_view" />
<TextView android:textSize="12.0dip" android:textColor="#ffa6a6a6" android:layout_gravity="center" android:id="@id/battery_text" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/status_bar_network_name_separator" />
<ImageView android:gravity="center" android:id="@id/battery" android:layout_width="wrap_content" android:layout_height="wrap_content" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
4. Save changes, recompile and push to your phone
N.B: you can put any hex color code for clock text color instead #ffffff above there
Click to expand...
Click to collapse
Results:
Continue moddings!!
Browser Edge Zoom Enabling
<<This mod will make you able to zoom in and out in internet browser by scrolling down and up respectively from the right or left screen edge>>
Credits to shoman94
Click to expand...
Click to collapse
- Baksmali framework.jar
- Navigate to classout\android\view\ folder and open ScaleGestureDetector.smali
- Search for this method ".method public onTouchEvent(Landroid/view/MotionEvent;)Z" and change the entire method to:
Code:
[B][COLOR="Blue"].method public onTouchEvent(Landroid/view/MotionEvent;)Z
.registers 28
.param p1, "event" # Landroid/view/MotionEvent;
.prologue
.line 207
move-object/from16 v0, p0
iget-object v0, v0, Landroid/view/ScaleGestureDetector;->mInputEventConsistencyVerifier:Landroid/view/InputEventConsistencyVerifier;
move-object/from16 v24, v0
if-eqz v24, :cond_19
.line 208
move-object/from16 v0, p0
iget-object v0, v0, Landroid/view/ScaleGestureDetector;->mInputEventConsistencyVerifier:Landroid/view/InputEventConsistencyVerifier;
move-object/from16 v24, v0
const/16 v25, 0x0
move-object/from16 v0, v24
move-object/from16 v1, p1
move/from16 v2, v25
invoke-virtual {v0, v1, v2}, Landroid/view/InputEventConsistencyVerifier;->onTouchEvent(Landroid/view/MotionEvent;I)V
.line 211
:cond_19
move-object/from16 v0, p0
iget-boolean v0, v0, Landroid/view/ScaleGestureDetector;->mValidPackage:Z
move/from16 v24, v0
if-eqz v24, :cond_2a
invoke-direct/range {p0 .. p1}, Landroid/view/ScaleGestureDetector;->onEdgeTouchEvent(Landroid/view/MotionEvent;)Z
move-result v24
if-eqz v24, :cond_2a
const/16 v24, 0x1
.line 310
:goto_29
return v24
.line 213
:cond_2a
invoke-virtual/range {p1 .. p1}, Landroid/view/MotionEvent;->getActionMasked()I
move-result v3
.line 215
.local v3, "action":I
const/16 v24, 0x1
move/from16 v0, v24
if-eq v3, v0, :cond_3a
const/16 v24, 0x3
move/from16 v0, v24
if-ne v3, v0, :cond_6a
:cond_3a
const/16 v19, 0x1
.line 217
.local v19, "streamComplete":Z
:goto_3c
if-eqz v3, :cond_40
if-eqz v19, :cond_6d
.line 221
:cond_40
move-object/from16 v0, p0
iget-boolean v0, v0, Landroid/view/ScaleGestureDetector;->mInProgress:Z
move/from16 v24, v0
if-eqz v24, :cond_65
.line 222
move-object/from16 v0, p0
iget-object v0, v0, Landroid/view/ScaleGestureDetector;->mListener:Landroid/view/ScaleGestureDetector$OnScaleGestureListener;
move-object/from16 v24, v0
move-object/from16 v0, v24
move-object/from16 v1, p0
invoke-interface {v0, v1}, Landroid/view/ScaleGestureDetector$OnScaleGestureListener;->onScaleEnd(Landroid/view/ScaleGestureDetector;)V
.line 223
const/16 v24, 0x0
move/from16 v0, v24
move-object/from16 v1, p0
iput-boolean v0, v1, Landroid/view/ScaleGestureDetector;->mInProgress:Z
.line 224
const/16 v24, 0x0
move/from16 v0, v24
move-object/from16 v1, p0
iput v0, v1, Landroid/view/ScaleGestureDetector;->mInitialSpan:F
.line 227
:cond_65
if-eqz v19, :cond_6d
.line 228
const/16 v24, 0x1
goto :goto_29
.line 215
.end local v19 # "streamComplete":Z
:cond_6a
const/16 v19, 0x0
goto :goto_3c
.line 232
.restart local v19 # "streamComplete":Z
:cond_6d
const/16 v24, 0x6
move/from16 v0, v24
if-eq v3, v0, :cond_79
const/16 v24, 0x5
move/from16 v0, v24
if-ne v3, v0, :cond_97
:cond_79
const/4 v4, 0x1
.line 235
.local v4, "configChanged":Z
:goto_7a
const/16 v24, 0x6
move/from16 v0, v24
if-ne v3, v0, :cond_99
const/4 v14, 0x1
.line 236
.local v14, "pointerUp":Z
:goto_81
if-eqz v14, :cond_9b
invoke-virtual/range {p1 .. p1}, Landroid/view/MotionEvent;->getActionIndex()I
move-result v15
.line 239
.local v15, "skipIndex":I
:goto_87
const/16 v20, 0x0
.local v20, "sumX":F
const/16 v21, 0x0
.line 240
.local v21, "sumY":F
invoke-virtual/range {p1 .. p1}, Landroid/view/MotionEvent;->getPointerCount()I
move-result v5
.line 241
.local v5, "count":I
const/4 v13, 0x0
.local v13, "i":I
:goto_90
if-ge v13, v5, :cond_ae
.line 242
if-ne v15, v13, :cond_9d
.line 241
:goto_94
add-int/lit8 v13, v13, 0x1
goto :goto_90
.line 232
.end local v4 # "configChanged":Z
.end local v5 # "count":I
.end local v13 # "i":I
.end local v14 # "pointerUp":Z
.end local v15 # "skipIndex":I
.end local v20 # "sumX":F
.end local v21 # "sumY":F
:cond_97
const/4 v4, 0x0
goto :goto_7a
.line 235
.restart local v4 # "configChanged":Z
:cond_99
const/4 v14, 0x0
goto :goto_81
.line 236
.restart local v14 # "pointerUp":Z
:cond_9b
const/4 v15, -0x1
goto :goto_87
.line 243
.restart local v5 # "count":I
.restart local v13 # "i":I
.restart local v15 # "skipIndex":I
.restart local v20 # "sumX":F
.restart local v21 # "sumY":F
:cond_9d
move-object/from16 v0, p1
invoke-virtual {v0, v13}, Landroid/view/MotionEvent;->getX(I)F
move-result v24
add-float v20, v20, v24
.line 244
move-object/from16 v0, p1
invoke-virtual {v0, v13}, Landroid/view/MotionEvent;->getY(I)F
move-result v24
add-float v21, v21, v24
goto :goto_94
.line 246
:cond_ae
if-eqz v14, :cond_c6
add-int/lit8 v10, v5, -0x1
.line 247
.local v10, "div":I
:goto_b2
int-to-float v0, v10
move/from16 v24, v0
div-float v11, v20, v24
.line 248
.local v11, "focusX":F
int-to-float v0, v10
move/from16 v24, v0
div-float v12, v21, v24
.line 251
.local v12, "focusY":F
const/4 v6, 0x0
.local v6, "devSumX":F
const/4 v7, 0x0
.line 252
.local v7, "devSumY":F
const/4 v13, 0x0
:goto_bf
if-ge v13, v5, :cond_e5
.line 253
if-ne v15, v13, :cond_c8
.line 252
:goto_c3
add-int/lit8 v13, v13, 0x1
goto :goto_bf
.end local v6 # "devSumX":F
.end local v7 # "devSumY":F
.end local v10 # "div":I
.end local v11 # "focusX":F
.end local v12 # "focusY":F
:cond_c6
move v10, v5
.line 246
goto :goto_b2
.line 254
.restart local v6 # "devSumX":F
.restart local v7 # "devSumY":F
.restart local v10 # "div":I
.restart local v11 # "focusX":F
.restart local v12 # "focusY":F
:cond_c8
move-object/from16 v0, p1
invoke-virtual {v0, v13}, Landroid/view/MotionEvent;->getX(I)F
move-result v24
sub-float v24, v24, v11
invoke-static/range {v24 .. v24}, Ljava/lang/Math;->abs(F)F
move-result v24
add-float v6, v6, v24
.line 255
move-object/from16 v0, p1
invoke-virtual {v0, v13}, Landroid/view/MotionEvent;->getY(I)F
move-result v24
sub-float v24, v24, v12
invoke-static/range {v24 .. v24}, Ljava/lang/Math;->abs(F)F
move-result v24
add-float v7, v7, v24
goto :goto_c3
.line 257
:cond_e5
int-to-float v0, v10
move/from16 v24, v0
div-float v8, v6, v24
.line 258
.local v8, "devX":F
int-to-float v0, v10
move/from16 v24, v0
div-float v9, v7, v24
.line 263
.local v9, "devY":F
const/high16 v24, 0x40000000
mul-float v17, v8, v24
.line 264
.local v17, "spanX":F
const/high16 v24, 0x40000000
mul-float v18, v9, v24
.line 265
.local v18, "spanY":F
mul-float v24, v17, v17
mul-float v25, v18, v18
add-float v24, v24, v25
invoke-static/range {v24 .. v24}, Landroid/util/FloatMath;->sqrt(F)F
move-result v16
.line 270
.local v16, "span":F
move-object/from16 v0, p0
iget-boolean v0, v0, Landroid/view/ScaleGestureDetector;->mInProgress:Z
move/from16 v23, v0
.line 271
.local v23, "wasInProgress":Z
move-object/from16 v0, p0
iput v11, v0, Landroid/view/ScaleGestureDetector;->mFocusX:F
.line 272
move-object/from16 v0, p0
iput v12, v0, Landroid/view/ScaleGestureDetector;->mFocusY:F
.line 273
move-object/from16 v0, p0
iget-boolean v0, v0, Landroid/view/ScaleGestureDetector;->mInProgress:Z
move/from16 v24, v0
if-eqz v24, :cond_13a
const/16 v24, 0x0
cmpl-float v24, v16, v24
if-eqz v24, :cond_11f
if-eqz v4, :cond_13a
.line 274
:cond_11f
move-object/from16 v0, p0
iget-object v0, v0, Landroid/view/ScaleGestureDetector;->mListener:Landroid/view/ScaleGestureDetector$OnScaleGestureListener;
move-object/from16 v24, v0
move-object/from16 v0, v24
move-object/from16 v1, p0
invoke-interface {v0, v1}, Landroid/view/ScaleGestureDetector$OnScaleGestureListener;->onScaleEnd(Landroid/view/ScaleGestureDetector;)V
.line 275
const/16 v24, 0x0
move/from16 v0, v24
move-object/from16 v1, p0
iput-boolean v0, v1, Landroid/view/ScaleGestureDetector;->mInProgress:Z
.line 276
move/from16 v0, v16
move-object/from16 v1, p0
iput v0, v1, Landroid/view/ScaleGestureDetector;->mInitialSpan:F
.line 278
:cond_13a
if-eqz v4, :cond_166
.line 279
move/from16 v0, v17
move-object/from16 v1, p0
iput v0, v1, Landroid/view/ScaleGestureDetector;->mCurrSpanX:F
move/from16 v0, v17
move-object/from16 v1, p0
iput v0, v1, Landroid/view/ScaleGestureDetector;->mPrevSpanX:F
.line 280
move/from16 v0, v18
move-object/from16 v1, p0
iput v0, v1, Landroid/view/ScaleGestureDetector;->mCurrSpanY:F
move/from16 v0, v18
move-object/from16 v1, p0
iput v0, v1, Landroid/view/ScaleGestureDetector;->mPrevSpanY:F
.line 281
move/from16 v0, v16
move-object/from16 v1, p0
iput v0, v1, Landroid/view/ScaleGestureDetector;->mCurrSpan:F
move/from16 v0, v16
move-object/from16 v1, p0
iput v0, v1, Landroid/view/ScaleGestureDetector;->mPrevSpan:F
move/from16 v0, v16
move-object/from16 v1, p0
iput v0, v1, Landroid/view/ScaleGestureDetector;->mInitialSpan:F
.line 283
:cond_166
move-object/from16 v0, p0
iget-boolean v0, v0, Landroid/view/ScaleGestureDetector;->mInProgress:Z
move/from16 v24, v0
if-nez v24, :cond_1d0
const/16 v24, 0x0
cmpl-float v24, v16, v24
if-eqz v24, :cond_1d0
if-nez v23, :cond_191
move-object/from16 v0, p0
iget v0, v0, Landroid/view/ScaleGestureDetector;->mInitialSpan:F
move/from16 v24, v0
sub-float v24, v16, v24
invoke-static/range {v24 .. v24}, Ljava/lang/Math;->abs(F)F
move-result v24
move-object/from16 v0, p0
iget v0, v0, Landroid/view/ScaleGestureDetector;->mSpanSlop:I
move/from16 v25, v0
move/from16 v0, v25
int-to-float v0, v0
move/from16 v25, v0
cmpl-float v24, v24, v25
if-lez v24, :cond_1d0
.line 285
:cond_191
move/from16 v0, v17
move-object/from16 v1, p0
iput v0, v1, Landroid/view/ScaleGestureDetector;->mCurrSpanX:F
move/from16 v0, v17
move-object/from16 v1, p0
iput v0, v1, Landroid/view/ScaleGestureDetector;->mPrevSpanX:F
.line 286
move/from16 v0, v18
move-object/from16 v1, p0
iput v0, v1, Landroid/view/ScaleGestureDetector;->mCurrSpanY:F
move/from16 v0, v18
move-object/from16 v1, p0
iput v0, v1, Landroid/view/ScaleGestureDetector;->mPrevSpanY:F
.line 287
move/from16 v0, v16
move-object/from16 v1, p0
iput v0, v1, Landroid/view/ScaleGestureDetector;->mCurrSpan:F
move/from16 v0, v16
move-object/from16 v1, p0
iput v0, v1, Landroid/view/ScaleGestureDetector;->mPrevSpan:F
.line 288
move-object/from16 v0, p0
iget-object v0, v0, Landroid/view/ScaleGestureDetector;->mListener:Landroid/view/ScaleGestureDetector$OnScaleGestureListener;
move-object/from16 v24, v0
move-object/from16 v0, v24
move-object/from16 v1, p0
invoke-interface {v0, v1}, Landroid/view/ScaleGestureDetector$OnScaleGestureListener;->onScaleBegin(Landroid/view/ScaleGestureDetector;)Z
move-result v24
move/from16 v0, v24
move-object/from16 v1, p0
iput-boolean v0, v1, Landroid/view/ScaleGestureDetector;->mInProgress:Z
.line 289
const-string v24, "ScaleGestureDetector"
const-string v25, "SGD"
invoke-static/range {v24 .. v25}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
.line 293
:cond_1d0
const/16 v24, 0x2
move/from16 v0, v24
if-ne v3, v0, :cond_226
.line 294
move/from16 v0, v17
move-object/from16 v1, p0
iput v0, v1, Landroid/view/ScaleGestureDetector;->mCurrSpanX:F
.line 295
move/from16 v0, v18
move-object/from16 v1, p0
iput v0, v1, Landroid/view/ScaleGestureDetector;->mCurrSpanY:F
.line 296
move/from16 v0, v16
move-object/from16 v1, p0
iput v0, v1, Landroid/view/ScaleGestureDetector;->mCurrSpan:F
.line 298
const/16 v22, 0x1
.line 299
.local v22, "updatePrev":Z
move-object/from16 v0, p0
iget-boolean v0, v0, Landroid/view/ScaleGestureDetector;->mInProgress:Z
move/from16 v24, v0
if-eqz v24, :cond_200
.line 300
move-object/from16 v0, p0
iget-object v0, v0, Landroid/view/ScaleGestureDetector;->mListener:Landroid/view/ScaleGestureDetector$OnScaleGestureListener;
move-object/from16 v24, v0
move-object/from16 v0, v24
move-object/from16 v1, p0
invoke-interface {v0, v1}, Landroid/view/ScaleGestureDetector$OnScaleGestureListener;->onScale(Landroid/view/ScaleGestureDetector;)Z
move-result v22
.line 303
:cond_200
if-eqz v22, :cond_226
.line 304
move-object/from16 v0, p0
iget v0, v0, Landroid/view/ScaleGestureDetector;->mCurrSpanX:F
move/from16 v24, v0
move/from16 v0, v24
move-object/from16 v1, p0
iput v0, v1, Landroid/view/ScaleGestureDetector;->mPrevSpanX:F
.line 305
move-object/from16 v0, p0
iget v0, v0, Landroid/view/ScaleGestureDetector;->mCurrSpanY:F
move/from16 v24, v0
move/from16 v0, v24
move-object/from16 v1, p0
iput v0, v1, Landroid/view/ScaleGestureDetector;->mPrevSpanY:F
.line 306
move-object/from16 v0, p0
iget v0, v0, Landroid/view/ScaleGestureDetector;->mCurrSpan:F
move/from16 v24, v0
move/from16 v0, v24
move-object/from16 v1, p0
iput v0, v1, Landroid/view/ScaleGestureDetector;->mPrevSpan:F
.line 310
.end local v22 # "updatePrev":Z
:cond_226
const/16 v24, 0x1
goto/16 :goto_29
.end method[/COLOR][/B]
- Save changes and smali your framework.jar and push it to device.
Airview Enabling + Control Panel + S Pen Gesture
[Section A] Enabling app Air view:
Part: One
1. Just add this file to /system/etc/permissions in your phone.
2. Fix permission to rw-r--r-- and reboot
This will fully fix air-view for VideoPlayer and partially for S Planner!! Continue to part two and three to fix it for Gallary and Launcher..:laugh:
Click to expand...
Click to collapse
Part: Two (thanks to eybee1970 and Robbie Hood)
1. Decompile SecGallary2_Galaxy.apk
2. Go to res\values folder and open bools.xml file and do these changes:
Code:
<bool name="isEspresso">[B][COLOR="Blue"]true[/COLOR][/B]</bool>
<bool name="isTablet">[B][COLOR="Blue"]true[/COLOR][/B]</bool>
3. Save changes, recompile and push to your phone.
Part: Three
1. Decompile SecLauncher2.apk
2. Go to res\values folder and open bools.xml file and do these changes:
Code:
<bool name="config_FolderHovering">[B][COLOR="Blue"]true[/COLOR][/B]</bool>
[Section B] Enabling Air view Control Panel and SPen Gesture in settings menu:
Special thanks to @not-i for helping in porting pen gesture.
- Baksmali SecSettings.apk
- Navigate to classout\com\android\settings folder and open PenSettingsMenu.smali
- In the method ".method public onCreate(Landroid/os/Bundle;)V", locate this section and delete all colored text (don't delete the defined condition.!!):
Code:
.line 198
:cond_209
[B][COLOR="Red"] invoke-virtual {p0}, Lcom/android/settings/PenSettingsMenu;->getPreferenceScreen()Landroid/preference/PreferenceScreen;
move-result-object v0
const-string v1, "pen_hover"
invoke-virtual {p0, v1}, Lcom/android/settings/PenSettingsMenu;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v1
invoke-virtual {v0, v1}, Landroid/preference/PreferenceScreen;->removePreference(Landroid/preference/Preference;)Z[/COLOR][/B]
.line 199
[B][COLOR="Blue"]invoke-virtual {p0}, Lcom/android/settings/PenSettingsMenu;->getPreferenceScreen()Landroid/preference/PreferenceScreen;
move-result-object v0
iget-object v1, p0, Lcom/android/settings/PenSettingsMenu;->mPenHovering:Landroid/preference/SwitchPreferenceScreen;
invoke-virtual {v0, v1}, Landroid/preference/PreferenceScreen;->removePreference(Landroid/preference/Preference;)Z[/COLOR][/B]
.line 200
[B][COLOR="Green"]invoke-virtual {p0}, Lcom/android/settings/PenSettingsMenu;->getPreferenceScreen()Landroid/preference/PreferenceScreen;
move-result-object v0
iget-object v1, p0, Lcom/android/settings/PenSettingsMenu;->mPenHoveringSound:Landroid/preference/CheckBoxPreference;
invoke-virtual {v0, v1}, Landroid/preference/PreferenceScreen;->removePreference(Landroid/preference/Preference;)Z[/COLOR][/B]
.line 206
[B][COLOR="DarkOrange"]invoke-virtual {p0}, Lcom/android/settings/PenSettingsMenu;->getPreferenceScreen()Landroid/preference/PreferenceScreen;
move-result-object v0
const-string v1, "pen_gesture_category"
invoke-virtual {p0, v1}, Lcom/android/settings/PenSettingsMenu;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v1
invoke-virtual {v0, v1}, Landroid/preference/PreferenceScreen;->removePreference(Landroid/preference/Preference;)Z[/COLOR][/B]
.line 207
[B][COLOR="Magenta"]invoke-virtual {p0}, Lcom/android/settings/PenSettingsMenu;->getPreferenceScreen()Landroid/preference/PreferenceScreen;
move-result-object v0
const-string v1, "pen_quick_command"
invoke-virtual {p0, v1}, Lcom/android/settings/PenSettingsMenu;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v1
invoke-virtual {v0, v1}, Landroid/preference/PreferenceScreen;->removePreference(Landroid/preference/Preference;)Z[/COLOR][/B]
Legend:
Deleting red codes: This will enable Air View header.
Deleting blue codes: This will enable Air View switch with control panel.
Deleting green codes: This will enable Air View haptic feedback.
Deleting orange codes: This will enable Pen gestures header.
Deleting purple codes: This will enable Quick command main action in Pen gestures category.
You can delete or keep ".line xxx" debugging; it is up to you.!!.
- Save changes.. smali SecSettings.apk, push it to your phone and fix permissions to rw-r--r-- (644).
- Push "SPenGesturePad.apk" to your phone and fix permissions to rw-r--r-- (644).
- Reboot the phone into recovery mode and flash SGNII_VODB.zip file.
N.B:
If you want to download extra languages for VODB, please see this post here.
Click to expand...
Click to collapse
Results:
Adding Extra About Info to Your ROM to Suit Your Ego
- Decompile SecSettings.apk
- Navigate to res\values\ folder and open strings.xml file by Notepad++ and keep it open, we will need it later.
- Navigate to res\xml\ folder and open device_info_settings.xml file by Notepad++.
Now, I will divide the tutorial into 2 sections..
Section One: Adding header category for about device menu.
- In device_info_settings.xml, at the top, do these changes (remove the red > and add blue lines):
before:
Code:
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen android:title="@string/about_settings" android:key="about_device"
xmlns:android="http://schemas.android.com/apk/res/android"[B][COLOR="Red"]>[/COLOR][/B]
<PreferenceScreen android:title="@string/help_title" android:key="help" android:summary="@string/help_title_summary">
after:
Code:
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen android:title="@string/about_settings" android:key="about_device"
xmlns:android="http://schemas.android.com/apk/res/android"
[B][COLOR="Blue"]xmlns:settings="http://schemas.android.com/apk/res/com.android.settings">
<PreferenceCategory android:title="@string/about_gen" android:key="dummy_gen" />[/COLOR][/B]
<PreferenceScreen android:title="@string/help_title" android:key="help" android:summary="@string/help_title_summary">
Explaination: we added header category with dummy key reference.
- Now we need to add strings resources, open strings.xml and add this line string resource before </resources> line:
Code:
<string name="about_gen">[B][COLOR="Green"]General information[/COLOR][/B]</string>
You can change the green color text to whatever you want to display
Click to expand...
Click to collapse
- We have finished from section one.
Section Two: Adding About ROM new information.
- In device_info_settings.xml, go to the end and add these lines before </PreferenceScreen> line:
Code:
<PreferenceCategory android:title="@string/rom_info" android:key="dummy_key">
<Preference android:title="@string/rom_name" android:key="rom_name" android:summary="@string/rom_name_details" style="?android:preferenceInformationStyle" />
<Preference android:title="@string/rom_ver" android:key="rom_ver" android:summary="@string/rom_ver_details" style="?android:preferenceInformationStyle" />
<Preference android:title="@string/rom_date" android:key="rom_date" android:summary="@string/rom_date_details" style="?android:preferenceInformationStyle" />
<Preference android:title="@string/rom_developer" android:key="rom_developer" android:summary="@string/rom_developer_name" style="?android:preferenceInformationStyle" />
<Preference android:title="@string/dev_thanks" android:key="dev_thanks" android:summary="@string/dev_thanks_name" style="?android:preferenceInformationStyle" />
</PreferenceCategory>
N.B: all referred android:key here are dummy ones; i.e, don't do anything and it can be anything since it has no reference. You can't delete android:key; it must be there to prevent code fragmentation.
Click to expand...
Click to collapse
- Now we need to add strings resources, open strings.xml and add these lines string resources before </resources> line:
Code:
<string name="rom_info">[B][COLOR="Green"]About ROM[/COLOR][/B]</string>
<string name="rom_name">[B][COLOR="Green"]ROM name[/COLOR][/B]</string>
<string name="rom_name_details">[B][COLOR="Green"]GloryROM[/COLOR][/B]</string>
<string name="rom_ver">[B][COLOR="Green"]ROM version[/COLOR][/B]</string>
<string name="rom_ver_details">[B][COLOR="Green"]v4.5 with Multi-Languages and Multi-CSC[/COLOR][/B]</string>
<string name="rom_date">[B][COLOR="Green"]Release date[/COLOR][/B]</string>
<string name="rom_date_details">[B][COLOR="Green"]March 2013[/COLOR][/B]</string>
<string name="rom_developer">[B][COLOR="Green"]ROM developer[/COLOR][/B]</string>
<string name="rom_developer_name">[B][COLOR="Green"]majdinj - xda.developers.com[/COLOR][/B]</string>
<string name="dev_thanks">[B][COLOR="Green"]Thanks to[/COLOR][/B]</string>
<string name="dev_thanks_name">[B][COLOR="Green"]ThaiDai for his ML ROM base[/COLOR][/B]</string>
You can change the green color text to whatever you want to display
Click to expand...
Click to collapse
- We have finished from section two.
- Save changes.
Now recompile your SecSettings.apk, push it to your phone, fix permissions (644) and reboot.
Enable TW Launcher Rotation
- Decompile SecLauncher2.apk
- Go to \res\values folder and open integers.xml
- Search for this line:
Code:
<integer name="config_screenOrientation">[B][COLOR="Red"]1[/COLOR][/B]</integer>
- Change the integer number to one of actions bellow:
1 = Disabled
2 = Enabled when Screen Rotation is switched on (270 degree)
3 = As same as 2
4 = Always enabled even if Screen Rotation is switched off (270 degree)
5 = Always default position
6 = Always in landscape mode (to the left)
7 = As same as 5
8 = Always in landscape mode (to the right)
9 = Upside down portrait when Screen Rotation is switched on
10= As same as 4 but for all directions (360 degree)
- Save changes.. recompile, push it to your device and fix permissions to 644 and reboot.
N.B: This will delete all preset home-screens..!!
Click to expand...
Click to collapse
Results:
Enable LockScreen Rotation
- Decompile framework-res.apk
- Go to \res\values folder and open bools.xml
- Change false to true in this line:
Code:
<bool name="config_enableLockScreenRotation">[B][COLOR="Blue"]true[/COLOR][/B]</bool>
- Save changes.. recompile, push it to your device and fix permissions to 644 and reboot.
N.B: This will always enable LockScreen rotation even if Screen Rotation toggle is switched off..!!
Click to expand...
Click to collapse
Results:
Continue moddings!!
Framed Recent app windows
For this mod, we will modify 2 files; SystemUI.apk and framework-res.apk
First download the resources from here.
A) SystemUI.apk
1. Decompile SystemUI.apk by APK-Multi Tool.
2. Inside Recent_Mod.zip there is three files; status_bar_recent_item.xml and status_bar_recent_panel.xml, copy them to res\layout-port folder for android 4.1 or to res\layout for android 4.2; and nyandroid11.png move it to res\drawable-nodpi folder
3. Go to res\values\bools.xml and change:
Code:
<bool name="config_recents_thumbnail_image_fits_to_xy">[B][COLOR="Red"]false[/COLOR][/B]</bool>
to:
Code:
<bool name="config_recents_thumbnail_image_fits_to_xy">[B][COLOR="Blue"]true[/COLOR][/B]</bool>
4. Go to res\values\colors.xml and change:
Code:
<color name="status_bar_recents_app_label_color">[B][COLOR="Red"]#ffffffff[/COLOR][/B]</color>
to:
Code:
<color name="status_bar_recents_app_label_color">[B][COLOR="Blue"]#ff555555[/COLOR][/B]</color>
5. Go to res\values\drawables.xml and change:
Code:
<item type="drawable" name="status_bar_recents_app_thumbnail_background">[B][COLOR="Red"]#88000000[/COLOR][/B]</item>
to:
Code:
<item type="drawable" name="status_bar_recents_app_thumbnail_background">[B][COLOR="Blue"]#ffe0e0e0[/COLOR][/B]</item>
6. Go to res\values\ids.xml and add these lines if they are not there:
Code:
<item type="id" name="recents_transition_background">false</item>
<item type="id" name="recents_transition_placeholder_icon">false</item>
7. Recompile your finished SystemUI.apk
B) framework-res.apk
1. Decompile framework-res.apk by APK-Multi Tool
2. Go to res\values\dimens.xml and change thumbnail height and width size to:
Code:
<dimen name="thumbnail_height">160.0dip</dimen>
Code:
<dimen name="thumbnail_width">240.0dip</dimen>
3. Recompile your finished framework-res.apk
N.B: You might change thumbnail height and width to match your device screen resolutions.
Click to expand...
Click to collapse
Results example:
Volume Rocker to Skip Sound Track
This mod will enable you to change sound track by long pressing volume up or down while the screen is locked using stock Music Player and Google Play Music programs..
Credits to:
- xperiacle: who firstly port this mod to Galaxy Note.
- grilleld: who helped me by providing android.policy.jar from xperiacle ROM, so I could locate codes for this mod (I did some codes modifications to shortening the modding process , so it will be easy and straight forward).
Click to expand...
Click to collapse
- Backsmali android.policy.jar
- Navigate to com/android/internal/policy/impl/ folder and open PhoneWindowManager.smali
- Search for this static field ".field static final LONG_PRESS_POWER_SHUT_OFF:I = 0x2" and add this line bellow it (the blue one):
Code:
.field static final LONG_PRESS_POWER_SHUT_OFF:I = 0x2
[B][COLOR="Blue"].field private static final LONG_PRESS_TIMEOUT:I = 0x190[/COLOR][/B]
.field static final MINI_APP_DIALOG_LAYER:I = 0x5
Here you can set the timeout delay for long press event of volume rocker, here it is set to 400 millisecond (0x190).
Click to expand...
Click to collapse
- Search for this field ".field private mIsVisibleSPenGestureView:Z" and add these two lines bellow it (the blue ones):
Code:
.field private mIsVisibleSPenGestureView:Z
[B][COLOR="Blue"].field mIsVolumeAction:Z
.field mIsVolumeBlocking:Z[/COLOR][/B]
.field mKeyboardTapVibePattern:[J
- Search for the field ".field private mVolumeDownKeyTriggered:Z" and add this line bellow it (the blue one):
Code:
.field private mVolumeDownKeyTriggered:Z
[B][COLOR="Blue"].field mVolumeDownLongPress:Ljava/lang/Runnable;[/COLOR][/B]
.field private final mVolumeKeyLongPressforOneTouchReport:Ljava/lang/Runnable;
- Search for the field ".field private mVolumeUpKeyTriggered:Z" and add this line bellow it (the blue one):
Code:
.field private mVolumeUpKeyTriggered:Z
[B][COLOR="Blue"].field mVolumeUpLongPress:Ljava/lang/Runnable;[/COLOR][/B]
.field mWindowManager:Landroid/view/IWindowManager;
- Search for the method ".method public constructor <init>()V" and go to the end of this method and add these lines (the blue ones) before "return-void" line:
Code:
.line 7234
new-instance v0, Lcom/android/internal/policy/impl/PhoneWindowManager$36;
invoke-direct {v0, p0}, Lcom/android/internal/policy/impl/PhoneWindowManager$36;-><init>(Lcom/android/internal/policy/impl/PhoneWindowManager;)V
iput-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mScreenLockTimeout:Ljava/lang/Runnable;
[B][COLOR="Blue"]new-instance v0, Lcom/android/internal/policy/impl/PhoneWindowManager$Skip1;
invoke-direct {v0, p0}, Lcom/android/internal/policy/impl/PhoneWindowManager$Skip1;-><init>(Lcom/android/internal/policy/impl/PhoneWindowManager;)V
iput-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolumeUpLongPress:Ljava/lang/Runnable;
new-instance v0, Lcom/android/internal/policy/impl/PhoneWindowManager$Skip2;
invoke-direct {v0, p0}, Lcom/android/internal/policy/impl/PhoneWindowManager$Skip2;-><init>(Lcom/android/internal/policy/impl/PhoneWindowManager;)V
iput-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolumeDownLongPress:Ljava/lang/Runnable;[/COLOR][/B]
.line 8132
return-void
.end method
- Search for the method ".method handleVolumeKey(II)V" and add these lines above "invoke-static" line (the blue ones), and add extra condition line (the blue line) above "goto" command:
Code:
.method handleVolumeKey(II)V
.registers 8
.parameter "stream"
.parameter "keycode"
.prologue
.line 5405
[B][COLOR="Blue"]move-object/from16 v0, p0
iget-boolean v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mIsVolumeBlocking:Z
if-nez v0, :cond_c[/COLOR][/B]
invoke-static {}, Lcom/android/internal/policy/impl/PhoneWindowManager;->getAudioService()Landroid/media/IAudioService;
move-result-object v0
if-nez v0, :cond_d
[B][COLOR="Blue"]:cond_c[/COLOR][/B]
:goto_[B][COLOR="Blue"]c[/COLOR][/B]
return-void
Here we should change :goto_value to same as conditions we added, so it will be :goto_c
Click to expand...
Click to collapse
- Still in the same method, search down for "Landroid/os/PowerManager$WakeLock;->release()V" and change :goto value to the same as the one in the previous:
before:
Code:
iget-object v2, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mBroadcastWakeLock:Landroid/os/PowerManager$WakeLock;
invoke-virtual {v2}, Landroid/os/PowerManager$WakeLock;->release()V
goto :goto_[B][COLOR="Red"]6[/COLOR][/B]
After:
Code:
iget-object v2, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mBroadcastWakeLock:Landroid/os/PowerManager$WakeLock;
invoke-virtual {v2}, Landroid/os/PowerManager$WakeLock;->release()V
goto :goto_[B][COLOR="Blue"]c[/COLOR][/B]
- There is another one..!! Search down again for "Landroid/os/PowerManager$WakeLock;->release()V" and change :goto value to the same as the one in the previous step:
Before:
Code:
iget-object v2, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mBroadcastWakeLock:Landroid/os/PowerManager$WakeLock;
invoke-virtual {v2}, Landroid/os/PowerManager$WakeLock;->release()V
goto :goto_[B][COLOR="Red"]6[/COLOR][/B]
After:
Code:
iget-object v2, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mBroadcastWakeLock:Landroid/os/PowerManager$WakeLock;
invoke-virtual {v2}, Landroid/os/PowerManager$WakeLock;->release()V
goto :goto_[B][COLOR="Blue"]c[/COLOR][/B]
- Now at the end of the previous method ".method handleVolumeKey(II)V" and before the next method ".method public hasNavigationBar()Z", add these two new methods:
Code:
[B][COLOR="Blue"].method handleVolumeLongPress(I)V
.registers 6
const/4 v1, 0x1
move-object/from16 v0, p0
iput-boolean v1, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mIsVolumeBlocking:Z
const/4 v1, 0x0
iput-boolean v1, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mIsVolumeAction:Z
const/16 v1, 0x18
if-ne p1, v1, :cond_majdi
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolumeUpLongPress:Ljava/lang/Runnable;
:goto_nj
iget-object v1, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHandler:Landroid/os/Handler;
sget v2, Lcom/android/internal/policy/impl/PhoneWindowManager;->LONG_PRESS_TIMEOUT:I
int-to-long v2, v2
invoke-virtual {v1, v0, v2, v3}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z
return-void
:cond_majdi
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolumeDownLongPress:Ljava/lang/Runnable;
goto :goto_nj
.end method
.method handleVolumeLongPressAbort()V
.registers 3
const/4 v1, 0x0
move-object/from16 v0, p0
iput-boolean v1, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mIsVolumeBlocking:Z
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHandler:Landroid/os/Handler;
iget-object v1, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolumeUpLongPress:Ljava/lang/Runnable;
invoke-virtual {v0, v1}, Landroid/os/Handler;->removeCallbacks(Ljava/lang/Runnable;)V
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHandler:Landroid/os/Handler;
iget-object v1, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolumeDownLongPress:Ljava/lang/Runnable;
invoke-virtual {v0, v1}, Landroid/os/Handler;->removeCallbacks(Ljava/lang/Runnable;)V
return-void
.end method[/COLOR][/B]
- Now search for the method ".method public interceptKeyBeforeQueueing(Landroid/view/KeyEvent;IZ)I", then search down for "Lcom/android/internal/policy/impl/PhoneWindowManager;->mSamsungVolumeControlThread:Lcom/android/internal/policy/impl/PhoneWindowManager$SamsungVolumeControlThread;" and add these lines ABOVE it (the blue ones):
Code:
:cond_51c
move-object/from16 v0, p0
[B][COLOR="Blue"]iget-boolean v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mScreenOnEarly:Z
if-nez v0, :cond_dinj
invoke-virtual/range {p0 .. p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->isMusicActive()Z
move-result v29
if-eqz p0, :cond_dinj
move-object/from16 v0, p0
move/from16 v15, v19
invoke-virtual {v0, v15}, Lcom/android/internal/policy/impl/PhoneWindowManager;->handleVolumeLongPress(I)V
:cond_dinj
move-object/from16 v0, p0[/COLOR][/B]
iget-object v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mSamsungVolumeControlThread:Lcom/android/internal/policy/impl/PhoneWindowManager$SamsungVolumeControlThread;
move-object/from16 v29, v0
- Still in the same method, and after adding the previous lines, just go down for few lines and you will see a line starts with a defined condition (:cond_), just add these lines (the blue ones) bellow that defined condition:
Code:
invoke-virtual/range {v29 .. v29}, Lcom/android/internal/policy/impl/PhoneWindowManager$SamsungVolumeControlThread;->start()V
goto/16 :goto_68
:cond_562
[B][COLOR="Blue"]if-nez v5, :cond_newa
move-object/from16 v0, p0
iget-boolean v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mIsVolumeBlocking:Z
if-eqz v0, :cond_newa
invoke-virtual/range {p0 .. p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->handleVolumeLongPressAbort()V
move-object/from16 v0, p0
iget-boolean v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mIsVolumeAction:Z
if-nez v0, :cond_newa
move-object/from16 v0, p0
const/4 v3, 0x0
move/from16 v15, v19
invoke-virtual {v0, v3, v15}, Lcom/android/internal/policy/impl/PhoneWindowManager;->handleVolumeKey(II)V
:cond_newa[/COLOR][/B]
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mSamsungVolumeControlThread:Lcom/android/internal/policy/impl/PhoneWindowManager$SamsungVolumeControlThread;
move-object/from16 v29, v0
- Now at the end of the method ".method sendCloseSystemWindows(Ljava/lang/String;)V" and above the method ".method setAttachedWindowFrames(Landroid/view/WindowManagerPolicy$WindowState;IILandroid/view/WindowManagerPolicy$WindowState;ZLandroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/Rect;I)V" add this new method:
Code:
[B][COLOR="Blue"].method protected sendMediaButtonEvent(I)V
.registers 15
invoke-static {}, Landroid/os/SystemClock;->uptimeMillis()J
move-result-wide v1
new-instance v11, Landroid/content/Intent;
const-string v4, "android.intent.action.MEDIA_BUTTON"
const/4 v5, 0x0
invoke-direct {v11, v4, v5}, Landroid/content/Intent;-><init>(Ljava/lang/String;Landroid/net/Uri;)V
new-instance v0, Landroid/view/KeyEvent;
const/4 v5, 0x0
const/4 v7, 0x0
move-wide v3, v1
move v6, p1
invoke-direct/range {v0 .. v7}, Landroid/view/KeyEvent;-><init>(JJIII)V
const-string v4, "android.intent.extra.KEY_EVENT"
invoke-virtual {v11, v4, v0}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Parcelable;)Landroid/content/Intent;
iget-object v4, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mContext:Landroid/content/Context;
const/4 v5, 0x0
invoke-virtual {v4, v11, v5}, Landroid/content/Context;->sendOrderedBroadcast(Landroid/content/Intent;Ljava/lang/String;)V
new-instance v12, Landroid/content/Intent;
const-string v4, "android.intent.action.MEDIA_BUTTON"
const/4 v5, 0x0
invoke-direct {v12, v4, v5}, Landroid/content/Intent;-><init>(Ljava/lang/String;Landroid/net/Uri;)V
new-instance v3, Landroid/view/KeyEvent;
const/4 v8, 0x1
const/4 v10, 0x0
move-wide v4, v1
move-wide v6, v1
move v9, p1
invoke-direct/range {v3 .. v10}, Landroid/view/KeyEvent;-><init>(JJIII)V
const-string v4, "android.intent.extra.KEY_EVENT"
invoke-virtual {v12, v4, v3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Parcelable;)Landroid/content/Intent;
iget-object v4, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mContext:Landroid/content/Context;
const/4 v5, 0x0
invoke-virtual {v4, v12, v5}, Landroid/content/Context;->sendOrderedBroadcast(Landroid/content/Intent;Ljava/lang/String;)V
const/4 v8, 0x1
move-object/from16 v9, p0
iput-boolean v8, v9, Lcom/android/internal/policy/impl/PhoneWindowManager;->mIsVolumeAction:Z
return-void
.end method[/COLOR][/B]
Save changes..
Now add the two extra smalis resources in com/android/internal/policy/impl folder and recompile android.policy.jar and push to your phone and fix permissions.
CRT TV off effect
Some custom kernels, works when wifi is on!!
Click to expand...
Click to collapse
1. We need Backsmali/smali program for this method.
2. Put the service.jar in baksmali folder.
3. Follow its procedure to baksmali service.jar, if done you will have classout folder.
4. Open classout folder and go to \com\android\server folder and open PowerManagerService$ScreenBrightnessAnimator.smali file.
5. In the method ".method private animateInternal(IZI)V", search for "Landroid/os/Handler;->removeMessages(I)V" and add the following code lines (the blue ones only, pay attention to red register number, it could be differ according to your ROM):
Code:
.line 3064
.end local v0 #delta:I
:cond_60
:goto_60
iget-object v7, p0, Lcom/android/server/PowerManagerService$ScreenBrightnessAnimator;->this$0:Lcom/android/server/PowerManagerService;
#getter for: Lcom/android/server/PowerManagerService;->mScreenBrightnessHandler:Landroid/os/Handler;
invoke-static {v7}, Lcom/android/server/PowerManagerService;->access$7200(Lcom/android/server/PowerManagerService;)Landroid/os/Handler;
move-result-object [B][COLOR="Red"]v7[/COLOR][/B]
[COLOR="Blue"][B] if-eqz p2, :cond_maj
const/16 v9, 0xb
const/4 v10, 0x0
const v2, 0x10
invoke-virtual {v7, v9, v2, v10}, Landroid/os/Handler;->obtainMessage(III)Landroid/os/Message;
move-result-object v9
invoke-virtual {v9}, Landroid/os/Message;->sendToTarget()V
:cond_maj[/B][/COLOR]
const/16 v9, 0xa
invoke-virtual {v7, v9}, Landroid/os/Handler;->removeMessages(I)V
6. Save changes.
To disable glitch turning off, please see this post by joosh3 here
Click to expand...
Click to collapse
7. Recompile (smali) your jar and push to your phone.
Permanent Disable of Ongoing Notifications
★ Disable Ongoing Notifications in Pull-down Menu ★
- Decompile SystemUI.apk.
- Navigate to res/layout folder and open tw_status_bar_expanded.xml file.
- Now, locate this section:
Code:
<LinearLayout android:orientation="vertical" android:id="@id/onGoingCart" android:background="#ff293945" android:focusable="true" android:visibility="gone" android:layout_width="[B][COLOR="Red"]fill_parent[/COLOR][/B]" android:layout_height="[B][COLOR="Red"]@dimen/status_bar_expanded_notification_category_height[/COLOR][/B]">
<TextView android:textSize="@dimen/status_bar_expanded_notification_category_text_size" android:textColor="@color/notification_category_color" android:gravity="left|center" android:id="@id/onGoingNotificationText" android:paddingLeft="11.0dip" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="@string/status_bar_ongoing_events_title" />
</LinearLayout>
<com.android.systemui.statusbar.policy.NotificationRowLayout android:id="@id/onGoingItems" android:layout_width="fill_parent" android:layout_height="wrap_content" systemui:rowHeight="@dimen/tw_notification_row_min_height" />
- Change the red texts in the previous codes to the new green one bellow and add the new blue codes..
Code:
<LinearLayout android:orientation="vertical" android:id="@id/onGoingCart" android:background="#ff293945" android:focusable="true" android:visibility="gone" android:layout_width="[B][COLOR="Lime"]0.0dip[/COLOR][/B]" android:layout_height="[B][COLOR="Lime"]0.0dip[/COLOR][/B]">
<TextView android:textSize="@dimen/status_bar_expanded_notification_category_text_size" android:textColor="@color/notification_category_color" [B][COLOR="Blue"]android:visibility="gone"[/COLOR][/B] android:gravity="left|center" android:id="@id/onGoingNotificationText" android:paddingLeft="11.0dip" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="@string/status_bar_ongoing_events_title" />
</LinearLayout>
<com.android.systemui.statusbar.policy.NotificationRowLayout android:id="@id/onGoingItems" [B][COLOR="Blue"]android:visibility="gone"[/COLOR][/B] android:layout_width="fill_parent" android:layout_height="wrap_content" systemui:rowHeight="@dimen/tw_notification_row_min_height" />
- Save changes, recompile, push to phone, fix permissions (644) and reboot.
★ Disable Built-in Ongoing Notifications in Status Bar ★
Ok, this part is only for built-in ongoing notifications, since market apps ongoing notifications can be disabled from application manager settings..!!!
A. Disable USB Debugging Notification:
This is quiet simple. In your phone, go to /system partition folder and open build.prop file and add this line if it is not there or edit the pre-existent one to be like this one:
Code:
persist.adb.notify=[B][COLOR="Blue"]0[/COLOR][/B]
So.. 0 means disable and 1 means enable.
B. Disable Full Battery Notification:
- Baksmali SystemUI.apk.
- Go to classes/com/android/systemui/power/ folder and open PowerUI.smali.
- Search for this method ".method notifyFullBatteryNotification()V" and just add the following line (the blue line):
Code:
.method notifyFullBatteryNotification()V
.registers 12
.prologue
[B][COLOR="Blue"]return-void[/COLOR][/B]
const/4 v10, 0x0
.line 827
iget-object v7, p0, Lcom/android/systemui/SystemUI;->mContext:Landroid/content/Context;
const-string v8, "notification"
Explanation: the method will return to nothing (exit) as it is just void.
- Save changes.. smali (recompile).. push to phone.. fix permissions (644) and reboot.
C. Disable Keyboard Input Notification:
- Baksmali services.jar.
- Navigate to classout/com/android/server/ folder and open InputMethodManagerService.smali
- Search for this method ".method public setImeWindowStatus(Landroid/os/IBinder;II)V" and just add the following line (the blue line):
Code:
.method public setImeWindowStatus(Landroid/os/IBinder;II)V
.registers 23
.param p1, "token" # Landroid/os/IBinder;
.param p2, "vis" # I
.param p3, "backDisposition" # I
.prologue
[B][COLOR="Blue"]return-void[/COLOR][/B]
.line 1640
invoke-static {}, Landroid/os/Binder;->getCallingUid()I
Explanation: the method will return to nothing (exit) as it is just void.
- Save changes.. smali (recompile).. push to phone.. fix permissions (644) and reboot.
D. Disable USB Connection Notification:
This method is inspired by this thread here by @Didact74
- Decompile framework-res.apk.
- Go to res/values/ folder and open drawables.xml and add this line at the end before </resources> line:
Code:
<item type="drawable" name="stat_sys_data_usb">false</item>
- Now delete this image resource "stat_sys_data_usb.png" from both res/drawables-hdpi and drawables-xhdpi folders.
- Recompile, push to phone, fix permissions (644) and reboot.
Remove Mobile Data Toggle off Warning Dialogue
- Baksmali SystemUI.apk.
- Go to classout/com/android/systemui/statusbar/policy/quicksetting folder and open MobileDataQuickSettingButton.smali
- Search for this method ".method private setMobileData(Z)V" and then go to its end and add this (goto) blue line:
Code:
.method private setMobileData(Z)V
.registers 6
.param p1, "on" # Z
.prologue
.line 248
iget-object v1, p0, Lcom/android/systemui/statusbar/policy/quicksetting/MobileDataQuickSettingButton;->mContext:Landroid/content/Context;
invoke-virtual {v1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
const-string v2, "quickpanel_mobiledata_checked"
const/4 v3, 0x0
invoke-static {v1, v2, v3}, Landroid/provider/Settings$Secure;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v0
.line 250
.local v0, "mChecked":I
const-string v1, "STATUSBAR-MobileDataQuickSettingButton"
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
const-string v3, "Mobile data waring checked : "
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v2
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v2
invoke-static {v1, v2}, Landroid/util/Slog;->i(Ljava/lang/String;Ljava/lang/String;)I
.line 252
[B][COLOR="Blue"]goto :cond_2d[/COLOR][/B]
if-nez p1, :cond_2d
if-nez v0, :cond_2d
.line 253
invoke-direct {p0}, Lcom/android/systemui/statusbar/policy/quicksetting/MobileDataQuickSettingButton;->onDisplayMobileDataOffAlert()V
.line 257
:goto_2c
return-void
.line 255
[B][COLOR="Red"]:cond_2d[/COLOR][/B] [B][COLOR="Green"]<!-- Make sure the new blue goto command above has the same cond value as this one[/COLOR][/B]
invoke-direct {p0, p1}, Lcom/android/systemui/statusbar/policy/quicksetting/MobileDataQuickSettingButton;->setMobileDataEnabled(Z)V
goto :goto_2c
.end method
- Make sure of the blue :cond value in the new goto command to be the same as the red :cond value in the code. Here, the red value is :cond_2d so the blue will be :cond_2d as well.
Explanation:
By adding this goto command, we are telling the code to jump over the invoke alert dialogue command to the mobile data boolean directly then jump to void.
Click to expand...
Click to collapse
- Save changes.. smali (recompile).. push to phone.. fix permissions (644) and reboot.
Continue moddings!!
Control The Full Battery Notification With Toggle Switch On or Off
After this guide, you will be able to switch on or off the full battery notification after the device is being fully charged..
So here we go..
We will be working with two files, SystemUI.apk and SecSettings.apk
Setting The Toggle Switch >>>
1) SecSettings.apk
- Decompile SecSettings.apk
- Go to res\values folder and open strings.xml and add these new lines:
Code:
<string name="set_remove_bat">Full Battery Notification</string>
<string name="notif_on">Notification is Enabled</string>
<string name="notif_off">Notification is Disabled</string>
- Go to res\xml folder and open display_settings.xml and add these codes where you want to display the toggle check box:
Code:
<CheckBoxPreference android:title="@string/set_remove_bat" android:key="bat_sbar" android:summaryOn="@string/notif_on" android:summaryOff="@string/notif_off" />
- Now for the smali.. Go to classout\com\android\settings folder and open DisplaySettings.smali.
- Add this line to [# instance fields] section:
Code:
.field private mBatPref:Landroid/preference/CheckBoxPreference;
- On the method ".method public onCreate(Landroid/os/Bundle;)V", search for ""key_multi_window"" and add these lines:
Code:
.line 570
const-string v11, "key_multi_window"
invoke-virtual {p0, v11}, Lcom/android/settings/DisplaySettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v11
check-cast v11, Landroid/preference/CheckBoxPreference;
iput-object v11, p0, Lcom/android/settings/DisplaySettings;->mMultiWindowPref:Landroid/preference/CheckBoxPreference;
[B][COLOR="Blue"]const-string v11, "bat_sbar"
invoke-virtual {p0, v11}, Lcom/android/settings/DisplaySettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v11
check-cast v11, Landroid/preference/CheckBoxPreference;
iput-object v11, p0, Lcom/android/settings/DisplaySettings;->mBatPref:Landroid/preference/CheckBoxPreference;[/COLOR][/B]
- Now in the method ".method public onPreferenceTreeClick(Landroid/preference/PreferenceScreen;Landroid/preference/Preference;)Z", search for ""multi_window_enabled"" to locate this part at the end:
Code:
:cond_15c
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mMultiWindowPref:Landroid/preference/CheckBoxPreference;
invoke-virtual {p2, v0}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, [B][COLOR="Red"]:cond_179[/COLOR][/B]
.line 1022
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mMultiWindowPref:Landroid/preference/CheckBoxPreference;
invoke-virtual {v0}, Landroid/preference/CheckBoxPreference;->isChecked()Z
move-result v0
.line 1023
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "multi_window_enabled"
if-eqz v0, :cond_177
:goto_172
invoke-static {v3, v4, v1}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
goto/16 [B][COLOR="Lime"]:goto_1c[/COLOR][/B]
:cond_177
move v1, v2
goto :goto_172
.end method
Add new codes before [.end method] in the previous section. Pay attention to the red color condition and the green color condition..!!!, so that section will be like this:
Code:
:cond_15c
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mMultiWindowPref:Landroid/preference/CheckBoxPreference;
invoke-virtual {p2, v0}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, [B][COLOR="Blue"]:cond_batteryToggle[/COLOR][/B]
.line 1022
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mMultiWindowPref:Landroid/preference/CheckBoxPreference;
invoke-virtual {v0}, Landroid/preference/CheckBoxPreference;->isChecked()Z
move-result v0
.line 1023
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "multi_window_enabled"
if-eqz v0, :cond_177
:goto_172
invoke-static {v3, v4, v1}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
goto/16 [B][COLOR="Lime"]:goto_1c[/COLOR][/B]
:cond_177
move v1, v2
goto :goto_172
[B][COLOR="Blue"]:cond_batteryToggle
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mBatPref:Landroid/preference/CheckBoxPreference;
invoke-virtual {p2, v0}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, [COLOR="Red"]:cond_179[/COLOR]
.line 1022
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mBatPref:Landroid/preference/CheckBoxPreference;
invoke-virtual {v0}, Landroid/preference/CheckBoxPreference;->isChecked()Z
move-result v0
.line 1023
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "bat_sbar"
if-eqz v0, :cond_majdiB
:goto_njB
invoke-static {v3, v4, v1}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
goto/16 [B][COLOR="Lime"]:goto_1c[/COLOR][/B]
:cond_majdiB
move v1, v2
goto :goto_njB[/COLOR][/B]
.end method
- Now in the method ".method public onResume()V", search for ""multi_window_enabled"" and locate this part, pay attention to the red color condition..!!!:
Code:
:cond_9d
sget-boolean v0, Lcom/android/settings/DisplaySettings;->UseMultiWindow:Z
if-eqz v0, [B][COLOR="Red"]:cond_c1[/COLOR][/B]
.line 847
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mMultiWindowPref:Landroid/preference/CheckBoxPreference;
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "multi_window_enabled"
invoke-static {v3, v4, v1}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v3
if-ne v3, v1, :cond_de
:goto_af
invoke-virtual {v0, v1}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V
.line 848
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v1, "multi_window_enabled"
invoke-static {v1}, Landroid/provider/Settings$System;->getUriFor(Ljava/lang/String;)Landroid/net/Uri;
move-result-object v1
iget-object v3, p0, Lcom/android/settings/DisplaySettings;->mMultiWindowModeObserver:Landroid/database/ContentObserver;
invoke-virtual {v0, v1, v2, v3}, Landroid/content/ContentResolver;->registerContentObserver(Landroid/net/Uri;ZLandroid/database/ContentObserver;)V
line 850
:cond_c1
return-void
:cond_c2
move v0, v2
And do these modification:
Code:
:cond_9d
sget-boolean v0, Lcom/android/settings/DisplaySettings;->UseMultiWindow:Z
if-eqz v0, [B][COLOR="Blue"]:cond_newBattery[/COLOR][/B]
.line 847
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mMultiWindowPref:Landroid/preference/CheckBoxPreference;
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "multi_window_enabled"
invoke-static {v3, v4, v1}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v3
if-ne v3, v1, :cond_de
:goto_af
invoke-virtual {v0, v1}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V
.line 848
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v1, "multi_window_enabled"
invoke-static {v1}, Landroid/provider/Settings$System;->getUriFor(Ljava/lang/String;)Landroid/net/Uri;
move-result-object v1
iget-object v3, p0, Lcom/android/settings/DisplaySettings;->mMultiWindowModeObserver:Landroid/database/ContentObserver;
invoke-virtual {v0, v1, v2, v3}, Landroid/content/ContentResolver;->registerContentObserver(Landroid/net/Uri;ZLandroid/database/ContentObserver;)V
[B][COLOR="Blue"]:cond_newBattery
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mBatPref:Landroid/preference/CheckBoxPreference;
if-eqz v0, [COLOR="Red"]:cond_c1[/COLOR]
.line 3001
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mBatPref:Landroid/preference/CheckBoxPreference;
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "bat_sbar"
const/4 v1, 0x0
invoke-static {v3, v4, v1}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v3
if-eqz v3, :cond_noShow
const/4 v1, 0x1
goto :goto_yesShow
:cond_noShow
const/4 v1, 0x0
:goto_yesShow
invoke-virtual {v0, v1}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V[/COLOR][/B]
line 850
:cond_c1
return-void
:cond_c2
move v0, v2
- Save all changes and compile and push to phone and prof working then continue to next step.
Setting The Referral Switch >>>
2) SystemUI.apk
- Baksmali SystemUI.apk.
- Go to classes/com/android/systemui/power/ folder and open PowerUI.smali.
- Search for this method ".method notifyFullBatteryNotification()V" and add the blue lines and delete or comment out the red line:
Code:
.method notifyFullBatteryNotification()V
.registers 12
.prologue
const/4 v10, 0x0
.line 827
iget-object v7, p0, Lcom/android/systemui/SystemUI;->mContext:Landroid/content/Context;
const-string v8, "notification"
invoke-virtual {v7, v8}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v2
check-cast v2, Landroid/app/NotificationManager;
.line 829
.local v2, "notificationManager":Landroid/app/NotificationManager;
[B][COLOR="Blue"]move-object v0, p0
iget-object v5, v0, Lcom/android/systemui/power/PowerUI;->mContext:Landroid/content/Context;
invoke-virtual {v5}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v5
const-string v6, "bat_sbar"
const/4 v7, 0x1
invoke-static {v5, v6, v7}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v5
if-nez v5, :cond_15
[COLOR="Red"]#if-nez v2, :cond_15[/COLOR][/COLOR] [COLOR="Green"]<!--- Put the same condition value in the above new condition[/COLOR][/B]
.line 830
const-string v7, "PowerUI"
const-string v8, "notifyFullBatteryNotification : fail to get NotificationManager reference"
invoke-static {v7, v8}, Landroid/util/Slog;->e(Ljava/lang/String;Ljava/lang/String;)I
.line 860
:goto_14
return-void
.line 834
:cond_15
iget-object v7, p0, Lcom/android/systemui/SystemUI;->mContext:Landroid/content/Context;
- Save changes and compile and push to phone...
Disable Low Battery Notification
- Baksmali SystemUI.apk.
- Go to classes/com/android/systemui/power/ folder and open PowerUI.smali.
- Search for this method ".method showLowBatteryWarning()V" and add the blue line:
Code:
.method showLowBatteryWarning()V
.registers 20
.prologue
[B][COLOR="Blue"]return-void[/COLOR][/B]
.line 433
const-string v16, "PowerUI"
- Save changes.. smali.. push to device, fix permissions (644) and reboot
Remove cloudy overlay and improve ripple lockscreen - All Samsung Devices
This mod and guide credit goes to @Goldieking and @dazznuts2000..
It is already explained in very excellent and easy way,, so please go ahead to the main thread here and look to the tutorial and give him some thanks respect :good:
Disable Auto Scroll in Statusbar Quickpanel Toggle
This guide credits goes to @mr.harsh. Please go ahead to the main post here.
Settings menu extra hidden options
This one is explained very well by @tkari4 in this post here. Make sure to hit Thanks button for him if that made your day
Continue moddings!!
4-way Reboot Menu
1. We will need Backsmali/Smali program for this.
2. Download the following resources files (GlobalActions$99$1.smali, GlobalActions$99$2.smali, GlobalActions$99.smali) [New: new patched resources for non-working hot reboot option, download newPatchedResources]
3. Put the android.policy.jar in baksmali folder.
4. Follow its procedure to baksmali android.policy.jar, if done you will have classout folder.
5. Open classout folder and go to \com\android\internal\policy\impl and paste the three resource files; (GlobalActions$99$1.smali, GlobalActions$99$2.smali and GlobalActions$99) there.
6. Open GlobalActions.smali.
7. In GlobalActions.smali, change GlobalActions$5 to GlobalActions$99 on both lines, and save it.
>>The Code should look like this:<<
Code:
new-instance v0, Lcom/android/internal/policy/impl/[B][COLOR="Blue"]GlobalActions$99[/COLOR][/B];
const v1, 0x108064b
const v2, 0x1040169
invoke-direct {v0, p0, v1, v2}, Lcom/android/internal/policy/impl/[COLOR="Blue"][B]GlobalActions$99[/B][/COLOR];-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
iput-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mRestart:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
Some ROMs might have different number on reboot button (i.e, GlobalActions$5). You find right one by tracking mRestart
Click to expand...
Click to collapse
8. Now Open GlobalActions$SinglePressAction.smali. Just between line ".end annotation" and "# instance fields" place your cursor and hit enter 2 times to make room (i.e leave 2 lines empty above "# instance fields" and 2 lines bellow ".end annotation") to paste THIS code (Blue one only)
Code:
.end annotation
[COLOR="Blue"][B]# static fields
.field protected static rebootMode:I
.field protected static final rebootOptions:[Ljava/lang/String;[/B][/COLOR]
# instance fields
9. Still in GlobalActions$SinglePressAction.smali look for the code "# direct methods". Then paste THIS code bellow it (Blue one only):
Code:
# direct methods
[COLOR="Blue"][B].method static constructor <clinit>()V
.registers 3
const/4 v0, 0x4
new-array v0, v0, [Ljava/lang/String;
const/4 v1, 0x0
const-string v2, "Reboot"
aput-object v2, v0, v1
const/4 v1, 0x1
const-string v2, "Hot Reboot"
aput-object v2, v0, v1
const/4 v1, 0x2
const-string v2, "Download"
aput-object v2, v0, v1
const/4 v1, 0x3
const-string v2, "Recovery"
aput-object v2, v0, v1
sput-object v0, Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;->rebootOptions:[Ljava/lang/String;
return-void
.end method
[/B][/COLOR]
.method protected constructor <init>(II)V
10. Recompile (smali) your jar.
Additional
If you want to change "Choose Reboot Method" text on top of that menu then:
- Open GlobalActions$99.smali.
- Go to following code and made your change (N.B: if you delete this entire code, you will disable head title of "Choose Reboot Method")
Code:
const-string v2, "[COLOR="Blue"][B]Choose Reboot Method[/B][/COLOR]"
invoke-virtual {v1, v2}, Landroid/app/AlertDialog$Builder;->setTitle(Ljava/lang/CharSequence;)Landroid/app/AlertDialog$Builder;
move-result-object v1
If you are porting to other device, please make sure in GlobalActions$99.smali whether Landroid/content/context has the same access$xx as same in GlobalActions.smali or change it to be like the one in GlobalActions.smali
Also make sure the following ids in GlobalActions$99.smali are pointed to the correct ids in framework-res.apk:
0x104000a = 0x0104000a = "string" name="ok"
0x104 = 0x01040000 = "string" name="cancel"
Lastly, if you are porting to android 4.3, open GlobalAction$99$1.smali and change the 2 lines of:
Code:
Lcom/android/server/pm/ShutdownThread
to:
Code:
Lcom/android/server/power/ShutdownThread
Click to expand...
Click to collapse
Results example:
Call record enabling + Disabling ascending ringtone
Call record enabling:
1. Put the SecPhone.apk in baksmali folder.
2. Follow its procedure to baksmali SecPhone.apk, if done you will have classout folder.
3. Open classout folder and go to \com\android\phone\PhoneFeature.smali, open it by NotePad++ and search for line makeFeatureForUsa()V and put these lines (Blue color text only) before "return-void" line:
Code:
[B] invoke-static {}, Lcom/android/phone/PhoneFeature;->makeFeatureForUsa()V
.line 899
[COLOR="Blue"] sget-object v0, Lcom/android/phone/PhoneFeature;->mFeatureList:Ljava/util/HashMap;
const-string v2, "voice_call_recording"
const/4 v4, 0x1
invoke-static {v4}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
move-result-object v3
invoke-virtual {v0, v2, v3}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
[/COLOR]
return-void[/B]
4. Save changes.
Disabling ascending ringtone:
1. Open classout folder and go to \com\android\phone\Ringer$1.smali.
2. Search for setStreamVolume. There should be two results. Delete the first one (the whole line):
Code:
.line 394
iget-object v1, p0, Lcom/android/phone/Ringer$1;->this$0:Lcom/android/phone/Ringer;
iget-object v1, v1, Lcom/android/phone/Ringer;->mAudioManager:Landroid/media/AudioManager;
[strike][B]invoke-virtual {v1, v3, v5, v4}, Landroid/media/AudioManager;->setStreamVolume(III)V[/B][/strike]
3. Now search for nop (usually at the bottom of the file!!), copy it and hit enter twice and paste again (see code bellow, the blue one). "leave one line space in between each line":
Code:
goto/16 :goto_b
.line 717
nop
[B][COLOR="Blue"] nop[/COLOR][/B]
:pswitch_data_1ca
.packed-switch 0x1
4. Save changes and recompile (smali) your SecPhone.apk.
Results example:
Smart Rotation enabling
1- Decompile SecSettings.apk and go to smali/com/android/settings/DisplaySettings.smali
2- Open this smali file with a NotePad++ and look for these lines and delete them all:
Code:
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getPreferenceScreen()Landroid/preference/PreferenceScreen;
move-result-object v12
iget-object v13, p0, Lcom/android/settings/DisplaySettings;->mSmartRotation:Landroid/preference/CheckBoxPreference;
invoke-virtual {v12, v13}, Landroid/preference/PreferenceScreen;->removePreference(Landroid/preference/Preference;)Z
3. Recompile and push to your phone.
Results example:
SMS hacks: displaying sent Time instead of the received time
Decompile SecMMS.apk
1. Go to /smali/com/android/mms/transaction/SMSReceiverService.smali, search for “currentTimeMillis" and change the following values:
Code:
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
to:
Code:
invoke-virtual {p1}, Landroid/telephony/SmsMessage;->getTimestampMillis()J
2. Search again for next “currentTimeMillis" and change the following values:
Code:
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
to:
Code:
invoke-virtual {v0}, Landroid/telephony/gsm/CbMessage;->getTimestampMillis()J
3. Save changes and compile.
If it doesn't work, clear the cache, the Dalvik cache, and also clear data for Messaging under Settings->Applications->Manage Applications (it won't delete your messages).
Click to expand...
Click to collapse
Unlimited Multiwindow apps
For this one, we need to play with 2 files (flashbarservice.apk and services.jar)
A. Flashbarservice.apk:
1. Decompile the flashbarservice.apk with APK-Multi tool.
2. Go to \smali\com\sec\android\app\FlashBar Service\FlashBarInfo.smali.
3. Open the file FlashBarInfo.smali using notepad++.
4. search for .method public generateFlashBarList()V and change the following code from:
Code:
const-string v8, "android.intent.category[COLOR="Blue"].MULTIWINDOW[/COLOR]_LAUNCHER"
to:
Code:
const-string v8, "android.intent.category.LAUNCHER"
5. Save and recompile and push to your phone.
B. services.jar:
1. Decompile services.jar by Backsmali/smali program.
2. Go to classout\smali\com\android\server\am\MultiWindowManagerService.smali
3. Open the file using notepad++ and search for following method ".method public isSupportApp(Ljava/lang/String)Z" and change the entire method to:
Code:
[COLOR="Blue"][B].method public isSupportApp(Ljava/lang/String;)Z
.registers 2
.prologue
const/4 v0, 0x1
return p0
.end method[/B][/COLOR]
4. Save file and recompile (Smali).
Home screen wallpaper scrolling
1. Decompile SecLauncher2.apk by APK-Multi tool.
2. Go to \res\values folder and open bools.xml file with Notepad++.
3. Change the following line:
Code:
<bool name="config_fixedWallpaperOffset">[B][COLOR="Blue"]true[/COLOR][/B]</bool>
to:
Code:
<bool name="config_fixedWallpaperOffset">[B][COLOR="Blue"]false[/COLOR][/B]</bool>
4. Save the file, recompile and push the apk to your phone.
Changing number of icons in home screen and apps drawer (dpi modding)
1. Decompile SecLauncher2.apk by APK-Multi tool.
2. Go to \res\values-sw399dp folder
3. Here we will do our changes to integers.xml, dimens.xml and and styles.xml files.
I. integers.xml:
Here is where you change the number of icons displayed in X axes "i.e, horizontal" and Y axes "i.e, vertical".
You need to apply your changes on the following numbers on the following lines:
Code:
<integer name="home_cellCountX">[B][COLOR="Blue"]5[/COLOR][/B]</integer>
<integer name="home_cellCountY">[B][COLOR="Blue"]5[/COLOR][/B]</integer>
<integer name="menuAppsGrid_cellCountX">[B][COLOR="Blue"]5[/COLOR][/B]</integer>
<integer name="menuAppsGrid_cellCountY">[B][COLOR="Blue"]5[/COLOR][/B]</integer>
As you can figure, home_cellCountX is number of icons in home screen in X axes and home_cellCountY is number of icons in home screen in Y axes.
Whereas; menuAppsGrid_cellCountX is number of icons in apps drawer in X axes and menuAppsGrid_cellCountY is number of icons in apps drawer in Y axes.
Do your changes and save.
II. dimens.xml:
Here is where you change icons size displayed in X and Y axes.
You need to apply your changes on the following lines for home screen to any number you want (might need several testing):
Code:
<dimen name="app_icon_size">[COLOR="Blue"][B]48.0[/B][/COLOR]dip</dimen>
<dimen name="home_cellWidth_port">[B][COLOR="Blue"]80.0[/COLOR][/B]dip</dimen>
<dimen name="home_cellHeight_port">[B][COLOR="Blue"]100.0[/COLOR][/B]dip</dimen>
<dimen name="home_cellGapX_port">[B][COLOR="Blue"]0.0[/COLOR][/B]dip</dimen>
<dimen name="home_cellGapY_port">[B][COLOR="Blue"]0.0[/COLOR][/B]dip</dimen>
<dimen name="home_pageMarginPlusPaddingTop">[B][COLOR="Blue"]2.0[/COLOR][/B]dip</dimen>
<dimen name="home_pageIndicatorTop">[B][COLOR="Blue"]508.0[/COLOR][/B]dip</dimen>
<dimen name="home_pageIndicatorTopShrunken">[B][COLOR="Blue"]508.0[/COLOR][/B]dip</dimen>
Also you need to apply your changes on the following lines for apps drawer to any number you want (might need several testing):
Code:
<dimen name="menuAppsGrid_pageMarginPlusPaddingTop">[B][COLOR="Blue"]27.0[/COLOR][/B]dip</dimen>
<dimen name="menuAppsGrid_cellWidth">[B][COLOR="Blue"]78.0[/COLOR][/B]dip</dimen>
<dimen name="menuAppsGrid_cellHeight">[B][COLOR="Blue"]94.0[/COLOR][/B]dip</dimen>
<dimen name="menuAppsGrid_cellGapX">[B][COLOR="Blue"]2.0[/COLOR][/B]dip</dimen>
<dimen name="menuAppsGrid_cellGapY">[B][COLOR="Blue"]2.0[/COLOR][/B]dip</dimen>
<dimen name="menu_pageIndicatorGap">[B][COLOR="Blue"]12.0[/COLOR][/B]dip</dimen>
<dimen name="menu_pageIndicatorTop">[B][COLOR="Blue"]520.0[/COLOR][/B]dip</dimen>
N.B: actually this is how I did it; you can play with other figures and test it to see the effect!!
Click to expand...
Click to collapse
Do your changes and save.
III. styles.xml:
This is needed if the icon label text becomes truncated!!
You need to edit the following lines to any number you want (might need several testing):
For home screen, edit this number:
Code:
<style name="HomeIcon" parent="@style/BaseHomeIcon">
<item name="android:textSize">[COLOR="Blue"][B]13.0[/B][/COLOR]dip</item>
For apps drawer, edit this number:
Code:
<style name="MenuIcon" parent="@style/BaseMenuIcon">
<item name="android:textSize">[B][COLOR="Blue"]13.0[/COLOR][/B]dip</item>
Do your changes and save.
4. Recompile and push to your phone.
5. Now we have to change phone's menus dpi. With any root browser/explorer program, navigate to system folder and open build.prop file as a text file and go to this line:
Code:
ro.sf.lcd_density=[B][COLOR="Red"]320[/COLOR][/B]
just change the red value to which dpi you want; e.g 240, then save changes and reboot your phone.
Camera & Camcorder hacks: Adding "Shutter Sound On/Off" in menu, flash can be used in low battery, hard keys as shutter, increasing camcorder quality..etc
Credits to: jobnik, I just explain the procedure!!
Click to expand...
Click to collapse
We need Backsmali/smali program to do this method.
Put SamsungCamera.apk in Backsmali folder and follow its guide to have classout folder in the end.
Adding "Shutter Sound On/Off" option in Camera Menu:
1. Go to classout\com\sec\android\app\camera\resourcedata\ folder and open CameraSettingsMenuResourceData.smali file.
2. To locate the lines that we will edit, search for"CscFeature_Camera_ShutterSoundMenu".
3. Now delete all these 6 lines:
Code:
invoke-static {}, Lcom/sec/android/app/CscFeature;->getInstance()Lcom/sec/android/app/CscFeature;
move-result-object v2
const-string v3, "CscFeature_Camera_ShutterSoundMenu"
invoke-virtual {v2, v3}, Lcom/sec/android/app/CscFeature;->getEnableStatus(Ljava/lang/String;)Z
move-result v2
if-eqz v2, :cond_f8
Camera can be used with flash in low battery state:
1. Go to classout\com\sec\android\app\camera\ folder and open AbstractCameraActivity.smali file.
2. Search for ".method protected handleLowBattery(Z)V" and add the following line (the blue line):
Code:
.method protected handleLowBattery(Z)V
.registers 5
.parameter "temp"
.prologue
.line 2072
[COLOR="Blue"][B]return-void[/B][/COLOR]
const-string v1, "AbstractCameraActivity"
3. Now save changes and go to classout\ com\sec\android\app\camera\ folder and open Camera.smali file.
4. Search for ".method private handleBatteryChanged(Landroid/content/Intent;)V" and look for the lines that have "handleLowBattery(Z)V" and "handlePluggedLowBattery(Z)V" after this method and delete the whole lines:
Code:
invoke-virtual {p0}, Lcom/sec/android/app/camera/Camera;->handleLowBattery()V
invoke-direct {p0, v6}, Lcom/sec/android/app/camera/Camera;->handlePluggedLowBattery(Z)V
invoke-direct {p0, v6}, Lcom/sec/android/app/camera/Camera;->handlePluggedLowBattery(Z)V
As you can see, there are 2 lines with "handlePluggedLowBattery(Z)V" AFTER this method, you have to delete them both
Click to expand...
Click to collapse
5. Still in Camera.smali file, search for ".method private handlePluggedLowBattery(Z)V" and add the following line (the blue line):
Code:
.method private handlePluggedLowBattery(Z)V
.registers 7
.parameter "temp"
.prologue
const/4 v4, 0x3
const/4 v3, 0x0
.line 6238
[B][COLOR="Blue"]return-void[/COLOR][/B]
const-string v1, "Camera"
Camera focus sound disabled:
1. Go to classout\com\sec\android\app\camera\ folder and open Camera.smali file.
2. Search for ".method public playCameraSound(II)V" and add the following line (the blue line):
Code:
.method public playCameraSound(II)V
.registers 12
.parameter "Sound"
.parameter "loop"
.prologue
const/4 v4, 0x0
const/high16 v6, 0x3f80
.line 4870
[B][COLOR="Blue"]return-void[/COLOR][/B]
iget-object v0, p0, Lcom/sec/android/app/camera/Camera;->mSoundPool:Landroid/media/SoundPool;
Camera Volume Up/Down and power buttons as a shutter:
1. Go to classout\com\sec\android\app\camera\ folder and open Camera.smali file.
2. Search for ". method public onKeyDown(ILandroid/view/KeyEvent;)Z" and look for ".sparse-switch" at the end of this method.
3. Here you will see several :sswitch definitions. See the one for 0x17, it is the touch shutter button and is defined as :sswitch_??. So simply we need to make :sswitch that are defined to volume up/down and power buttons to read the same as the one defined to the touch shutter button. Here 0x18 is for volume up; 0x19 is for volume down, and 0x1a is for power button.
4. So now change these :sswitch for these buttons to read as same as that for the touch shutter button. See example bellow:
Before:
Code:
:sswitch_data_2a0
.sparse-switch
0x4 -> :sswitch_95
[B][COLOR="Blue"]0x17 -> :sswitch_f7[/COLOR][/B] [COLOR="DarkGreen"]<!-- this is the touch shutter button[/COLOR]
[B][COLOR="Red"]0x18 -> :sswitch_238[/COLOR][/B] [COLOR="DarkGreen"]<!-- this is volume up button[/COLOR]
[B][COLOR="Red"]0x19 -> :sswitch_238[/COLOR][/B] [COLOR="DarkGreen"]<!-- this is volume down button[/COLOR]
[B][COLOR="Red"]0x1a -> :sswitch_95[/COLOR][/B] [COLOR="DarkGreen"]<!-- this is power button[/COLOR]
0x1b -> :sswitch_f7
0x42 -> :sswitch_f7
0x45 -> :sswitch_238
0x46 -> :sswitch_238
0x50 -> :sswitch_9b
0x52 -> :sswitch_93
0x55 -> :sswitch_98
0x59 -> :sswitch_98
0x5a -> :sswitch_98
0x9c -> :sswitch_238
0x9d -> :sswitch_238
.end sparse-switch
.end method
After:
Code:
:sswitch_data_2a0
.sparse-switch
0x4 -> :sswitch_95
[COLOR="Blue"][B]0x17 -> :sswitch_f7[/B][/COLOR] [COLOR="DarkGreen"]<!-- this is the touch shutter button[/COLOR]
[B][COLOR="Red"]0x18 -> :sswitch_f7[/COLOR][/B] [COLOR="DarkGreen"]<!-- this is volume up button[/COLOR]
[B][COLOR="Red"]0x19 -> :sswitch_f7[/COLOR][/B] [COLOR="DarkGreen"]<!-- this is volume down button[/COLOR]
[B][COLOR="Red"]0x1a -> :sswitch_f7[/COLOR][/B] [COLOR="DarkGreen"]<!-- this is power button[/COLOR]
0x1b -> :sswitch_f7
0x42 -> :sswitch_f7
0x45 -> :sswitch_238
0x46 -> :sswitch_238
0x50 -> :sswitch_9b
0x52 -> :sswitch_93
0x55 -> :sswitch_98
0x59 -> :sswitch_98
0x5a -> :sswitch_98
0x9c -> :sswitch_238
0x9d -> :sswitch_238
.end sparse-switch
.end method
5. Now search for ". method public onKeyUp(ILandroid/view/KeyEvent;)Z" and look for ".sparse-switch" at the end of this method.
6. Again you will see several :sswitch definitions. See the one for 0x17, it is the touch shutter button and is defined as :sswitch_??. And yes as you can figure out 0x18 is for volume up, 0x19 is for volume down and 0x1a is for power button.
7. So now change these :sswitch for these buttons to read as same as that for the touch shutter button. See example bellow:
Before:
Code:
.line 2172
.sparse-switch
0x3 -> :sswitch_25f
0x4 -> :sswitch_60
[B][COLOR="Blue"]0x17 -> :sswitch_11e[/COLOR][/B] [COLOR="DarkGreen"]<!-- this is the touch shutter button[/COLOR]
[B][COLOR="Red"]0x18 -> :sswitch_209[/COLOR][/B] [COLOR="DarkGreen"]<!-- this is volume up button[/COLOR]
[B][COLOR="Red"]0x19 -> :sswitch_209[/COLOR][/B] [COLOR="DarkGreen"]<!-- this is volume down button[/COLOR]
[B][COLOR="Red"]0x1a -> :sswitch_209[/COLOR][/B] [COLOR="DarkGreen"]<!-- this is power button[/COLOR]
0x1b -> :sswitch_11e
0x42 -> :sswitch_11e
0x50 -> :sswitch_20c
0x52 -> :sswitch_e5
.end sparse-switch
After:
Code:
.line 2172
.sparse-switch
0x3 -> :sswitch_25f
0x4 -> :sswitch_60
[B][COLOR="Blue"]0x17 -> :sswitch_11e[/COLOR][/B] [COLOR="DarkGreen"]<!-- this is the touch shutter button[/COLOR]
[B][COLOR="Red"]0x18 -> :sswitch_11e[/COLOR][/B] [COLOR="DarkGreen"]<!-- this is volume up button[/COLOR]
[B][COLOR="Red"]0x19 -> :sswitch_11e[/COLOR][/B] [COLOR="DarkGreen"]<!-- this is volume down button[/COLOR]
[B][COLOR="Red"]0x1a -> :sswitch_11e[/COLOR][/B] [COLOR="DarkGreen"]<!-- this is power button[/COLOR]
0x1b -> :sswitch_11e
0x42 -> :sswitch_11e
0x50 -> :sswitch_20c
0x52 -> :sswitch_e5
.end sparse-switch
N.B: In power button as a shutter, it will work on long press, so the power menu will popup as well, but it will take a picture!!
Click to expand...
Click to collapse
Camcorder can be used with flash in low battery state:
1. Go to classout\com\sec\android\app\camera\ folder and open Camcorder.smali file.
2. Search for ".method protected handleLowBattery(Z)V" and add the following line (the blue one):
Code:
.method protected handleLowBattery(Z)V
.registers 4
.parameter "temp"
.prologue
.line 3267
[B][COLOR="Blue"]return-void[/COLOR][/B]
const-string v0, "Camcorder"
3. Still in Camcorder.smali file, search for ".method private handleBatteryChanged(Landroid/content/Intent;)V" and look for lines that have "handleLowBattery(Z)V" and "handlePluggedLowBattery(Z)V" after this method and delete the whole lines:
Code:
invoke-virtual {p0}, Lcom/sec/android/app/camera/Camcorder;->handleLowBattery(Z)V
invoke-direct {p0, v7}, Lcom/sec/android/app/camera/Camcorder;->handlePluggedLowBattery(Z)V
invoke-direct {p0, v7}, Lcom/sec/android/app/camera/Camcorder;->handlePluggedLowBattery(Z)V
As you can see, there are 2 lines with "handlePluggedLowBattery(Z)V" AFTER this method, you have to delete them both
Click to expand...
Click to collapse
4. Still in Camcorder.smali file, search for ".method private handlePluggedLowBattery(Z)V" and add the following line (the blue one):
Code:
.method private handlePluggedLowBattery(Z)V
.registers 7
.parameter "temp"
.prologue
const/16 v4, 0x67
const/4 v3, 0x0
.line 4351
[B][COLOR="Blue"]return-void[/COLOR][/B]
const-string v1, "Camcorder"
Camcorder Better audio quality and video bitrate:
VIDEO QUALITY:
1080p: Normal - 17MBit / Fine - 24MBit / Superfine - 30MBit
720p: Normal - 9MBit / Fine - 13MBit / Superfine - 17MBit
SOUND QUALITY:
192kbit/s, 48000 khz
Click to expand...
Click to collapse
1. Go to classout\com\sec\android\app\camera\ folder and open MediaRecorderProfile.smali file.
2. Modify the first 4 arrays to be exactly like the followings (the blue lines only):
Code:
:array_11c
.array-data 0x4
[B][COLOR="Blue"] 0x2t 0x0t 0x0t 0x0t
0x80t 0xc3t 0xc9t 0x1t
0x0t 0x36t 0x6et 0x1t
0x40t 0x66t 0x3t 0x1t
0x1et 0x0t 0x0t 0x0t
0x2t 0x0t 0x0t 0x0t
0x3t 0x0t 0x0t 0x0t
0x0t 0xeet 0x2t 0x0t
0x2t 0x0t 0x0t 0x0t
0x80t 0xbbt 0x0t 0x0t[/COLOR][/B]
.end array-data
:array_134
.array-data 0x4
[B][COLOR="Blue"] 0x2t 0x0t 0x0t 0x0t
0x40t 0x66t 0x3t 0x1t
0x40t 0x5dt 0xc6t 0x0t
0x40t 0x54t 0x89t 0x0t
0x1et 0x0t 0x0t 0x0t
0x2t 0x0t 0x0t 0x0t
0x3t 0x0t 0x0t 0x0t
0x0t 0xeet 0x2t 0x0t
0x2t 0x0t 0x0t 0x0t
0x80t 0xbbt 0x0t 0x0t[/COLOR][/B]
.end array-data
:array_14c
.array-data 0x4
[B][COLOR="Blue"] 0x2t 0x0t 0x0t 0x0t
0xa8t 0xa0t 0x34t 0x0t
0x50t 0x3et 0x2bt 0x0t
0x90t 0x10t 0x23t 0x0t
0x1et 0x0t 0x0t 0x0t
0x2t 0x0t 0x0t 0x0t
0x3t 0x0t 0x0t 0x0t
0x0t 0xeet 0x2t 0x0t
0x2t 0x0t 0x0t 0x0t
0x80t 0xbbt 0x0t 0x0t[/COLOR][/B]
.end array-data
:array_164
.array-data 0x4
[B][COLOR="Blue"] 0x2t 0x0t 0x0t 0x0t
0x70t 0xf7t 0x2et 0x0t
0xa8t 0xf4t 0x26t 0x0t
0xb8t 0xcet 0x1et 0x0t
0x1et 0x0t 0x0t 0x0t
0x2t 0x0t 0x0t 0x0t
0x3t 0x0t 0x0t 0x0t
0x0t 0xeet 0x2t 0x0t
0x2t 0x0t 0x0t 0x0t
0x80t 0xbbt 0x0t 0x0t[/COLOR][/B]
.end array-data
Save changes, recompile (smali) your apk. You will get "classes.dex" and with 7-zip, open the archive of the original SamsungCamera.apk. Then drag and drop the classes.dex into SamsungCamera.apk. and push it to your phone.
Continue moddings!!
SMS hack: SMS 200 recipients, stop SMS to MMS auto-converting, increase SMS hour limit, 1000 slides, group messages, scheduled messages and save/restore messages
I. SMS 200 recipients:
1) Backsmali SecMMs.apk
2) Navigate to and open classout\com\android\mms\MmsConfig.smali
3) Search for ".method public static getRecipientLimit()I" and do these changes:
Code:
.method public static getRecipientLimit()I
.registers 1
.prologue
.line 656
[B][COLOR="Red"]sget v0, Lcom/android/mms/MmsConfig;->mRecipientLimit:I[/COLOR][/B]
return v0
.end method
to:
Code:
.method public static getRecipientLimit()I
.registers 1
.prologue
.line 656
[B][COLOR="Blue"]const/16 v0, 0xc8[/COLOR][/B]
return v0
.end method
Save changes and recompile (smali) your apk.
II. Stop SMS to MMS auto-converting:
1) Backsmali SecMMs.apk
2) Navigate to and open classout\com\android\mms\MmsConfig.smali
3) Search for "Lcom/android/mms/MmsConfig;->mMaxImageWidthRestrictedMode:I" and do these changes:
Code:
sput v0, Lcom/android/mms/MmsConfig;->mMaxImageWidthRestrictedMode:I
.line 153
[B][COLOR="Red"]sput v7, Lcom/android/mms/MmsConfig;->mRecipientLimit:I[/COLOR][/B]
.line 154
[B][COLOR="Red"]const/16 v0, 0xc8[/COLOR][/B]
sput v0, Lcom/android/mms/MmsConfig;->mDefaultSMSMessagesPerThread:I
to:
Code:
sput v0, Lcom/android/mms/MmsConfig;->mMaxImageWidthRestrictedMode:I
.line 153
[B][COLOR="Blue"]const/16 v0, 0x3e8
[/COLOR][/B]
.line 154
[B][COLOR="Blue"]sput v0, Lcom/android/mms/MmsConfig;->mRecipientLimit:I[/COLOR][/B]
sput v0, Lcom/android/mms/MmsConfig;->mDefaultSMSMessagesPerThread:I
4) Then search for "Lcom/android/mms/MmsConfig;->mAllowAttachAudio:Z" and do these changes:
Code:
.line 161
sput-boolean v2, Lcom/android/mms/MmsConfig;->mAllowAttachAudio:Z
.line 164
[B][COLOR="Red"]const/4 v0, 0x4[/COLOR][/B]
sput v0, Lcom/android/mms/MmsConfig;->mSmsToMmsTextThreshold:I
to:
Code:
.line 161
sput-boolean v2, Lcom/android/mms/MmsConfig;->mAllowAttachAudio:Z
.line 164
[B][COLOR="Blue"]const/16 v0, 0x3e8[/COLOR][/B]
sput v0, Lcom/android/mms/MmsConfig;->mSmsToMmsTextThreshold:I
5) Then search for ".method public static getMaxRecipientLength()I" and do these changes:
Code:
.method public static getMaxRecipientLength()I
.registers 1
.prologue
.line 2259
[B][COLOR="Red"]sget v0, Lcom/android/mms/MmsConfig;->mMaxRecipientLength:I[/COLOR][/B]
return v0
.end method
to:
Code:
.method public static getMaxRecipientLength()I
.registers 1
.prologue
.line 2259
[B][COLOR="Blue"]const/16 v0, 0x3e8[/COLOR][/B]
return v0
.end method
6) Then search for ".method public static getMmsMaxRecipient()I" and do these changes:
Code:
.method public static getMmsMaxRecipient()I
.registers 1
.prologue
.line 2498
[B][COLOR="Red"]sget v0, Lcom/android/mms/MmsConfig;->mMmsRecipientLimit:I[/COLOR][/B]
return v0
.end method
to:
Code:
.method public static getMmsMaxRecipient()I
.registers 1
.prologue
.line 2498
[B][COLOR="Blue"]const/16 v0, 0x3e8[/COLOR][/B]
return v0
.end method
7) Then search for ".method public static getSmsToMmsTextThreshold()I" and do these changes:
Code:
.method public static getSmsToMmsTextThreshold()I
.registers 1
.prologue
.line 585
[B][COLOR="Red"]sget v0, Lcom/android/mms/MmsConfig;->mSmsToMmsTextThreshold:I[/COLOR][/B]
return v0
.end method
to:
Code:
.method public static getSmsToMmsTextThreshold()I
.registers 1
.prologue
.line 585
[B][COLOR="Blue"]const/16 v0, 0x3e8[/COLOR][/B]
return v0
.end method
8) Then search for "Lcom/android/mms/MmsConfig;->mMaxRecipientLength:I" and add this line above it (the blue one):
Code:
move-result v10
[B][COLOR="Blue"]const/16 v9, 0x3e8[/COLOR][/B]
sput v10, Lcom/android/mms/MmsConfig;->mMaxRecipientLength:I
.line 1638
sget v10, Lcom/android/mms/MmsConfig;->mMinRecipientLength:I
9) Then search for "Lcom/android/mms/MmsConfig;->mSmsToMmsTextThreshold:I" and add this line above it (the blue one):
Code:
move-result v1
[B][COLOR="Blue"]const/16 v1, 0x3e8[/COLOR][/B]
sput v1, Lcom/android/mms/MmsConfig;->mSmsToMmsTextThreshold:I
.line 1817
const-string v1, "Mms/MmsConfig"
10) Then search for "Lcom/android/mms/MmsConfig;->mRecipientLimit:I" add this line above it (the blue one):
Code:
invoke-interface {v0, v1, v4}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I
move-result v1
[B][COLOR="Blue"]const/16 v1, 0x3e8[/COLOR][/B]
sput v1, Lcom/android/mms/MmsConfig;->mRecipientLimit:I
11) Save changes and recompile (smali) your apk.. phewww wow we finished
After pushing your final hacked SecMms.apk to your phone, you might have this message after you wrote 14 sms pages "Message size limit reached the maximum number of characters" that is actually a limitation of your mobile company provider protocol itself.
Click to expand...
Click to collapse
III. Increase SMS hour limit:
1) Backsmali SecMMs.apk
2) Navigate and open classout\com\android\mms\util\RateController.smali
3) Look for this line:
Code:
.field private static final RATE_LIMIT:I = [B][COLOR="Red"]0x64[/COLOR][/B]
and change it to:
Code:
.field private static final RATE_LIMIT:I = [B][COLOR="Blue"]0x3e8[/COLOR][/B]
4) Save changes and recompile (smali) your apk
Why??
0x64 means 100 in hexadecimal format. So we put 0x3e8 which means 1000 in hexadecimal format
Click to expand...
Click to collapse
VI. 1000 slides for MMS:
- Baksmali SecMms.apk
- Go to classout\com\android\mms folder and open MmsConfig.smali
- Now Search for ".method public static getMaxSlideCount()I" and do the following change..
Before:
Code:
.method public static getMaxSlideCount()I
.registers 1
.prologue
.line 825
[B][COLOR="Red"]sget v0, Lcom/android/mms/MmsConfig;->mMaxSlideCount:I[/COLOR][/B]
return v0
.end method
After:
Code:
.method public static getMaxSlideCount()I
.registers 1
.prologue
.line 825
[B][COLOR="Blue"]const/16 v0, 0x3e8[/COLOR][/B]
return v0
.end method
Save changes and smali your SecMms.apk and push it to phone and fix permissions to rw-r--r-- (644)
V. Group messages, scheduled messages and save/restore messages:
Already a great tutorial by @jovy23 is here.
23 toggles notification panel (Lidroid way)
Special thanks to wanam who modifies Lidroid way to port the 23-toggle to JB ROMs
Click to expand...
Click to collapse
1. Decompile SystemUI.apk by APK-Multi-Tool.
2. Navigate to res\layout folder and open tw_status_bar_expanded.xml and do these changes (delete red lines, add blue lines, and modify the green one to be like it):
Code:
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout android:id="@id/notification_panel" android:background="@drawable/notification_panel_bg" android:paddingTop="@dimen/notification_panel_padding_top" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginLeft="@dimen/notification_panel_margin_left"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
<FrameLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginBottom="@dimen/tw_close_handle_underlap">
<include android:layout_width="fill_parent" android:layout_height="@dimen/tw_notification_panel_header_height" layout="@layout/tw_status_bar_expanded_header" />
<TextView android:gravity="center" android:id="@id/emergency_calls_only" android:paddingBottom="4.0dip" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="wrap_content" />
<View android:background="#ff091a24" android:layout_width="fill_parent" android:layout_height="1.0dip" android:layout_marginTop="@dimen/tw_notification_panel_header_height" />
[B][COLOR="Blue"]<HorizontalScrollView android:id="@id/quicksetting_scroller" android:visibility="gone" android:scrollbars="none" android:layout_width="wrap_content" android:layout_height="@dimen/quick_setting_button_height" android:layout_marginTop="@dimen/tw_notification_panel_header_height">
<com.android.systemui.statusbar.policy.quicksetting.QuickSettingPanel android:orientation="horizontal" android:id="@id/quicksetting_container" android:layout_width="wrap_content" android:layout_height="wrap_content" android:divider="@drawable/tw_black_bg" android:showDividers="middle" />
</HorizontalScrollView>
<com.wanam.systemui.quickpanel.PowerWidget android:id="@id/exp_power_stat" android:layout_width="wrap_content" android:layout_height="@dimen/quick_setting_button_height" android:layout_marginTop="@dimen/tw_notification_panel_header_height" />
<LinearLayout android:orientation="vertical" android:id="@id/brightness_controller" android:background="#ff000000" android:layout_width="fill_parent" android:layout_height="56.0dip" android:layout_marginTop="@dimen/notification_panel_quicksettingbtn_height">
<LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="55.0dip">
<ImageView android:id="@id/brightness_icon" android:clickable="true" android:layout_width="25.0dip" android:layout_height="fill_parent" android:layout_marginLeft="13.0dip" android:src="@drawable/ic_sysbar_brightness" android:contentDescription="@string/accessibility_brightness_icon" />
<FrameLayout android:id="@id/brightness_group" android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.android.systemui.statusbar.policy.ToggleSlider android:id="@id/brightness" android:layout_width="fill_parent" android:layout_height="fill_parent" systemui:text="@string/status_bar_settings_auto_brightness_label" />
<com.android.systemui.statusbar.policy.ToggleSlider android:id="@id/auto_brightness" android:layout_width="fill_parent" android:layout_height="fill_parent" systemui:text="@string/status_bar_settings_auto_brightness_label" />
</FrameLayout>
</LinearLayout>
<View android:background="#ff091a24" android:layout_width="fill_parent" android:layout_height="1.0dip" />
</LinearLayout>[/COLOR][/B]
[B][COLOR="SeaGreen"]<ScrollView android:id="@id/scroll" android:fadingEdge="none" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginTop="@dimen/notification_panel_notification_top_margin" android:overScrollMode="ifContentScrolls">[/COLOR][/B]
<LinearLayout android:orientation="vertical" android:id="@id/scrollCart" android:layout_width="fill_parent" android:layout_height="wrap_content">
[B][COLOR="Red"]<HorizontalScrollView android:id="@id/quicksetting_scroller" android:scrollbars="none" android:layout_width="wrap_content" android:layout_height="@dimen/quick_setting_button_height">
<com.android.systemui.statusbar.policy.quicksetting.QuickSettingPanel android:orientation="horizontal" android:id="@id/quicksetting_container" android:layout_width="wrap_content" android:layout_height="wrap_content" android:divider="@drawable/tw_black_bg" android:showDividers="middle" />
</HorizontalScrollView>
<LinearLayout android:orientation="vertical" android:id="@id/brightness_controller" android:background="#ff000000" android:layout_width="fill_parent" android:layout_height="56.0dip">
<LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="55.0dip">
<ImageView android:id="@id/brightness_icon" android:clickable="true" android:layout_width="25.0dip" android:layout_height="fill_parent" android:layout_marginLeft="13.0dip" android:src="@drawable/ic_sysbar_brightness" android:contentDescription="@string/accessibility_brightness_icon" />
<FrameLayout android:id="@id/brightness_group" android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.android.systemui.statusbar.policy.ToggleSlider android:id="@id/brightness" android:layout_width="fill_parent" android:layout_height="fill_parent" systemui:text="@string/status_bar_settings_auto_brightness_label" />
<com.android.systemui.statusbar.policy.ToggleSlider android:id="@id/auto_brightness" android:layout_width="fill_parent" android:layout_height="fill_parent" systemui:text="@string/status_bar_settings_auto_brightness_label" />
</FrameLayout>
</LinearLayout>
<View android:background="#ff091a24" android:layout_width="fill_parent" android:layout_height="1.0dip" />
</LinearLayout>[/COLOR][/B]
<LinearLayout android:orientation="vertical" android:id="@id/noNotificationsTitle" android:focusable="true" android:layout_width="fill_parent" android:layout_height="wrap_content">
<TextView android:textSize="@dimen/status_bar_expanded_notification_category_text_size" android:textColor="@color/notification_category_color" android:gravity="left|center" android:id="@id/noNotificationsText" android:paddingLeft="11.0dip" android:layout_width="fill_parent" android:layout_height="@dimen/status_bar_expanded_notification_category_height" android:text="@string/status_bar_no_notifications_title" />
</LinearLayout>
<LinearLayout android:orientation="vertical" android:id="@id/onGoingCart" android:background="#ff293945" android:focusable="true" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="@dimen/status_bar_expanded_notification_category_height">
<TextView android:textSize="@dimen/status_bar_expanded_notification_category_text_size" android:textColor="@color/notification_category_color" android:gravity="left|center" android:id="@id/onGoingNotificationText" android:paddingLeft="11.0dip" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="@string/status_bar_ongoing_events_title" />
</LinearLayout>
<com.android.systemui.statusbar.policy.NotificationRowLayout android:id="@id/onGoingItems" android:layout_width="fill_parent" android:layout_height="wrap_content" systemui:rowHeight="@dimen/tw_notification_row_min_height" />
<LinearLayout android:orientation="vertical" android:id="@id/notificationCart" android:background="#ff293945" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="@dimen/status_bar_expanded_notification_category_height">
<RelativeLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content">
<TextView android:textSize="@dimen/status_bar_expanded_notification_category_text_size" android:textColor="@color/notification_category_color" android:gravity="left|center" android:id="@id/latestNotificationText" android:paddingLeft="11.0dip" android:layout_width="180.0dip" android:layout_height="fill_parent" android:text="@string/status_bar_latest_events_title" android:layout_alignParentLeft="true" />
<TextView android:textSize="@dimen/status_bar_expanded_notification_clear_button_text_size" android:textColor="@color/tw_status_bar_clear_btn_text" android:gravity="center" android:id="@id/clear_all_button" android:background="@drawable/tw_btn_default_small" android:padding="0.100000024dip" android:focusable="true" android:clickable="true" android:layout_width="@dimen/status_bar_expanded_clear_button_width" android:layout_height="fill_parent" android:layout_marginRight="4.0dip" android:text="@string/status_bar_clear_all_button" android:layout_alignParentRight="true" android:contentDescription="@string/accessibility_clear_all" />
</RelativeLayout>
</LinearLayout>
<com.android.systemui.statusbar.policy.NotificationRowLayout android:id="@id/notificationItems" android:layout_width="fill_parent" android:layout_height="wrap_content" systemui:rowHeight="@dimen/tw_notification_row_min_height" />
<com.android.systemui.statusbar.policy.NotificationRowLayout android:id="@id/latestItems" android:layout_width="fill_parent" android:layout_height="wrap_content" systemui:rowHeight="@dimen/tw_notification_row_min_height" />
</LinearLayout>
</ScrollView>
</FrameLayout>
<com.android.systemui.statusbar.phone.CloseDragHandle android:layout_gravity="bottom" android:orientation="vertical" android:id="@id/close" android:layout_width="fill_parent" android:layout_height="@dimen/tw_close_handle_height">
<RelativeLayout android:layout_width="fill_parent" android:layout_height="fill_parent">
<ImageView android:layout_gravity="bottom" android:layout_width="fill_parent" android:layout_height="@dimen/tw_close_handle_height" android:src="@drawable/tw_status_bar_close" android:scaleType="fitXY" />
<TextView android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Network" android:gravity="center" android:layout_gravity="bottom" android:id="@id/carrier_label" android:layout_width="fill_parent" android:layout_height="@dimen/tw_close_handle_height" android:layout_marginBottom="10.0dip" />
</RelativeLayout>
</com.android.systemui.statusbar.phone.CloseDragHandle>
</FrameLayout>
To make life easy, you can simply download the modified tw_status_bar_expanded.xml file and paste it over the original one.
3. Navigate to res\values\ folder and open ids.xml and add the following line at the end before </resources> line:
Code:
<item type="id" name="exp_power_stat">false</item>
Now you need to recompile SystemUI.apk in order to generate new ids in public.xml file for exp_power_stat. Then decompile the new SystemUI.apk (we are going to work on this one for now) and delete the old one to not cause confusion!!
Click to expand...
Click to collapse
4. Navigate to and open smali\com\android\systemui\statusbar\phone\PhoneStatusBar.smali file, now search for ".field mPostCollapseCleanup:Ljava/lang/Runnable;" and add this line bellow it (the blue one here):
Code:
.field mPostCollapseCleanup:Ljava/lang/Runnable;
[B][COLOR="Blue"].field mPowerWidget:Lcom/wanam/systemui/quickpanel/PowerWidget;[/COLOR][/B]
.field mQueueLock:Ljava/lang/Object;
5. Still in PhoneStatusBar.smali, search for ".method public addIcon" and add these lines (the blue ones) at the end of this method before the "return-void" line:
Code:
invoke-virtual {v1, v0, p3, v2}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;ILandroid/view/ViewGroup$LayoutParams;)V
.line 1170
[B][COLOR="Blue"]iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/wanam/systemui/quickpanel/PowerWidget;
invoke-virtual {v1}, Lcom/wanam/systemui/quickpanel/PowerWidget;->updateWidget()V[/COLOR][/B]
return-void
.end method
6. Still in PhoneStatusBar.smali, search for ".method protected makeStatusBarView", then search for "Landroid/widget/ScrollView;->setVerticalScrollBarEnabled(Z)V" and add these lines (the blue ones) bellow it:
Code:
invoke-virtual {v9, v10}, Landroid/widget/ScrollView;->setVerticalScrollBarEnabled(Z)V
[B][COLOR="Blue"]move-object/from16 v0, p0
iget-object v9, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
const v10, [COLOR="Purple"]0x7fxxxxxx[/COLOR]
invoke-virtual {v9, v10}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;
move-result-object v9
check-cast v9, Lcom/wanam/systemui/quickpanel/PowerWidget;
move-object/from16 v0, p0
iput-object v9, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/wanam/systemui/quickpanel/PowerWidget;[/COLOR][/B]
.line 714
new-instance v9, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$MyTicker;
N.B: You should use the newly generated id in public.xml (in res\values folder) for "exp_power_stat" in place of 0x7fxxxxxx
Click to expand...
Click to collapse
7. Still in PhoneStatusBar.smali, search for "Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;" and add these lines bellow it (the blue ones):
Code:
invoke-virtual {v1, v9, v2}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
[B][COLOR="Blue"] move-object/from16 v0, p0
iget-object v9, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/wanam/systemui/quickpanel/PowerWidget;
invoke-virtual {v9}, Lcom/wanam/systemui/quickpanel/PowerWidget;->setupWidget()V[/COLOR][/B]
.line 875
sget-boolean v9, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->useTouchWizGUI:Z
Now save changes and close.
8. Now we need to edit the head of AndroidManifest.xml in SystemUI.apk and add system status to the main core (this is important step to make Torch and Reboot toggles work!!).
Before:
Code:
<?xml version="1.0" encoding="utf-8"?>
[B][COLOR="Red"]<manifest android:versionCode="16" android:versionName="4.1.2-N7000XXLSZ" package="com.android.systemui" coreApp="true"[/COLOR][/B]
xmlns:android="http://schemas.android.com/apk/res/android">
After:
Code:
<?xml version="1.0" encoding="utf-8"?>
[B][COLOR="Red"]<manifest android:versionCode="16" android:versionName="4.1.2-N7000XXLSZ" package="com.android.systemui" coreApp="true" [COLOR="Blue"]android:sharedUserId="android.uid.system" android:process="system"[/COLOR][/COLOR][/B]
xmlns:android="http://schemas.android.com/apk/res/android">
9. Download the following smalis and add them to smali folder in SystemUI.apk (there are 2 wanam folders, put the correct one inside its corresponding folder inside SystemUI.apk\smali folder).
10. Now we have finished from modifying SystemUI.apk, Recompile AND SIGN the finished project!!!.
11. Now since SystemUI.apk is signed, it will not work properly until we disable signature check on "services.jar". So backsmali services.jar file and navigate to classout\com\android\server\pm folder and open PackageManagerService.smali and search for ".method static compareSignatures" and change the entire method to:
Code:
.method static compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I
.registers 9
.parameter "s1"
.parameter "s2"
.prologue
const/4 v6, 0x0
const-string v3, "Wanam: PackageManager"
const-string v4, "Skip signature check."
invoke-static {v3, v4}, Landroid/util/Slog;->e(Ljava/lang/String;Ljava/lang/String;)I
return v6
.end method
Save changes and recompile (smali) services.jar file.
12. Download the following system app and resource (LidroidSettings.apk and lidroid-res.apk)
13. Push all files to your phone and... look to the results
N.B: For those who want to modify Lidroid-res.apk, you need to install the following dependancies, then decompile it and edit apktool.yml file. You will find this:
Code:
isFrameworkApk: true
usesFramework:
ids:
- 1
sdkInfo:
minSdkVersion: '16'
targetSdkVersion: '16'
Add the 3 frameworks (2,3 and 4):
Code:
isFrameworkApk: true
usesFramework:
ids:
- 1
[B][COLOR="Blue"] - 2
- 3
- 4[/COLOR][/B]
sdkInfo:
minSdkVersion: '16'
targetSdkVersion: '16'
Now you can make your changes and re-compile.
Click to expand...
Click to collapse
Notification panel lock screen and recent apps
Credits to kmokhtar79
Click to expand...
Click to collapse
1. Decompile SystemUI.apk by APK-Multi tool
2. Navigate to res\drawable-xhdpi folder and put these new resource images there.
3. Navigate to res\layout folder and open tw_status_bar_expanded_header.xml and add the following lines (the blue ones):
Code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:background="#ff000000" android:layout_width="fill_parent" android:layout_height="39.0dip" android:baselineAligned="false"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
<com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Clock" android:textColor="#ffffffff" android:id="@id/clock" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="4.0dip" android:layout_marginTop="-3.0dip" android:singleLine="true" systemui:ampmSmall="true" />
<com.android.systemui.statusbar.policy.DateView android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Date" android:textColor="#ffffffff" android:ellipsize="none" android:id="@id/date" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="8.0dip" android:layout_marginRight="4.0dip" android:maxLines="2" />
<com.android.systemui.statusbar.RotationToggle android:id="@id/rotation_lock_button" android:visibility="gone" android:clickable="true" android:layout_width="32.0dip" android:layout_height="32.0dip" android:layout_margin="8.0dip" android:button="@drawable/ic_notify_rotation" android:contentDescription="@string/accessibility_rotation_lock_off" />
<Space android:layout_width="0.0dip" android:layout_height="0.0dip" android:layout_weight="1.0" />
[B][COLOR="Blue"]<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/recent_apps" android:paddingLeft="2.0dip" android:paddingRight="1.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_recent" android:layout_toLeftOf="@id/back" android:contentDescription="@string/accessibility_recent" systemui:keyCode="187" systemui:glowBackground="@drawable/ic_sysbar_highlight" />
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/back" android:paddingLeft="2.0dip" android:paddingRight="3.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_lock" android:layout_toLeftOf="@id/settings_button" android:contentDescription="@string/accessibility_back" systemui:keyCode="26" systemui:glowBackground="@drawable/ic_sysbar_highlight" />[/COLOR][/B]
<ImageView android:layout_width="1.0dip" android:layout_height="25.0dip" android:layout_marginTop="7.0dip" android:layout_marginBottom="7.0dip" android:src="@drawable/tw_quick_panel_plnm_setting_dv" />
<RelativeLayout android:id="@id/settings_button" android:background="@drawable/tw_quick_panel_setting_button_bg" android:focusable="true" android:visibility="visible" android:layout_width="@dimen/status_bar_expanded_setting_width" android:layout_height="39.0dip">
<ImageView android:id="@id/settings_button_icon" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/tw_quickpanel_icon_settings" android:scaleType="center" android:layout_centerHorizontal="true" android:layout_centerVertical="true" android:contentDescription="@string/accessibility_settings_button" />
</RelativeLayout>
</LinearLayout>
First blue line is for recent apps icon and the second one is for lock screen icon
Click to expand...
Click to collapse
4. Save changes, recompile and push to your phone.
Results:
Continue moddings!!
Extended Power Menu Addons (ScreenShot, Recovery, Download & Safe modes)
In this tutorial, we will modify 2 files; the framework-res.apk file and android.policy.jar file...
Here for the sake of tutorial, I will refer to ScreenShot resources by blue color lines, Recovery resources by green lines, download resources by orange lines and safe resources by pink lines.. Please download these resources first.
Smali resources credits to Robbie Hood for Screen Capture, tdunham for Download and Recovery smalis, and of course me for Safe mode smali.
A) framework-res.apk
1. Decompile framework-res.apk by APK-Multi Tool
2. Add your desired resources image to res\drawable-xhdpi folder, here they are [tw_ic_lock_screenshot.png], [tw_ic_lock_recovery.png], [tw_ic_lock_download.png] and [tw_ic_lock_safemode.png].
3. Go to res\values folder and open strings.xml file and add the following lines at the end before </resources>:
Code:
[COLOR="Blue"] <string name="global_action_screenshot_txt">Take screenshot</string>[/COLOR]
[COLOR="Green"] <string name="global_action_recovery_txt">Recovery Mode</string>[/COLOR]
[COLOR="DarkOrange"] <string name="global_action_download_txt">Download mode</string>[/COLOR]
[COLOR="Magenta"]<string name="global_action_safemode_txt">Reboot to safe mode</string>[/COLOR]
4. Now recompile your framework-res.apk THEN decompile it again; so we can have new generated ids in public.xml file in res\values folder.
5. In your new decompiled framework-res.apk, go to res\values folder and open public.xml file and locate the following lines for the added new image resources:
Code:
[COLOR="Blue"]<public type="drawable" name="tw_ic_lock_screenshot" id="0x01080a98" />[/COLOR]
[COLOR="Green"]<public type="drawable" name="tw_ic_lock_recovery" id="0x01080a9a" />[/COLOR]
[COLOR="DarkOrange"]<public type="drawable" name="tw_ic_lock_download" id="0x01080a99" />[/COLOR]
[COLOR="Magenta"]<public type="drawable" name="tw_ic_lock_safemode" id="0x01080a98" />[/COLOR]
and the following lines for the added new strings resources:
Code:
[COLOR="Blue"]<public type="string" name="global_action_screenshot_txt" id="0x01040784" />[/COLOR]
[COLOR="Green"]<public type="string" name="global_action_recovery_txt" id="0x01040785" />[/COLOR]
[COLOR="DarkOrange"]<public type="string" name="global_action_download_txt" id="0x01040786" />[/COLOR]
[COLOR="Magenta"]<public type="string" name="global_action_safemode_txt" id="0x01040785" />[/COLOR]
N.B: You might have different id values, but don't worry it will be the same principle!!
Click to expand...
Click to collapse
6. Leave public.xml file opened and go to the next step..
B) android.policy.jar
1. Backsmali android.policy.jar
2. Navigate to classout\com\android\internal\policy\impl folder and open GlobalActions.smali.
3. In the [# instance fields] section, add these new lines:
Code:
[COLOR="Blue"].field private mScreenCapture:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
[/COLOR]
[COLOR="Green"].field private mRecovery:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;[/COLOR]
[COLOR="DarkOrange"].field private mDownload:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;[/COLOR]
[COLOR="Magenta"].field private mSafeMode:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;[/COLOR]
4. Search for "[Lcom/android/internal/policy/impl/GlobalActions$Action;" for power menu arrays and increase the number of arrays (the line above it) to accommodate the total number of new arrays..
Code:
.line 418
const/4 v1, 0x[B][COLOR="Purple"]5 <!--- You need to increase the arrays number here[/COLOR][/B]
new-array v1, v1, [Lcom/android/internal/policy/impl/GlobalActions$Action;
Keep in mind that the maximum arrays that are allowed in Power Menu are only 7 arrays (i.e, since it is 0x5 here, we could only increase it to 0x7 but for the sake of tutorial we will put it 0x9)
Click to expand...
Click to collapse
So the line will be:
Code:
.line 418
const/4 v1, 0x[B][COLOR="Purple"]9[/COLOR][/B]
new-array v1, v1, [Lcom/android/internal/policy/impl/GlobalActions$Action;
5. Now we will put listener actions for these added arrays.. so above the newly modified "const/4 v1, 0x9" add these action lines:
Code:
new-instance [COLOR="Red"]v1[/COLOR], Lcom/android/internal/policy/impl/GlobalActions$99;
const [COLOR="Red"]v2[/COLOR], 0x10808ad
const [COLOR="Red"]v3[/COLOR], 0x1040193
move-object/from16 [COLOR="Red"]v0, p0[/COLOR]
invoke-direct {[COLOR="Red"]v1, v0, v2, v3[/COLOR]}, Lcom/android/internal/policy/impl/GlobalActions$99;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
move-object/from16 [COLOR="Red"]v0, p0[/COLOR]
iput-object [COLOR="Red"]v1, v0[/COLOR], Lcom/android/internal/policy/impl/GlobalActions;->mRestart:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
.line 416
invoke-direct/range {p0 .. p0}, Lcom/android/internal/policy/impl/GlobalActions;->onAirplaneModeChanged()V
[COLOR="Blue"]new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$ScreenCap;
const v2, 0x1080a98
const v3, 0x1040784
move-object/from16 v0, p0
invoke-direct {v1, v0, v2, v3}, Lcom/android/internal/policy/impl/GlobalActions$ScreenCap;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
move-object/from16 v0, p0
iput-object v1, v0, Lcom/android/internal/policy/impl/GlobalActions;->mScreenCapture:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;[/COLOR]
[COLOR="Green"] new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$Recovery;
const v2, 0x1080a9a
const v3, 0x1040785
move-object/from16 v0, p0
invoke-direct {v1, v0, v2, v3}, Lcom/android/internal/policy/impl/GlobalActions$Recovery;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
move-object/from16 v0, p0
iput-object v1, v0, Lcom/android/internal/policy/impl/GlobalActions;->mRecovery:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
[/COLOR]
[COLOR="DarkOrange"] new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$Download;
const v2, 0x1080a99
const v3, 0x1040786
move-object/from16 v0, p0
invoke-direct {v1, v0, v2, v3}, Lcom/android/internal/policy/impl/GlobalActions$Download;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
move-object/from16 v0, p0
iput-object v1, v0, Lcom/android/internal/policy/impl/GlobalActions;->mDownload:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;[/COLOR]
[COLOR="Magenta"]new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$SafeMode;
const v2, 0x1080a98
const v3, 0x1040785
move-object/from16 v0, p0
invoke-direct {v1, v0, v2, v3}, Lcom/android/internal/policy/impl/GlobalActions$SafeMode;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
move-object/from16 v0, p0
iput-object v1, v0, Lcom/android/internal/policy/impl/GlobalActions;->mSafeMode:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;[/COLOR]
.line 418
const/4 v1, 0x9
As you can see here, the ids for each action are obtained from public.xml file from framework-res.apk. The first id in each action will represent the image resource and the second id will represent the string resource... See public.xml lines above and you will figure it out ..
- Don't forget that, to link ids from framework-res.apk, you should omit the starting 0 value (example 0x01080a98 will be 0x1080a98)
- Also pay attention to variables and parameters registers, it should be matched (the red v and p)
Click to expand...
Click to collapse
6. Now we need to add new arrays to show in Power Menu.. So bellow modified "const/4 v1, 0x9" add new arrays to show after the last array:
Code:
.line 418
const/4 v1, 0x9
new-array v1, v1, [Lcom/android/internal/policy/impl/GlobalActions$Action;
const/4 v2, 0x0
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mAccessiblityShortcut:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
aput-object v3, v1, v2
...
...
...
const/4 [COLOR="Red"]v2[/COLOR], 0x4
move-object/from16 [COLOR="Red"]v0, p0[/COLOR]
iget-object [COLOR="Red"]v3, v0[/COLOR], Lcom/android/internal/policy/impl/GlobalActions;->mRestart:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
aput-object [COLOR="Red"]v3, v1, v2[/COLOR]
[COLOR="Blue"] const/4 v2, 0x5
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mScreenCapture:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
aput-object v3, v1, v2[/COLOR]
[COLOR="Green"] const/4 v2, 0x6
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mRecovery:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
aput-object v3, v1, v2[/COLOR]
[COLOR="DarkOrange"] const/4 v2, 0x7
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mDownload:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
aput-object v3, v1, v2[/COLOR]
[COLOR="Magenta"]const/4 v2, 0x8
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mSafeMode:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
aput-object v3, v1, v2[/COLOR]
- Again, don't forget that the maximum allowed arrays to show are only 7 arrays starting from 0x0 to 0x6; but we put here to 0x8 for the sake of tutorial.
- Also pay attention to variables and parameters registers, it should be matched (the red v and p)
Click to expand...
Click to collapse
7. Now save changes and exit.
8. Copy smali resources for ScreenShot, Recovery, Download and Safe modes into classout\com\android\internal\policy\impl folder
You need to open GlobalActions$ScreenCap$1.smali, GlobalActions$Download.smali, GlobalActions$Recovery.smali and GlobalActions$SafeMode.smali and look for this line:
Code:
invoke-static {v2}, Lcom/android/internal/policy/impl/GlobalActions;->access$[B][COLOR="Red"]200[/COLOR][/B](Lcom/android/internal/policy/impl/GlobalActions;)Landroid/content/Context;
Here access$200 might differ according to ROM, you need to open GlobalActions.smali and search for "(Lcom/android/internal/policy/impl/GlobalActions;)Landroid/content/Context;" to locate the exact access$xxx
Example in my GlobalActions.smali, the access$xxx is:
Code:
.method static synthetic access$[B][COLOR="Red"]200[/COLOR][/B](Lcom/android/internal/policy/impl/GlobalActions;)Landroid/content/Context;
.locals 1
.parameter "x0"
.prologue
.line 111
iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mContext:Landroid/content/Context;
return-object v0
.end method
Click to expand...
Click to collapse
9. Smali (recompile) the finished android.policy.jar
Now push the modified framework-res.apk and android.policy.jar to your phone.. This will be enough for new Power Menu recovery, download and safe modes addons but not for ScreenShot!! You need to push extra file to bin folder in your phone which is screenshot and fix permissions to rwsr-xr-x that is 04755 in updater-script language.
Results example:
Extra Step: Adding Setting Toggle For Power Menu Addons >>>
I will assume you already add Safe Mode and Screenshot extra power menu addons..
1) android.policy.jar:
- Baksmali android.policy.jar
- Go to classout\com\android\internal\policy\impl folder
- Open GlobalActions$SafeMode.smali and change the method ".method public showConditional()Z" to:
Code:
.method public showConditional()Z
.registers 5
const/4 v0, 0x1
const/4 v1, 0x0
iget-object v2, p0, Lcom/android/internal/policy/impl/[B][COLOR="Blue"]GlobalActions$SafeMode[/COLOR][/B];->this$0:Lcom/android/internal/policy/impl/GlobalActions;
# getter for: Lcom/android/internal/policy/impl/GlobalActions;->mContext:Landroid/content/Context;
invoke-static {v2}, Lcom/android/internal/policy/impl/GlobalActions;->access$200(Lcom/android/internal/policy/impl/GlobalActions;)Landroid/content/Context;
move-result-object v2
invoke-virtual {v2}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v2
const-string v3, [B][COLOR="Blue"]"pm_safe_mode"[/COLOR][/B]
invoke-static {v2, v3, v1}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v2
if-ne v2, v0, :cond_15
:goto_14
return v0
:cond_15
move v0, v1
goto :goto_14
.end method
.method public showDuringKeyguard()Z
.registers 2
.prologue
.line 389
const/4 v0, 0x1
return v0
.end method
- Also, open GlobalActions$ScreenCap.smali and change the method ".method public showConditional()Z" to:
Code:
.method public showConditional()Z
.registers 5
const/4 v0, 0x1
const/4 v1, 0x0
iget-object v2, p0, Lcom/android/internal/policy/impl/[B][COLOR="Blue"]GlobalActions$ScreenCap[/COLOR][/B];->this$0:Lcom/android/internal/policy/impl/GlobalActions;
# getter for: Lcom/android/internal/policy/impl/GlobalActions;->mContext:Landroid/content/Context;
invoke-static {v2}, Lcom/android/internal/policy/impl/GlobalActions;->access$200(Lcom/android/internal/policy/impl/GlobalActions;)Landroid/content/Context;
move-result-object v2
invoke-virtual {v2}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v2
const-string v3, [B][COLOR="Blue"]"pm_screenshot"[/COLOR][/B]
invoke-static {v2, v3, v1}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v2
if-ne v2, v0, :cond_15
:goto_14
return v0
:cond_15
move v0, v1
goto :goto_14
.end method
- Save changes .. and that's for android.policy.jar
2) SecSettings.apk:
- Decompile SecSettings.apk
- Go to res\values folder and open strings.xml file and add these new resources at the end before </resources>:
Code:
<string name="PM_Glory_addons">GloryROM Power Menu Addons</string>
<string name="pm_safe_mode_title">Safe Mode Reboot</string>
<string name="pm_screenshot_title">Take Screenshot</string>
<string name="pm_on">Toggle is Enabled</string>
<string name="pm_off">Toggle is Disabled</string>
- Go to res\xml and open display_settings.xml and add these lines on the place you your addon to appear later on on the device:
Code:
<PreferenceCategory android:title="@string/PM_Glory_addons" android:key="PM_Glory_settings" />
<CheckBoxPreference android:title="@string/pm_safe_mode_title" android:key="pm_safe_mode" android:defaultValue="true" android:summaryOn="@string/pm_on" android:summaryOff="@string/pm_off" />
<CheckBoxPreference android:title="@string/pm_screenshot_title" android:key="pm_screenshot" android:defaultValue="true" android:summaryOn="@string/pm_on" android:summaryOff="@string/pm_off" />
- Now for the smali source, go to classout\com\android\settings folder and open DisplaySettings.smali.. Also here, I didn't invent new codes, I used mult-windows toggle codes as reference..!! I will use Blue color for Safe Mode toggle codes and Green color for Screenshot toggle codes. Add these lines to [# instance fields] section:
Code:
[B][COLOR="Blue"].field private mSafeModePref:Landroid/preference/CheckBoxPreference;[/COLOR]
[COLOR="Green"].field private mScreenShotPref:Landroid/preference/CheckBoxPreference;[/COLOR][/B]
- In the method ".method public onCreate(Landroid/os/Bundle;)V", search for ""key_multi_window"" and add these lines:
Code:
.line 570
const-string v11, "key_multi_window"
invoke-virtual {p0, v11}, Lcom/android/settings/DisplaySettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v11
check-cast v11, Landroid/preference/CheckBoxPreference;
iput-object v11, p0, Lcom/android/settings/DisplaySettings;->mMultiWindowPref:Landroid/preference/CheckBoxPreference;
[B][COLOR="Blue"]const-string v11, "pm_safe_mode"
invoke-virtual {p0, v11}, Lcom/android/settings/DisplaySettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v11
check-cast v11, Landroid/preference/CheckBoxPreference;
iput-object v11, p0, Lcom/android/settings/DisplaySettings;->mSafeModePref:Landroid/preference/CheckBoxPreference;[/COLOR]
[COLOR="Green"]const-string v11, "pm_screenshot"
invoke-virtual {p0, v11}, Lcom/android/settings/DisplaySettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v11
check-cast v11, Landroid/preference/CheckBoxPreference;
iput-object v11, p0, Lcom/android/settings/DisplaySettings;->mScreenShotPref:Landroid/preference/CheckBoxPreference;[/COLOR][/B]
- Now search for the method ".method public onPreferenceTreeClick(Landroid/preference/PreferenceScreen;Landroid/preference/Preference;)Z" and search for ""multi_window_enabled"" to locate this part at the end:
Code:
.line 1021
:cond_15c
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mMultiWindowPref:Landroid/preference/CheckBoxPreference;
invoke-virtual {p2, v0}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, [B][COLOR="Red"]:cond_1c[/COLOR][/B]
.line 1022
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mMultiWindowPref:Landroid/preference/CheckBoxPreference;
invoke-virtual {v0}, Landroid/preference/CheckBoxPreference;->isChecked()Z
move-result v0
.line 1023
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "multi_window_enabled"
if-eqz v0, :cond_177
:goto_172
invoke-static {v3, v4, v1}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
goto/16 :goto_1c
:cond_177
move v1, v2
goto :goto_172
.end method
Add new codes before [.end method] in the previous section, so that section will be like this:
Code:
.line 1021
:cond_15c
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mMultiWindowPref:Landroid/preference/CheckBoxPreference;
invoke-virtual {p2, v0}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, [B][COLOR="Blue"]:cond_SafeM[/COLOR][/B]
.line 1022
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mMultiWindowPref:Landroid/preference/CheckBoxPreference;
invoke-virtual {v0}, Landroid/preference/CheckBoxPreference;->isChecked()Z
move-result v0
.line 1023
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "multi_window_enabled"
if-eqz v0, :cond_177
:goto_172
invoke-static {v3, v4, v1}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
goto/16 :goto_1c
:cond_177
move v1, v2
goto :goto_172
[B][COLOR="Blue"]:cond_SafeM
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mSafeModePref:Landroid/preference/CheckBoxPreference;
invoke-virtual {p2, v0}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_ScSh
.line 1022
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mSafeModePref:Landroid/preference/CheckBoxPreference;
invoke-virtual {v0}, Landroid/preference/CheckBoxPreference;->isChecked()Z
move-result v0
.line 1023
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "pm_safe_mode"
if-eqz v0, :cond_majdiSafe
:goto_njsafe
invoke-static {v3, v4, v1}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
goto/16 :goto_1c
:cond_majdiSafe
move v1, v2
goto :goto_njsafe[/COLOR]
[B][COLOR="Green"]:cond_ScSh
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mScreenShotPref:Landroid/preference/CheckBoxPreference;
invoke-virtual {p2, v0}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, [COLOR="Red"]:cond_1c[/COLOR]
.line 1022
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mScreenShotPref:Landroid/preference/CheckBoxPreference;
invoke-virtual {v0}, Landroid/preference/CheckBoxPreference;->isChecked()Z
move-result v0
.line 1023
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "pm_screenshot"
if-eqz v0, :cond_majdiSS
:goto_njSS
invoke-static {v3, v4, v1}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
goto/16 :goto_1c
:cond_majdiSS
move v1, v2
goto :goto_njSS[/COLOR][/B][/B]
.end method
- Pay attention to the red color condition..!!!
- Now go to the next method ".method public onResume()V" and search for ""multi_window_enabled"" and locate this part:
Code:
:cond_9d
sget-boolean v0, Lcom/android/settings/DisplaySettings;->UseMultiWindow:Z
if-eqz v0, [B][COLOR="Red"]:cond_c1[/COLOR][/B]
.line 847
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mMultiWindowPref:Landroid/preference/CheckBoxPreference;
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "multi_window_enabled"
invoke-static {v3, v4, v1}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v3
if-ne v3, v1, :cond_de
:goto_af
invoke-virtual {v0, v1}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V
.line 848
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v1, "multi_window_enabled"
invoke-static {v1}, Landroid/provider/Settings$System;->getUriFor(Ljava/lang/String;)Landroid/net/Uri;
move-result-object v1
iget-object v3, p0, Lcom/android/settings/DisplaySettings;->mMultiWindowModeObserver:Landroid/database/ContentObserver;
invoke-virtual {v0, v1, v2, v3}, Landroid/content/ContentResolver;->registerContentObserver(Landroid/net/Uri;ZLandroid/database/ContentObserver;)V
line 850
:cond_c1
return-void
:cond_c2
move v0, v2
And do this modification:
Code:
:cond_9d
sget-boolean v0, Lcom/android/settings/DisplaySettings;->UseMultiWindow:Z
if-eqz v0, [B][COLOR="Blue"]:cond_Safemajdi[/COLOR][/B]
.line 847
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mMultiWindowPref:Landroid/preference/CheckBoxPreference;
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "multi_window_enabled"
invoke-static {v3, v4, v1}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v3
if-ne v3, v1, :cond_de
:goto_af
invoke-virtual {v0, v1}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V
.line 848
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v1, "multi_window_enabled"
invoke-static {v1}, Landroid/provider/Settings$System;->getUriFor(Ljava/lang/String;)Landroid/net/Uri;
move-result-object v1
iget-object v3, p0, Lcom/android/settings/DisplaySettings;->mMultiWindowModeObserver:Landroid/database/ContentObserver;
invoke-virtual {v0, v1, v2, v3}, Landroid/content/ContentResolver;->registerContentObserver(Landroid/net/Uri;ZLandroid/database/ContentObserver;)V
[B][COLOR="Blue"].line 1000
:cond_Safemajdi
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mSafeModePref:Landroid/preference/CheckBoxPreference;
if-eqz v0, :cond_NewScSh
.line 1001
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mSafeModePref:Landroid/preference/CheckBoxPreference;
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "pm_safe_mode"
const/4 v1, 0x0
invoke-static {v3, v4, v1}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v3
if-eqz v3, :cond_noSafe
const/4 v1, 0x1
goto :goto_yesSafe
:cond_noSafe
const/4 v1, 0x0
:goto_yesSafe
invoke-virtual {v0, v1}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V[/COLOR]
[COLOR="Green"].line 2000
:cond_NewScSh
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mScreenShotPref:Landroid/preference/CheckBoxPreference;
if-eqz v0, [COLOR="Red"]:cond_c1[/COLOR]
.line 2001
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mScreenShotPref:Landroid/preference/CheckBoxPreference;
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "pm_screenshot"
const/4 v1, 0x0
invoke-static {v3, v4, v1}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v3
if-eqz v3, :cond_noShot
const/4 v1, 0x1
goto :goto_yesShot
:cond_noShot
const/4 v1, 0x0
:goto_yesShot
invoke-virtual {v0, v1}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V[/COLOR][/B]
.line 850
:cond_c1
return-void
:cond_c2
move v0, v2
- Also pay attention to the red color condition..!!!
- Save changes.. and that's all
Result example:
Continue moddings!!
LockScreen Torch
This mod will make you able to have torch flash light while you are on LockScreen by long pressing on the home button...!!!
Credits to:
@ Robbie Hood for the actual mod codes
- Backsmali android.policy.jar
- Navigate to classout/com/android/internal/policy/impl/ folder
- We will be working on 3 smali files:
KeyguardViewMediator$4.smali
- Search for "packed-switch" and add the blue line just above "return-void":
Code:
.line 1255
iget v2, p1, Landroid/os/Message;->what:I
packed-switch v2, :pswitch_data_72
.line 1298
:goto_7
[B][COLOR="Blue"]:pswitch_7[/COLOR][/B]
return-void
.line 1257
- Search for ":catchall" and add these lines above it:
Code:
.line 1295
monitor-exit v1
goto :goto_[B][COLOR="Red"]7[/COLOR][/B]
[B][COLOR="Blue"] :pswitch_6e
iget-object v2, p0, Lcom/android/internal/policy/impl/KeyguardViewMediator$4;->this$0:Lcom/android/internal/policy/impl/KeyguardViewMediator;
iget v3, p1, Landroid/os/Message;->arg1:I
if-eqz v3, :cond_majdi
move v3, v0
:goto_nj
#calls: Lcom/android/internal/policy/impl/KeyguardViewMediator;->handleSetTorch(Z)V
invoke-static {v2, v3}, Lcom/android/internal/policy/impl/KeyguardViewMediator;->access$2400(Lcom/android/internal/policy/impl/KeyguardViewMediator;Z)V
goto :goto_[COLOR="Red"]7[/COLOR]
:cond_majdi
move v3, v1
goto :goto_nj[/COLOR][/B]
:catchall_7b
move-exception v0
monitor-exit v1
N.B: pay attention to number 7 in goto :goto_7 that could be different in your smali according to your ROM, make sure it is the same as the first one which is just above the new line ":pswitch_6e"
Click to expand...
Click to collapse
- Search for "nop" and another "nop" line bellow it (don't forget to leave empty line in between):
Code:
.line 1255
nop
[B][COLOR="Blue"]nop[/COLOR][/B]
- Now go to the end of smali and add these switches above ".end packed-switch" line:
Code:
:pswitch_data_72
.packed-switch 0x1
:pswitch_8
:pswitch_10
:pswitch_16
:pswitch_1c
:pswitch_22
:pswitch_28
:pswitch_2e
:pswitch_38
:pswitch_40
:pswitch_4c
:pswitch_52
:pswitch_58
:pswitch_64
[B][COLOR="Blue"]:pswitch_7
:pswitch_7
:pswitch_7
:pswitch_7
:pswitch_7
:pswitch_7
:pswitch_6e[/COLOR][/B]
.end packed-switch
.end method
N.B: if your smali has :pswitch_7 and :pswitch_6e by default, then use another :pswitch_value for :pswitch_7 and :pswitch_6e. If you do so, then don't forget to change :pswitch_7 and :pswitch_6e value in added codes from the beginning above as well
Click to expand...
Click to collapse
Save changes...
KeyguardViewMediator.smali
- Search for ".field private static final SET_HIDDEN:I = 0xc" and add this line bellow it (the blue one):
Code:
.field private static final SET_HIDDEN:I = 0xc
[B][COLOR="Blue"].field private static final SET_TORCH:I = 0x14[/COLOR][/B]
.field private static final SHOW:I = 0x2
- Search for ".field private mTelephonyManager:Landroid/telephony/TelephonyManager;" and add thses lines bellow it (the blue ones):
Code:
.field private mTelephonyManager:Landroid/telephony/TelephonyManager;
[B][COLOR="Blue"].field private mTorchEnabled:Z
.field private mTorchStateChanged:Z[/COLOR][/B]
.field private mUnlockSoundId:I
- Search for this method ".method public constructor <init>(Landroid/content/Context;Lcom/android/internal/policy/impl/PhoneWindowManager;Landroid/os/LocalPowerManager;)V" and add these lines (the blue ones):
Code:
.method public constructor <init>(Landroid/content/Context;Lcom/android/internal/policy/impl/PhoneWindowManager;Landroid/os/LocalPowerManager;)V
.registers 15
.parameter "context"
.parameter "callback"
.parameter "powerManager"
.prologue
.line 308
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 188
[B][COLOR="Blue"]const/4 v0, 0x1
iput-boolean v0, p0, Lcom/android/internal/policy/impl/KeyguardViewMediator;->mTorchEnabled:Z[/COLOR][/B]
const/4 v0, 0x1
- Search for "const-string v0, "power"" and add these lines above it (the blue lines):
Code:
.line 311
iput-object p3, p0, Lcom/android/internal/policy/impl/KeyguardViewMediator;->mRealPowerManager:Landroid/os/LocalPowerManager;
.line 312
[B][COLOR="Blue"]const/4 v0, 0x0
iput-boolean v0, p0, Lcom/android/internal/policy/impl/KeyguardViewMediator;->mTorchEnabled:Z
const/4 v0, 0x0
iput-boolean v0, p0, Lcom/android/internal/policy/impl/KeyguardViewMediator;->mTorchStateChanged:Z[/COLOR][/B]
const-string v0, "power"
- Search for this method ".method static synthetic access$300(Lcom/android/internal/policy/impl/KeyguardViewMediator;I)V" and add this new method above it:
Code:
.method static synthetic access$2300(Lcom/android/internal/policy/impl/KeyguardViewMediator;Z)V
.registers 2
.parameter "x0"
.parameter "x1"
.prologue
.line 110
invoke-direct {p0, p1}, Lcom/android/internal/policy/impl/KeyguardViewMediator;->handleSetHidden(Z)V
return-void
.end method
[B][COLOR="Blue"].method static synthetic access$[COLOR="Red"]2400[/COLOR](Lcom/android/internal/policy/impl/KeyguardViewMediator;Z)V
.registers 2
invoke-direct {p0, p1}, Lcom/android/internal/policy/impl/KeyguardViewMediator;->handleSetTorch(Z)V
return-void
.end method[/COLOR][/B]
.method static synthetic access$300(Lcom/android/internal/policy/impl/KeyguardViewMediator;I)V
N.B: pay attention to $2400, that is increment to the method above it
Click to expand...
Click to collapse
- Search for the method ".method private handleHide()V" and add this line at end of this method (the blue one) just after "monitor-exit p0":
Code:
.method private handleHide()V
..
..
..
.line 1449
monitor-exit p0
[B][COLOR="Blue"]invoke-direct {p0}, Lcom/android/internal/policy/impl/KeyguardViewMediator;->resetTorchState()V[/COLOR][/B]
goto :goto_18
:catchall_45
move-exception v0
monitor-exit p0
:try_end_47
.catchall {:try_start_1 .. :try_end_47} :catchall_45
throw v0
.end method
.method private handleKeyguardDone(Z)V
- Search for the method ".method private handleNotifyScreenOff()V" and add this line (the blue one) just above "return-void":
Code:
.method private handleNotifyScreenOff()V
.registers 3
.prologue
.line 1597
monitor-enter p0
.line 1598
:try_start_1
const-string v0, "KeyguardViewMediator"
const-string v1, "handleNotifyScreenOff"
invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
.line 1599
iget-object v0, p0, Lcom/android/internal/policy/impl/KeyguardViewMediator;->mKeyguardViewManager:Lcom/android/internal/policy/impl/KeyguardViewManager;
invoke-virtual {v0}, Lcom/android/internal/policy/impl/KeyguardViewManager;->onScreenTurnedOff()V
.line 1600
monitor-exit p0
.line 1601
[B][COLOR="Blue"]invoke-direct {p0}, Lcom/android/internal/policy/impl/KeyguardViewMediator;->resetTorchState()V[/COLOR][/B]
return-void
- Search for the method ".method private handleSetHidden(Z)V" and add this line (the blue one) above the defined condition in the method:
Code:
.method private handleSetHidden(Z)V
.registers 3
.parameter "isHidden"
.prologue
.line 688
monitor-enter p0
.line 689
:try_start_1
iget-boolean v0, p0, Lcom/android/internal/policy/impl/KeyguardViewMediator;->mHidden:Z
if-eq v0, p1, :cond_10
.line 690
iput-boolean p1, p0, Lcom/android/internal/policy/impl/KeyguardViewMediator;->mHidden:Z
.line 691
invoke-direct {p0}, Lcom/android/internal/policy/impl/KeyguardViewMediator;->updateActivityLockScreenState()V
.line 692
invoke-direct {p0}, Lcom/android/internal/policy/impl/KeyguardViewMediator;->adjustUserActivityLocked()V
.line 693
invoke-direct {p0}, Lcom/android/internal/policy/impl/KeyguardViewMediator;->adjustStatusBarLocked()V
.line 695
[B][COLOR="Blue"]invoke-direct {p0}, Lcom/android/internal/policy/impl/KeyguardViewMediator;->resetTorchState()V[/COLOR][/B]
:cond_10
monitor-exit p0
- Search for the method ".method private handleShow()V" and add the following new method above it:
Code:
[B][COLOR="Blue"].method private handleSetTorch(Z)V
.registers 8
const/4 v5, 0x0
const/4 v4, 0x1
:try_start_2
iget-boolean v1, p0, Lcom/android/internal/policy/impl/KeyguardViewMediator;->mTorchStateChanged:Z
if-nez v1, :cond_majdi
iput-boolean v1, p0, Lcom/android/internal/policy/impl/KeyguardViewMediator;->mTorchEnabled:Z
const/4 v1, 0x1
iput-boolean v1, p0, Lcom/android/internal/policy/impl/KeyguardViewMediator;->mTorchStateChanged:Z
:cond_[COLOR="Red"]b[/COLOR]
:goto_[COLOR="Red"]b[/COLOR]
return-void
:cond_majdi
iget-boolean v1, p0, Lcom/android/internal/policy/impl/KeyguardViewMediator;->mTorchEnabled:Z
if-eq v1, p1, :cond_[COLOR="Red"]b[/COLOR]
iput-boolean p1, p0, Lcom/android/internal/policy/impl/KeyguardViewMediator;->mTorchEnabled:Z
new-instance v0, Landroid/content/Intent;
const-string v1, "net.cactii.flash2.TOGGLE_FLASHLIGHT"
invoke-direct {v0, v1}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V
const-string v1, "net.cactii.flash2.EXTRA_DISABLE_NOTIFICATION"
const/4 v2, 0x1
invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Z)Landroid/content/Intent;
iget-object v1, p0, Lcom/android/internal/policy/impl/KeyguardViewMediator;->mContext:Landroid/content/Context;
invoke-virtual {v1, v0}, Landroid/content/Context;->sendBroadcast(Landroid/content/Intent;)V
:try_end_maj
.catch Ljava/lang/Exception; {:try_start_2 .. :try_end_maj} :catch_jdi
goto :goto_[COLOR="Red"]b[/COLOR]
:catch_jdi
move-exception v1
goto :goto_[COLOR="Red"]b[/COLOR]
.end method[/COLOR][/B]
.method private handleShow()V
N.B: pay attention to :cond_b and :goto_b that could be differ according to your ROM where b should be the exact the same first condition in this method ".method public isGlanceViewVisible()Z"
Code:
.method public isGlanceViewVisible()Z
.registers 2
.prologue
.line 666
iget-object v0, p0, Lcom/android/internal/policy/impl/KeyguardViewMediator;->mKeyguardViewManager:Lcom/android/internal/policy/impl/KeyguardViewManager;
if-eqz v0, [B][COLOR="Red"]:cond_b[/COLOR][/B]
.line 667
Click to expand...
Click to collapse
- Search for method ".method private handleShow()V", then search bellow for "Landroid/os/PowerManager$WakeLock;->release()V" and add these lines bellow it (the blue ones):
Code:
.method private handleShow()V
.registers 3
.prologue
.line 1400
monitor-enter p0
.line 1401
:try_start_1
const-string v0, "KeyguardViewMediator"
...
...
...
invoke-virtual {v0}, Landroid/os/PowerManager$WakeLock;->release()V
.line 1419
[B][COLOR="Blue"]const/4 v0, 0x1
iput-boolean v0, p0, Lcom/android/internal/policy/impl/KeyguardViewMediator;->mTorchStateChanged:Z[/COLOR][/B]
monitor-exit p0
- Search for the method ".method private resetStateLocked()V" and add these lines (the blue ones) at the end before "return-void" line:
Code:
.method private resetStateLocked()V
.registers 4
...
...
invoke-virtual {v1, v0}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z
.line 809
[B][COLOR="Blue"]return-void
.end method
.method private resetTorchState()V
.registers 2
iget-boolean v0, p0, Lcom/android/internal/policy/impl/KeyguardViewMediator;->mTorchStateChanged:Z
if-eqz v0, :cond_[COLOR="Red"]8[/COLOR]
const/4 v0, 0x0
invoke-direct {p0, v0}, Lcom/android/internal/policy/impl/KeyguardViewMediator;->handleSetTorch(Z)V
:cond_[COLOR="Red"]8[/COLOR][/COLOR][/B]
return-void
.end method
N.B: pay attention to :cond_8 that could be differ according to your ROM where 8 should be the exact the same first DEFINED condition in this method ".method private playSounds(Z)V"
Code:
.method private playSounds(Z)V
.registers 10
.parameter "locked"
.prologue
const/4 v5, 0x0
const/4 v4, 0x1
.line 1362
iget-boolean v0, p0, Lcom/android/internal/policy/impl/KeyguardViewMediator;->mSuppressNextLockSound:Z
if-eqz v0, :cond_9
.line 1363
iput-boolean v5, p0, Lcom/android/internal/policy/impl/KeyguardViewMediator;->mSuppressNextLockSound:Z
.line 1385
[B][COLOR="Red"]:cond_8[/COLOR][/B]
:goto_8
return-void
Click to expand...
Click to collapse
- Search for the method ".method public verifyUnlock(Landroid/view/WindowManagerPolicy$OnKeyguardExitResult;)V" and add this new method above it (the blue lines):
Code:
[B][COLOR="Blue"].method public setTorch(Z)V
.registers 7
const/16 v4, 0x14
const/4 v3, 0x0
iget-boolean v1, p0, Lcom/android/internal/policy/impl/KeyguardViewMediator;->mScreenOn:Z
if-eqz v1, :cond_newa
iget-object v1, p0, Lcom/android/internal/policy/impl/KeyguardViewMediator;->mHandler:Landroid/os/Handler;
invoke-virtual {v1, v4}, Landroid/os/Handler;->removeMessages(I)V
iget-object v1, p0, Lcom/android/internal/policy/impl/KeyguardViewMediator;->mHandler:Landroid/os/Handler;
if-eqz p1, :cond_newb
const/4 v2, 0x1
:goto_[COLOR="Red"]11[/COLOR]
invoke-virtual {v1, v4, v2, v3}, Landroid/os/Handler;->obtainMessage(III)Landroid/os/Message;
move-result-object v0
iget-object v1, p0, Lcom/android/internal/policy/impl/KeyguardViewMediator;->mHandler:Landroid/os/Handler;
invoke-virtual {v1, v0}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z
:cond_newa
return-void
:cond_newb
move v2, v3
goto :goto_[COLOR="Red"]11[/COLOR]
.end method[/COLOR][/B]
.method public verifyUnlock(Landroid/view/WindowManagerPolicy$OnKeyguardExitResult;)V
N.B: pay attention to :goto_11 that could be differ according to your ROM where 11 should be the exact the same goto action in this method ".method public isInputRestricted()Z"
Code:
.method public isInputRestricted()Z
.registers 2
..
..
[B][COLOR="Red"]:goto_11[/COLOR][/B]
return v0
:cond_12
const/4 v0, 0x0
goto :goto_11
.end method
Click to expand...
Click to collapse
Save changes..
PhoneWindowManager.smali
All changes here, will be in this method ".method public interceptKeyBeforeDispatching(Landroid/view/WindowManagerPolicy$WindowState;Landroid/view/KeyEvent;I)J"; so it is better to know from which part of smali this method starts and ends in order to not touch other methods!!
- First search for the method ".method public interceptKeyBeforeDispatching(Landroid/view/WindowManagerPolicy$WindowState;Landroid/view/KeyEvent;I)J",
- Search for "Lcom/android/internal/policy/impl/PhoneWindowManager;->mHomePressed:Z" and add these lines bellow it (the blue ones):
Code:
.method public interceptKeyBeforeDispatching(Landroid/view/WindowManagerPolicy$WindowState;Landroid/view/KeyEvent;I)J
.registers 56
...
...
...
...
.line 3364
:cond_2ba
if-nez v15, :cond_[B][COLOR="Red"]38c[/COLOR][/B]
.line 3365
move-object/from16 v0, p0
iget-boolean v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHomePressed:Z
[B][COLOR="Blue"]if-eqz v0, :cond_[COLOR="Red"]38c[/COLOR]
const/16 v3, 0x0[/COLOR][/B]
move/from16 v20, v0
N.B: pay attention to if-eqz v0, :cond_38c where the condition number 38c is the same as IF condition above it
Click to expand...
Click to collapse
- Search for this portion (you can search down for ".catch Landroid/os/RemoteException" to locate this portion) and add this line (the blue one):
Code:
.line 3373
invoke-interface/range {v44 .. v44}, Lcom/android/internal/statusbar/IStatusBarService;->cancelPreloadRecentApps()V
:try_end_2dd
.catch Landroid/os/RemoteException; {:try_start_2d4 .. :try_end_2dd} :catch_329
.line 3381
.end local v44 #statusbar:Lcom/android/internal/statusbar/IStatusBarService;
:cond_2dd
:goto_2dd
const/4 v3, 0x0
move-object/from16 v0, p0
iput-boolean v3, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHomePressed:Z
[B][COLOR="Blue"]invoke-virtual/range {p0 .. p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->launchHomeFromHotKey()V[/COLOR][/B]
.line 3382
if-nez v36, :cond_32c
- Search down for "Lcom/android/internal/policy/impl/PhoneWindowManager$HomeKeyDoubleClickConcept;->setHomeDownEventSent()V" and add this new code after defined condition:
Code:
.line 3470
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHomeKeyDoubleClickConcept:Lcom/android/internal/policy/impl/PhoneWindowManager$HomeKeyDoubleClickConcept;
invoke-virtual {v3}, Lcom/android/internal/policy/impl/PhoneWindowManager$HomeKeyDoubleClickConcept;->setHomeDownEventSent()V
.line 3473
:cond_3a6
[B][COLOR="Blue"]new-instance v0, Ljava/io/File;
const-string v1, "/sdcard/Android"
invoke-direct {v0, v1}, Ljava/io/File;-><init>(Ljava/lang/String;)V
invoke-virtual {v0}, Ljava/io/File;->exists()Z
move-result v0
if-eqz v0, :cond_majdi
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mKeyguardMediator:Lcom/android/internal/policy/impl/KeyguardViewMediator;
move-object/from16 v3, v0
invoke-virtual/range {v3 .. v3}, Lcom/android/internal/policy/impl/KeyguardViewMediator;->isShowingAndNotHidden()Z
move-result v3
if-eqz v3, :cond_majdi
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mKeyguardMediator:Lcom/android/internal/policy/impl/KeyguardViewMediator;
move-object/from16 v3, v0
move-object/from16 v0, v3
move v1, v15
invoke-virtual {v0, v1}, Lcom/android/internal/policy/impl/KeyguardViewMediator;->setTorch(Z)V
rem-int/lit8 v3, v41, 0xf
if-nez v3, :cond_majdi
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mKeyguardMediator:Lcom/android/internal/policy/impl/KeyguardViewMediator;
move-object/from16 v3, v0
invoke-virtual/range {v3 .. v3}, Lcom/android/internal/policy/impl/KeyguardViewMediator;->pokeWakelock()V
:cond_majdi[/COLOR][/B]
const-wide/16 v3, 0x0
goto/16 :goto_8f
- Search down for "const/16 v3, 0xbb" (v3 may differ according to ROM) and do the following editing:
before:
Code:
.line 3635
:cond_[B][COLOR="Red"]536[/COLOR][/B] [B][COLOR="Green"]<-- we need to copy bellow condition over it[/COLOR][/B]
const/16 v3, 0xbb
move/from16 v0, v32
if-ne v0, v3, :cond_[B][COLOR="Red"]56f[/COLOR][/B] [B][COLOR="Green"]<-- we need to define new condition[/COLOR][/B]
.line 3637
move-object/from16 v0, p0
after:
Code:
.line 3635
:cond_[B][COLOR="Blue"]56f[/COLOR][/B]
const/16 v3, 0xbb
move/from16 v0, v32
if-ne v0, v3, :cond_[B][COLOR="Blue"]nj[/COLOR][/B]
.line 3637
move-object/from16 v0, p0
- Now we need to redefine mentioned cond_56f (it could be differ according to ROM), search UP for ".catch Landroid/content/ActivityNotFoundException;" and modify the IF-NE condition bellow it:
before:
Code:
.catch Landroid/content/ActivityNotFoundException; {:try_start_4fd .. :try_end_506} :catch_705
.line 3839
.end local v43 #shortcutIntent:Landroid/content/Intent;
:cond_506
:goto_506
const-wide/16 v3, -0x1
goto/16 :goto_8f
.line 3621
.end local v31 #kcm:Landroid/view/KeyCharacterMap;
:cond_50a
const/16 v3, 0x54
move/from16 v0, v32
if-ne v0, v3, [B][COLOR="Red"]:cond_536[/COLOR] [COLOR="Green"]<-- redefine this condition[/COLOR][/B]
.line 3622
if-eqz v15, :cond_522
after:
Code:
.catch Landroid/content/ActivityNotFoundException; {:try_start_4fd .. :try_end_506} :catch_705
.line 3839
.end local v43 #shortcutIntent:Landroid/content/Intent;
:cond_506
:goto_506
const-wide/16 v3, -0x1
goto/16 :goto_8f
.line 3621
.end local v31 #kcm:Landroid/view/KeyCharacterMap;
:cond_50a
const/16 v3, 0x54
move/from16 v0, v32
if-ne v0, v3, [B][COLOR="Blue"]:cond_56f[/COLOR][/B]
.line 3622
if-eqz v15, :cond_522
- Search down for "const/16 v3, 0xdb" (v3 may differ according to ROM) and change the condition value above it to the new condition from above mentioned edited code:
before:
Code:
.line 3654
.end local v16 #e:Landroid/os/RemoteException;
[B][COLOR="Red"]:cond_56f[/COLOR] [COLOR="Green"]<-- change it to the new condition[/COLOR][/B]
const/16 v3, 0xdb
move/from16 v0, v32
if-ne v0, v3, :cond_5a4
after:
Code:
.line 3654
.end local v16 #e:Landroid/os/RemoteException;
[B][COLOR="Blue"]:cond_nj[/COLOR][/B]
const/16 v3, 0xdb
move/from16 v0, v32
if-ne v0, v3, :cond_5a4
Save changes...
Now backsmali classsout folder to get new classes.dex file. Now Open android.policy.jar by WinRAR or 7-zip and drag and drop the new classes.dex file inside it; then push it to your device and fix permissions.
Download Torch.apk from attachment bellow and push it to your device and fix permissions as well... and viola.. lockscreen the device and do long pressing on home button to have torch flash light..:laugh:
Long press menu button to kill app
The original mod is done by maskerwsk, who modifies Mirko_ddd method
Click to expand...
Click to collapse
- Backsmali android.policy.jar
- Navigate to classout/com/android/internal/policy/impl/ folder and open PhoneWindowManager.smali file
- Locate the following code by tracking "mMenuLongPress" and do the following changes:
before:
Code:
.line 1674
new-instance v0, Lcom/android/internal/policy/impl/PhoneWindowManager$[B][COLOR="Red"]9[/COLOR][/B];
invoke-direct {v0, p0}, Lcom/android/internal/policy/impl/PhoneWindowManager$[B][COLOR="Red"]9[/COLOR][/B];-><init>(Lcom/android/internal/policy/impl/PhoneWindowManager;)V
iput-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mMenuLongPress:Ljava/lang/Runnable;
after:
Code:
.line 1674
new-instance v0, Lcom/android/internal/policy/impl/PhoneWindowManager$[B][COLOR="Blue"]KillConcept[/COLOR][/B];
invoke-direct {v0, p0}, Lcom/android/internal/policy/impl/PhoneWindowManager$[B][COLOR="Blue"]KillConcept[/COLOR][/B];-><init>(Lcom/android/internal/policy/impl/PhoneWindowManager;)V
iput-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mMenuLongPress:Ljava/lang/Runnable;
- Save changes.
- Now add this new file (PhoneWindowManager$KillConcept.smali) to classout/com/android/internal/policy/impl/ folder. You can download it from here.
You should make sure that the id in PhoneWindowManager$KillConcept.smali is linked to "permlab_forceBack" id in framework-res.apk public.xml
Click to expand...
Click to collapse
- Now recompile (smali) the classout folder and substitute classes.dex inside android.policy.jar with the new classes.dex file.. now push the modified android.policy.jar to your device and fix permissions to chmod 644.
N.B: To adjust timeout delay, see next tutorial!!
Click to expand...
Click to collapse
Adjust timeout delay across OS
- Backsmali framework.jar
- Navigate to classout/android/view/ folder and open ViewConfiguration.smali
- Search for this method and change RED text value:
Code:
.method public static getGlobalActionKeyTimeout()J
.registers 2
.prologue
.line 669
const-wide/16 v0, [B][COLOR="Red"]0x1f4[/COLOR][/B]
return-wide v0
.end method
As you can see, this hex value means 500; i.e, 0.5 second.. So we will change it to which delay we want:
0xfa = 0.25 second
0x1f4 = 0.5 second (default value)
0x2ee = 0.75 second
0x3e8 = 1 second
0x4e2 = 1.25 second
0x5dc = 1.5 second
0x6d6 = 1.75 second
0x7d0 = 2 second
Click to expand...
Click to collapse
- Compile (smali) framework.jar and push to your device and fix permissions.
Continue moddings!!
Ink effect enabling
This is handy one :crying:
To do this you will need to play with 2 files (android.policy.jar and SecSettings.apk) and lib folder.
Please download ink effect resources with ALL default colors enabled from here.
A. android.policy.jar file:
1. Copy the contents of “to android.policy.jar” folder.
2. Decompile android.policy.jar by backsmali/smali program.
3. Go to classout\com\android\internal\policy\impl\sec\ folder and paste the content of “to android.policy.jar” folder there and accept overwriting.
4. Now compile (smali), the result will be class.dex file. Open the original android.policy.jar by WinRAR and drag drop class.dex file inside android.policy.jar file
N.B: by default, ink will work for both finger and pen as well. If you want it for pen only then inside classout\com\android\internal\policy\impl\sec\ folder open CircleUnlockRippleRenderer.smali and search for "const/16 v2, 0x4002" and change this line:
Code:
const/16 v2, 0x4002
if-ne v[B][COLOR="Red"]2[/COLOR][/B], v2, :cond_94
to
Code:
const/16 v2, 0x4002
if-ne v[B][COLOR="Blue"]1[/COLOR][/B], v2, :cond_94
and save changes.
Click to expand...
Click to collapse
In CircleUnlockRippleRenderer.smali, find 0x1080618 and replace it to id value of "reflectionmap" in public.xml of framework-res.apk
Click to expand...
Click to collapse
Now push the new modified android.policy.jar to system\framework in your phone
B. SecSettings.apk file:
Decompile SecSettings.apk by APK-Multi tool
I. Image resource
Copy all images in “to res.drawable-xhdpi” folder to res\drawable-xhdpi
II. Adding lines to strings.xml resources
1. Go to res\values and open strings.xml by notepad++
2. You should make sure that the following strings are all there; if some missing, please add before </resources> line at the bottom:
Code:
<string name="ink_effect">Ink effect</string>
<string name="inkeffect_help_body">Show ink effect on the lock screen. If a live wallpaper is set on the lock screen, the ink effect will be disabled automatically</string>
<string name="ink_effect_color_none">None</string>
<string name="ink_effect_color_pink">Pink</string>
<string name="ink_effect_color_orange">Orange</string>
<string name="ink_effect_color_green">Green</string>
<string name="ink_effect_color_blue">Blue</string>
<string name="ink_effect_color_navy">Navy</string>
<string name="ink_effect_color_purple">Purple</string>
<string name="ink_effect_color_brown">Brown</string>
<string name="ink_effect_color_lightblue">Light Blue</string>
<string name="ink_effect_color_red">Red</string>
<string name="ink_effect_color_black">Black</string>
3. Now save your file.
III. Adding command line to Lockscreen_settings.xml <!-- if it is not there already
1. Go to \res\xml folder and open lockscreen_settings.xml
2. Add these lines bellow ripple effect line (the blue color lines):
Code:
<CheckBoxPreference android:title="@string/ripple_effect" android:key="ripple_effect" android:summary="@string/ripple_effect_summary" />
[b][color=blue] <PreferenceScreen android:title="@string/ink_effect" android:key="ink_effect">
<intent android:targetPackage="com.android.settings" android:action="android.intent.action.MAIN" android:targetClass="com.android.settings.InkeffectPreview" />
</PreferenceScreen>[/b][/color]
3. Save changes.
NOW you need to recompile your SecSettings.apk!! This is important to generate new id in public.xml files automatically!!
NOW decompile the new SecSettings.apk (be alert not to decompile the old one, it will not include the new changes!!)
You can delete the old SecSettings.apk from project folder to not cause confusion.
Click to expand...
Click to collapse
IV. InkeffectPreview.smali
1. Copy the files InkeffectPreview.smali
2. Go to smali\com\android\settings and paste it there and accept changes.
Now this is the tricky part..!!
3. Open it and go to the following section:
Code:
:array_14
.array-data 0x4
0xb7t 0x3t 0x2t 0x7ft
0xb9t 0x3t 0x2t 0x7ft
0xcet 0x1t 0x2t 0x7ft
0xcat 0x1t 0x2t 0x7ft
0xc6t 0x1t 0x2t 0x7ft
0xcct 0x1t 0x2t 0x7ft
0xd0t 0x1t 0x2t 0x7ft
0xc8t 0x1t 0x2t 0x7ft
0xb5t 0x3t 0x2t 0x7ft
.end array-data
:array_2a
.array-data 0x4
0xb8t 0x3t 0x2t 0x7ft
0xbat 0x3t 0x2t 0x7ft
0xcft 0x1t 0x2t 0x7ft
0xcbt 0x1t 0x2t 0x7ft
0xc7t 0x1t 0x2t 0x7ft
0xcdt 0x1t 0x2t 0x7ft
0xd1t 0x1t 0x2t 0x7ft
0xc9t 0x1t 0x2t 0x7ft
0xb6t 0x3t 0x2t 0x7ft
.end array-data
4. You can see here several numbers... these are [ink_ nameofcolor] ids for array_14 and [ink_ nameofcolor _h] ids for array_2a in public.xml.
5. So you have to open public.xml file from res\values folder
6. Search for colors ids you added… for start search for “ink_none” for array_14 section and “ink_none_h” for array_2a section.
We will start with “ink_none”
The line will be something like this:
Code:
<public type="drawable" name="ink_none" id="0x7f0203b7" />
And if you noticed the array_14 section in InkeffectPreview.smali the first line will represent the ink_none in public.xml file. So we have to convert public.xml ids to array_14, SO PLEASE match to colors here:
Code:
<public type="drawable" name="ink_none" id="[B][COLOR="DarkOrchid"]0x7f[/COLOR][COLOR="DeepSkyBlue"]02[/COLOR][COLOR="Lime"]03[/COLOR][COLOR="Red"]b7[/COLOR][/B]" />
to in array_14 section:
Code:
[B]0x[COLOR="Red"]b7[/COLOR]t 0x[COLOR="Lime"]03[/COLOR]t 0x[COLOR="DeepSkyBlue"]02[/COLOR]t [COLOR="DarkOrchid"]0x7f[/COLOR]t[/B]
Yes that’s it!! Do the same for “ink_none_h” id in array_2a section.
Code:
<public type="drawable" name="ink_none_h" id="[B][COLOR="DarkOrchid"]0x7f[/COLOR][COLOR="DeepSkyBlue"]02[/COLOR][COLOR="Lime"]03[/COLOR][COLOR="Red"]b8[/COLOR][/B]" />
to in array_2a section:
Code:
[B]0x[COLOR="Red"]b8[/COLOR]t 0x[COLOR="Lime"]03[/COLOR]t 0x[COLOR="DeepSkyBlue"]02[/COLOR]t [COLOR="DarkOrchid"]0x7f[/COLOR]t[/B]
N.B: After compiling, number 0 in the left side of value will be ignored!
Click to expand...
Click to collapse
7. Now we have finished editing InkeffectPreview.smali for the two none color ids (ink_none & ink_none_h)
8. Do the same for the rest of colors (the orders of array_14 & array_2a will represent the order of ink colors in your settings menu later on, so it must be in exact order). Also if went down you will see these colors orders as following (None, Pink, Orange, Green, Blue, Navy, Purple, Brown, Light blue, Red, Black) so again you need to keep same order while you are entering ids in array_14 and array_2a... so your arrays should be represented like this (imaginary for learning purpose only):
Code:
:array_14
.array-data 0x4
[B] ink_none
ink_pink
ink_orange
ink_green
ink_blue
ink_navy
ink_purple
ink_brown
ink_lightblue
ink_red
ink_black[/B]
.end array-data
:array_2a
.array-data 0x4
[B] ink_none_h
ink_pink_h
ink_orange_h
ink_green_h
ink_blue_h
ink_navy_h
ink_purple_h
ink_brown_h
ink_lightblue_h
ink_red_h
ink_black_h[/B]
.end array-data
9. We didn't finish yet, you have to link all ids inside InkeffectPreview.smali to correct ids in public.xml file (very annoying!!). Search for all ids inside InkeffectPreview.smali and change them to their corresponding ones inside public.xml. Here is the correct order of ids inside public.xml:
- inkeffect_preview
- ink_effect_color_none
- ink_effect_color_pink
- ink_effect_color_orange
- ink_effect_color_green
- ink_effect_color_blue
- ink_effect_color_navy
- ink_effect_color_purple
- ink_effect_color_brown
- ink_effect_color_lightblue
- ink_effect_color_red
- ink_effect_color_black
- preview_image
- ink_help
- mode_list
- inkeffect_preview_list_item
- button_layout
- inkeffect_menu
- menu_cancel --> (type="string")
- menu_save
- menu_cancel --> (type="id")
Here is example:
You searched for first id in InkeffectPreview.smali (all ids begin with 0x7f) and it was for example (0x7f090514) and you know this should represent "inkeffect_preview" inside public.xml (according to the order above). So now open public.xml and search for "inkeffect_preview", if you find it, it will have an id like (0x7f040072) copy this id and put it instead of that one inside InkeffectPreview.smali and that is it. Do the same for the rest of ids as well.
Pay attention to "menu_cancel" id, it has two variables inside public.xml, type="string" and type="id". So make sure you use the correct one in public.xml for the correct one in InkeffectPreview.smali !!!
10. Now save changes.
V. LockScreenSettings.smali
1. Copy the files LockScreenSettings.smali
2. Go to smali\com\android\settings and paste it there and accept changes.
3. Open it and go to the following section:
Code:
:array_10
.array-data 0x4
0x09t 0xft 0x9t 0x7ft
0x0at 0xft 0x9t 0x7ft
0x4ft 0xdt 0x9t 0x7ft
0x50t 0xdt 0x9t 0x7ft
0x52t 0xdt 0x9t 0x7ft
0x53t 0xdt 0x9t 0x7ft
0x54t 0xdt 0x9t 0x7ft
0x51t 0xdt 0x9t 0x7ft
0x0bt 0xft 0x9t 0x7ft
.end array-data
4. You can see here several numbers... these are [ink_effect_color_nameofcolor] ids in public.xml
5. The first line will represent the “ink_effect_color_none” text in public.xml file. So we have to convert public.xml ids to array_10, SO PLEASE match to colors here:
Code:
<public type="string" name="ink_effect_color_none" id="[B][COLOR="DarkOrchid"]0x7f[/COLOR][COLOR="DeepSkyBlue"]09[/COLOR][COLOR="Lime"]0f[/COLOR][COLOR="Red"]09[/COLOR][/B]" />
to in array_10:
Code:
[B]0x[COLOR="Red"]09[/COLOR]t 0x[COLOR="Lime"]0f[/COLOR]t 0x[COLOR="DeepSkyBlue"]09[/COLOR]t [COLOR="DarkOrchid"]0x7f[/COLOR]t[/B]
6. Now we finish editing LockScreenSettings.smali for the none color ids (ink_effect_color_none) this will represent the text color name in settings menu later on, so make color orders as same as order in InkeffectPreview.smali or you will have wrong color to wrong text color name in settings menu!!
7. Do the same for the rest of colors.
8. Again we haven't finished yet, you have to link all ids inside LockScreenSettings.smali to correct ids in public.xml file (very annoying!!). Search for all ids inside LockScreenSettings.smali and change them to their corresponding ones inside public.xml. Here is the correct order of ids inside public.xml:
- lockscreen_settings
- information_ticker_only_weibo_summary
- ripple_effect_summary
- ripple_effect_second_summary
- wakeup_in_lockscreen_summary_nomotion
- information_ticker_weibo_summary
- information_ticker_facebook_summary
- message_network_unavailable
- motion_camera_short_cut_turn_on_motion
- motion_activation
- dlg_ok
- cancel --> (type="string")
Here is example:
You searched for first id in LockScreenSettings.smali (all ids begin with 0x7f) and it was for example (0x7f09071b) and you know this should represent "lockscreen_settings" inside public.xml (according to the order above). So now open public.xml and search for "lockscreen_settings", if you find it, it will have an id like (0x7f07003a) copy this id and put it instead of that one inside LockScreenSettings.smali and that is it. Do the same for the rest of ids as well.
Pay attention to "cancel" id inside public.xml, the one that we want is with type="string" variable. So make sure you use the correct one in public.xml for the one in LockScreenSettings.smali !!!
9. Now save changes.
NOW we finally finish editing SecSettings.apk. Recompile the finished project and push it to your phone.
C. lib folder
Just copy the content of “to lib folder” to lib folder in system\lib in your phone.
Adding new ink colors
You are not satisfied with ink colors you have, so why you don't create your own!!
Let's start:
I. Image resource
Create new images of two forms [ink_nameofnewcolor.png] and [ink_nameofnewcolor_h.png] for the new color that you want to add and put them inside res\drawable-xhdpi folder.
II. Adding lines to strings.xml resources
1. Open strings.xml file and add new line just before </resources>
Code:
<string name="ink_effect_color_nameofnewcolor">Name of the new color</string>
2. And again you need to recompile your SecSettings.apk to generate new ids in public.xml files automatically!!
THEN decompile the new SecSettings.apk (we will work on this one now, so delete the previous SecSettings.apk project to not cause confusion!!)
III. LockScreenSettings.smali
1. Find the following line:
Code:
const/16 v0, 0x[B]b[/B]
This will represent how many ink colors you have in your ink colors list; here it is b (i.e 11 colors) so we will increase it to c (i.e 12 colors) and the line will be like this:
Code:
const/16 v0, 0x[B]c[/B]
2. Now go to array_10 list and add new array for your new color:
Code:
:array_10
.array-data 0x4
0xact 0x0t 0x9t 0x7ft
0xact 0x0t 0x9t 0x7ft
0xact 0x0t 0x9t 0x7ft
0xact 0x0t 0x9t 0x7ft
0xact 0x0t 0x9t 0x7ft
0xact 0x0t 0x9t 0x7ft
0xact 0x0t 0x9t 0x7ft
0xact 0x0t 0x9t 0x7ft
0xact 0x0t 0x9t 0x7ft
0xact 0x0t 0x9t 0x7ft
0xact 0x0t 0x9t 0x7ft
[B][COLOR="Red"]0xact 0x0t 0x9t 0x7ft[/COLOR][/B] [COLOR="Green"]<!-- New array line[/COLOR]
.end array-data
.end method
3. And as usual link it to "ink_effect_color_nameofnewcolor" id in public.xml
4. Save changes.
IV. InkeffectPreview.smali
1. Find the following line:
Code:
const/16 v1, 0x[B]b[/B]
This will represent how many ink colors you have in your ink colors list; here it is b (i.e 11 colors) so we will increase it to c (i.e 12 colors) and the line will be like this:
Code:
const/16 v1, 0x[B]c[/B]
2. Now go to array_14 list and array_2a and add new array for your new color:
Code:
.line 50
:array_14
.array-data 0x4
0xact 0x1t 0x2t 0x7ft
0xact 0x1t 0x2t 0x7ft
0xact 0x1t 0x2t 0x7ft
0xact 0x1t 0x2t 0x7ft
0xact 0x1t 0x2t 0x7ft
0xact 0x1t 0x2t 0x7ft
0xact 0x1t 0x2t 0x7ft
0xact 0x1t 0x2t 0x7ft
0xact 0x1t 0x2t 0x7ft
0xact 0x1t 0x2t 0x7ft
0xact 0x1t 0x2t 0x7ft
[B][COLOR="Red"]0xact 0x1t 0x2t 0x7ft[/COLOR][/B] [COLOR="Green"]<!-- New array line[/COLOR]
.end array-data
.line 62
:array_2a
.array-data 0x4
0xadt 0x1t 0x2t 0x7ft
0xadt 0x1t 0x2t 0x7ft
0xadt 0x1t 0x2t 0x7ft
0xadt 0x1t 0x2t 0x7ft
0xadt 0x1t 0x2t 0x7ft
0xadt 0x1t 0x2t 0x7ft
0xadt 0x1t 0x2t 0x7ft
0xadt 0x1t 0x2t 0x7ft
0xadt 0x1t 0x2t 0x7ft
0xadt 0x1t 0x2t 0x7ft
0xadt 0x1t 0x2t 0x7ft
[B][COLOR="Red"]0xadt 0x1t 0x2t 0x7ft[/COLOR][/B] [COLOR="Green"]<!-- New array line[/COLOR]
.end array-data
.end method
And as usual link the one in array_14 to "ink_nameofnewcolor" id in public.xml and the one in array_2a to "ink_nameofnewcolor_h" id in public.xml
3. Search down for this line:
Code:
const/16 v2, 0x[B]b[/B]
And yes change b to c to be like this:
Code:
const/16 v2, 0x[B]c[/B]
4. Now we need to add the new color to the list, so search for these lines:
Code:
sget-object v2, Lcom/android/settings/InkeffectPreview;->mInkcolorItem:[Ljava/lang/String;
const/16 v3, 0x[B][COLOR="Red"]a[/COLOR][/B]
invoke-virtual {p0}, Lcom/android/settings/InkeffectPreview;->getResources()Landroid/content/res/Resources;
move-result-object v4
const v5, [B][COLOR="Red"]0x7f090d55[/COLOR][/B]
invoke-virtual {v4, v5}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;
const-string v4, "[B][COLOR="Red"]Black[/COLOR][/B]"
aput-object v4, v2, v3
Copy these lines and paste them again bellow them, and change the red color values above to blue ones:
Code:
sget-object v2, Lcom/android/settings/InkeffectPreview;->mInkcolorItem:[Ljava/lang/String;
const/16 v3, 0x[B][COLOR="Blue"]b[/COLOR][/B] [COLOR="Green"]<!-- Next number in the list[/COLOR]
invoke-virtual {p0}, Lcom/android/settings/InkeffectPreview;->getResources()Landroid/content/res/Resources;
move-result-object v4
const v5, [B][COLOR="Blue"]0x7f??????[/COLOR][/B] [COLOR="Green"]<!-- id of "ink_effect_color_nameofnewcolor" in public.xml[/COLOR]
invoke-virtual {v4, v5}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;
const-string v4, "[B][COLOR="Blue"]Name of the new color[/COLOR][/B]" [COLOR="Green"]<!-- Name of the new color[/COLOR]
aput-object v4, v2, v3
5. Save changes.
V. CircleUnlockRippleRenderer.smali
This file is found in android.policy.jar and it determines the RGB value of the color when rendering.
1. Find the following line:
Code:
const/16 v3, 0x[B]b[/B]
And yes change b to c to be like this:
Code:
const/16 v3, 0x[B]c[/B]
2. Find these lines:
Code:
const/16 v4, 0x[B][COLOR="Red"]a[/COLOR][/B]
new-array v5, v7, [F
fill-array-data v5, :array_[B][COLOR="Red"]26a[/COLOR][/B]
aput-object v5, v3, v4
Copy these lines and paste them again bellow them, and change the red color values above to blue ones:
Code:
const/16 v4, 0x[B][COLOR="Blue"]b[/COLOR][/B] [COLOR="Green"]<!-- Next number in the list
[/COLOR]
new-array v5, v7, [F
fill-array-data v5, :array_[B][COLOR="Blue"]26b[/COLOR][/B] [COLOR="Green"]<!-- Next number in the list[/COLOR]
aput-object v5, v3, v4
3. As we have new array_26b, so we have to make RGB hex code for it. Find ".end method" and add array data above it like this:
Code:
:array_26b [COLOR="Green"]<!-- Our new array[/COLOR]
.array-data 0x4
0x[B][COLOR="Purple"]00[/COLOR][/B]t 0x[B][COLOR="Purple"]00[/COLOR][/B]t 0x[B][COLOR="Purple"]00[/COLOR][/B]t 0x[B][COLOR="Purple"]00[/COLOR][/B]t [COLOR="Green"]<!-- Red value in hex[/COLOR]
0x[B][COLOR="Purple"]00[/COLOR][/B]t 0x[B][COLOR="Purple"]00[/COLOR][/B]t 0x[B][COLOR="Purple"]00[/COLOR][/B]t 0x[B][COLOR="Purple"]00[/COLOR][/B]t [COLOR="Green"]<!-- Green value in hex[/COLOR]
0x[B][COLOR="Purple"]00[/COLOR][/B]t 0x[B][COLOR="Purple"]00[/COLOR][/B]t 0x[B][COLOR="Purple"]00[/COLOR][/B]t 0x[B][COLOR="Purple"]00[/COLOR][/B]t [COLOR="Green"]<!-- Blue value in hex[/COLOR]
.end array-data
.end method
You need to change these values to their RGB Hex, Hex, Hex coding; but how!!
You need first to have RGB in decimal value (0-255) by using photoshop for example; then convert it to float value by dividing your decimal value on 255, then use IEEE floating point calculator (for Windows) to convert the result to hex.
Example:
You open your photoshop and choose this color values (light blue):
Here R=0, G=159, B=180
For R=0, we need to divide it on 255, the result will be 0
For G=159, we need to divide it on 255, the result will be about 0.62353
For B=180, we need to divide it on 255, the result will be about 0.70588
Now open IEEE floating point calculator and enter these numbers to convert them to hex
So..
For R:
For G:
For B:
So if we return back to our array_26b the result will be like this:
Code:
:array_26b
.array-data 0x4
0x[B][COLOR="Purple"]00[/COLOR][/B]t 0x[B][COLOR="Purple"]00[/COLOR][/B]t 0x[B][COLOR="Purple"]00[/COLOR][/B]t 0x[B][COLOR="Purple"]00[/COLOR][/B]t [COLOR="Green"]<!-- Red value in hex[/COLOR]
0x[B][COLOR="Purple"]a9[/COLOR][/B]t 0x[B][COLOR="Purple"]9f[/COLOR][/B]t 0x[B][COLOR="Purple"]1f[/COLOR][/B]t 0x[B][COLOR="Purple"]3f[/COLOR][/B]t [COLOR="Green"]<!-- Green value in hex[/COLOR]
0x[B][COLOR="Purple"]8d[/COLOR][/B]t 0x[B][COLOR="Purple"]b4[/COLOR][/B]t 0x[B][COLOR="Purple"]34[/COLOR][/B]t 0x[B][COLOR="Purple"]3f[/COLOR][/B]t [COLOR="Green"]<!-- Blue value in hex[/COLOR]
.end array-data
.end method
And viola we finished!!
4. Save changes.
Now recompile both SecSettings.apk and android.policy.jar and push them to your device
Integrating application in settings menu
This really handy one.. so take care!!
In this tutorial, we will add USB-Mode program to Settings menu as an example
On your PC
1) Decompile SecSettings.apk.
2) Decompile the program that you want to add to settings menu (USB-Mode)
3) Go to \res\drawable-xhdpi folder and add icon for your program that you want to add (you can take it from decompiled wanted program (USBMode folder).
4) Go to \res\values folder and open strings.xml by NotePad++ and add these lines just before </resources> for your program
Code:
<string name="gloryromaddons">GloryROM Addons</string>
<string name="usbswitcher_text">USB mode switcher</string>
Here change “gloryromaddons” with any thing you want to show as a header in the Settings menu. “usbswitcher_text” is your wanted program
5) Go to \res\xml folder and open settings_headers.xml by NotePad++ and add these lines (the place you put these lines will be the place where added program will be displayed in Settings menu)
Code:
<header android:title="@string/gloryromaddons" />
<header android:icon="@drawable/usbswitcher" android:title="@string/usbswitcher_text">
<intent android:targetPackage="in.zatta.USB_switch" android:action="android.intent.action.MAIN" android:targetClass="in.zatta.USB_switch.USB_switcherActivity" />
</header>
The first line reflect the header title in settings menu (So gloryromaddons will be seen as “GloryROM Addons” in the phone, see strings.xml that we edited and you will figure it out!!)
The 2nd line is for added program:
android:[email protected]/name of icon you put in drawable-xhdpi folder (here we put usbswitcher as the icon name inside drawable-xhdpi)
android:[email protected]/name of string put for added program in strings.xml (here we put usbswitcher_text as in strings.xml)
The 3rd line is the functionality and is the most difficult one:
android:targetPackage=package of wanted program inside its own AndroidManifest.xml (here it is “in.zatta.USB_switch”)
android:action=first action of wanted program inside its own AndroidManifest.xml (here it is “android.intent.action.MAIN”)
androidtargetClass= android:targetPackage.Activity (we have android:targetPackage from previous step but we need also .Activity how to get it??) This is the tricky one so do the following:
On your phone:
install the program you want to add (USB mode switcher) and ADW launcher from Google play and make ADW launcher as your phone launcher. Find a blank area on your homescreen(s), long press, then select custom shortcut --> pick your activity --> activities --> browse down until you find USB switcher app and expand with the arrow on the left of USB switcher, you will see several activities (some may have only one). The first one in the list is usually its opening class; it is in between the ( )'s. In this example it is .USB_switcherActivity
Go back to your PC:
So now androidtargetClass= android:targetPackage.Activity will be:
androidtargetClass= in.zatta.USB_switch.USB_switcherActivity
Another way to get targetPackage and activity is here; credits to apurvapatel
Click to expand...
Click to collapse
6) Now compile SecSettings and push it to your phone.
Additional step:
If you want to hide this app from applications drawer do the followings:
1) Decompile your desired app (here USB-Mode.apk)
2) Go to AndroidManifest.xml file and open it by NotePad++
3) Delete this line :
Code:
<category android:name="android.intent.category.LAUNCHER" />
4) Compile your app as non system apk and sign it then push it to your phone
Results example:
Continue moddings!!
Reserved
CSC features
Reserved
Continue moddings!!
Notification panel extra toggles - the original way (Airplane, Torch, AllShareCast, WiFiHotSpot)
In this tutorial, we will be working with 3 files; SystemUI.apk, SecSettings.apk and SecSettingsProvider.apk
First download the View attachment 2362446 file.
SystemUI.apk:
Here we will put all missing resources for Torch toggle (other resources for Airplane and AllShareCast are already exist).
- Decompile SystemUI.apk
- Go to res\drawable-xhdpi folder and add new image resources [tw_quick_panel_icon_flashlight_off.png] and [tw_quick_panel_icon_flashlight_on.png].
- Go to res\values folder and open strings.xml and add this line resource:
Code:
<string name="quickpanel_flashlight_text">Torch</string>
- Now compile SystemUI.apk, then decompile the newly compiled SystemUI.apk again (this is to generate new ids from new resources in public.xml).
- In the new decompiled SystemUI.apk, go to res\values and open public.xml and locate these lines:
Code:
<public type="string" name="quickpanel_flashlight_text" id="0x7f0a01b7" />
<public type="drawable" name="tw_quick_panel_icon_flashlight_on" id="0x7f02033d" />
<public type="drawable" name="tw_quick_panel_icon_flashlight_off" id="0x7f02033c" />
You might get different ids, just use what is in your public.xml..!!
- Leave public.xml opened
- Copy FlashlightQuickSettingButton.smali from resource file to smali\com\android\systemui\statusbar\policy\quicksetting folder
- Open FlashlightQuickSettingButton.smali and change the 3 ids that starts with 0x7f?????? with new ids generated in public.xml in the following orders:
Code:
.method public constructor <init>(Landroid/content/Context;)V
.locals 9
.prologue
const/4 v6, 0x0
.line 35
const/4 v2, 0x0
const v3, [B][COLOR="Red"]0x7f0a01b7[/COLOR] [COLOR="Green"]<!-- id of quickpanel_flashlight_text[/COLOR][/B]
const v4, [B][COLOR="Red"]0x7f02033d[/COLOR] [COLOR="Green"]<!-- id of tw_quick_panel_icon_flashlight_on[/COLOR][/B]
const v5, [B][COLOR="Red"]0x7f02033c[/COLOR] [COLOR="Green"]<!-- id of tw_quick_panel_icon_flashlight_off[/COLOR][/B]
move-object v0, p0
- Save changes.. and that's all for SystemUI.apk.. Compile.
SecSettings.apk:
We will also add the missing resources only..!!
- Decompile SecSettings.apk
- Go to res\drawable-xhdpi folder and add new image resources [notification_panel_airplane.png] and [notification_panel_flashlight.png]
- Go to res\values folder and add these line resources to strings.xml:
Code:
<string name="notification_panel_airplane">Airplane Mode</string>
<string name="notification_panel_flashlight">Torch</string>
- Go to smali\com\android\settings folder and open NotificationPanel.smali file.
- Search for the method ".method public MakeConvertPanelName()V" and add the blue lines (make sure to match all registers v and p according to your smali):
Code:
.method public MakeConvertPanelName()V
.registers 4
.prologue
.line 119
iget-object [B][COLOR="Red"]v0, p0[/COLOR][/B], Lcom/android/settings/NotificationPanel;->mConvertPanelItemstring:Ljava/util/HashMap;
const-string [B][COLOR="Red"]v1[/COLOR][/B], "Wifi"
const-string [B][COLOR="Red"]v2[/COLOR][/B], "notification_panel_wifi"
invoke-virtual {[B][COLOR="Red"]v0, v1, v2[/COLOR][/B]}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
...
...
.line 137
iget-object [B][COLOR="Red"]v0, p0[/COLOR][/B], Lcom/android/settings/NotificationPanel;->mConvertPanelItemstring:Ljava/util/HashMap;
const-string [B][COLOR="Red"]v1[/COLOR][/B], "Sync"
const-string [B][COLOR="Red"]v2[/COLOR][/B], "notification_panel_sync"
invoke-virtual {[B][COLOR="Red"]v0, v1, v2[/COLOR][/B]}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
[B][COLOR="RoyalBlue"] # Airplane patch start
iget-object v0, p0, Lcom/android/settings/NotificationPanel;->mConvertPanelItemstring:Ljava/util/HashMap;
const-string v1, "AirplaneMode"
const-string v2, "notification_panel_airplane"
invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
# End
# Torch patch start
iget-object v0, p0, Lcom/android/settings/NotificationPanel;->mConvertPanelItemstring:Ljava/util/HashMap;
const-string v1, "Flashlight"
const-string v2, "notification_panel_flashlight"
invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
# End[/COLOR][/B]
.line 138
iget-object v0, p0, Lcom/android/settings/NotificationPanel;->mConvertPanelItemstring:Ljava/util/HashMap;
const-string v1, "Empty"
const-string v2, "notification_panel_empty"
invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
.line 139
iget-object [B][COLOR="Red"]v0, p0[/COLOR][/B], Lcom/android/settings/NotificationPanel;->mConvertPanelItemstring:Ljava/util/HashMap;
const-string [B][COLOR="Red"]v1[/COLOR][/B], "notification_panel_wifi"
const-string [B][COLOR="Red"]v2[/COLOR][/B], "Wifi"
invoke-virtual {[B][COLOR="Red"]v0, v1, v2[/COLOR][/B]}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
...
...
.line 157
iget-object [B][COLOR="Red"]v0, p0[/COLOR][/B], Lcom/android/settings/NotificationPanel;->mConvertPanelItemstring:Ljava/util/HashMap;
const-string [B][COLOR="Red"]v1[/COLOR][/B], "notification_panel_sync"
const-string [B][COLOR="Red"]v2[/COLOR][/B], "Sync"
invoke-virtual {[B][COLOR="Red"]v0, v1, v2[/COLOR][/B]}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
[B][COLOR="RoyalBlue"] # Airplane patch start
iget-object v0, p0, Lcom/android/settings/NotificationPanel;->mConvertPanelItemstring:Ljava/util/HashMap;
const-string v1, "notification_panel_airplane"
const-string v2, "AirplaneMode"
invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
# End
# Torch patch start
iget-object v0, p0, Lcom/android/settings/NotificationPanel;->mConvertPanelItemstring:Ljava/util/HashMap;
const-string v1, "notification_panel_flashlight"
const-string v2, "Flashlight"
invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
# End[/COLOR][/B]
.line 158
iget-object v0, p0, Lcom/android/settings/NotificationPanel;->mConvertPanelItemstring:Ljava/util/HashMap;
const-string v1, "notification_panel_empty"
const-string v2, "Empty"
invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- Go to smali\com\android\settings folder and open WirelessSettings.smali
- In the method ".method public onCreate(Landroid/os/Bundle;)V", locate this part and delete or comment out the red line:
Code:
.line 525
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/settings/WirelessSettings;->mMediaShareCategory:Landroid/preference/PreferenceCategory;
move-object/from16 v23, v0
const-string v24, "allshare_cast_settings"
move-object/from16 v0, p0
move-object/from16 v1, v24
invoke-virtual {v0, v1}, Lcom/android/settings/WirelessSettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v24
[B][COLOR="Red"]invoke-virtual/range {v23 .. v24}, Landroid/preference/PreferenceCategory;->removePreference(Landroid/preference/Preference;)Z[/COLOR][/B]
This will show AllShareCast tab in Settings -> More settings menu under Media share category but it will not functioned yet..!!
- Now we need to add smali resources for AllShareCast.. Go to res\values and open public.xml and keep it opened, we will use it later.
- Now copy the entire folder resource [wfd] in smali\com\android\settings\ folder
- Now the funny part begins, inside [wfd] folder, open WfdHelpActivity.smali, WfdPickerActivity.smali and WfdPickerDialog.smali and change all ids that start with 0x7f with ids in public.xml. To make this easy, I wrote a comment beside each id to which it must be referred to in public.xml, example:
Code:
const v3, 0x7f090392 [B][COLOR="Green"]#wifi_p2p_scan_title[/COLOR][/B]
In this example, you need to see what is the id in public.xml for wifi_p2p_scan_title and then put it instead of 0x7f090392
- Save changes and compile.
- Now open the new compiled SecSettings.apk by WinRAR or 7-zip and go to res folder and drop out the raw folder in your computer then drop it back and set compression method to STORE.. see picture
and that's all for SecSettings.apk.
SecSettingsProvider.apk:
- Decompile SecSettingsProvider.apk
- Go to res\values and open strings.xml and add this new database to this string id (the blue):
Code:
<string name="def_candidate_notification_list_q1">DrivingMode;SmartStay;[B][COLOR="RoyalBlue"]AirplaneMode;Flashlight;AllShareCast;[/COLOR][/B]</string>
- That's all for SecSettingsProvider.apk,,
Finally, push all 3 modified apks and Torch.apk from resource file to your phone,, fix permissions (644) and reboot. After booting complete, open titanium backup --> manipulate data --> wipe data for user & system app --> delete the data of settings storage, then reboot for the new database in settings.db to load.
If you don't have titanium backup, then you need to do full data wipe.!!
If you want to implement WiFi Hot Spot, see this post here by @tkari4:
http://forum.xda-developers.com/showpost.php?p=47690448&postcount=610
Click to expand...
Click to collapse
Thanks to:
@shoman94 and @jeboo who introduce this mod first.
@tkari4 for doing most of AllShareCast porting from Note 2 and WiFi HotSpot
@Goldie: for his idea of using titanium backup instead of full wipe to load the new database and for his valuable advices.
Create CSC features controller tab in settings menu
I already wrote a long tutorial for that here..
http://forum.xda-developers.com/showthread.php?p=47872809#post47872809
Disable TW UI and enable AOSP UI
A great guide by @mr.harsh in this post here:
http://forum.xda-developers.com/showpost.php?p=48152116&postcount=678
This mod is still under development. If you are interested helping @mr.harsh to kill all bugs, please give some of your valuable constructive advices for editing
Continue moddings!!
Reservd
Continue moddings!!
Reserved
Continue moddings!!
Reserved
CSC features
<< This post and next post are dedicated to CSC Features that can be enabled in GT-N7000 >>
★ Enabled CSC Features ★
General how to:
In your phone, go to /system/csc folder and open others.xml or feature.xml (depending on your firmware) and add the new csc feature line anywhere after <FeatureSet> and before </FeatureSet> then reboot the phone for changes to take effect.
Template example:
Code:
[B][COLOR="Red"]<FeatureSet>[/COLOR][/B]
<CscFeature_XXX>TRUE</CscFeature_XXX>
[B][COLOR="Red"]</FeatureSet>[/COLOR][/B]
Adding Call Button to Contacts and Logs
Code:
<CscFeature_Contact_EnableCallButtonInList>TRUE</CscFeature_Contact_EnableCallButtonInList>
Results example:
Call and message block
Code:
<CscFeature_Setting_EnableMenuBlockCallMsg>TRUE</CscFeature_Setting_EnableMenuBlockCallMsg>
Results example:
Factory data reset password
Code:
<CscFeature_Setting_EnableFactoryResetPasswordWhenNoSIM>TRUE</CscFeature_Setting_EnableFactoryResetPasswordWhenNoSIM>
Results example:
About device extra and hiding displays
Display installed variant:
Code:
<CscFeature_Common_EnableRegionalDevice>TRUE</CscFeature_Common_EnableRegionalDevice>
Display hardware version:
Code:
<CscFeature_Setting_EnableHwVersionDisplay>TRUE</CscFeature_Setting_EnableHwVersionDisplay>
Hide Update Software option:
Code:
<CscFeature_Setting_DisableMenuSoftwareUpdate>TRUE</CscFeature_Setting_DisableMenuSoftwareUpdate>
Results example:
Enabling Folder view in message app
Code:
<CscFeature_Message_EnableFolderView>TRUE</CscFeature_Message_EnableFolderView>
Results example:
Enabling Callback number in message app
Code:
<CscFeature_Message_EnableSmsCallbackNumber>TRUE</CscFeature_Message_EnableSmsCallbackNumber>
Results example:
Disable Page Rotation in TW Launcher
Code:
<CscFeature_Launcher_DisablePageRotation>TRUE</CscFeature_Launcher_DisablePageRotation>
Results example:
Disable Tilt Effect in TW Launcher
Code:
<CscFeature_Launcher_DisableTiltEffect>TRUE</CscFeature_Launcher_DisableTiltEffect>
Results example:
Enable Home Screen Edit Mode in TW Launcher
Code:
<CscFeature_Launcher_HomeScreenEditMode>TRUE</CscFeature_Launcher_HomeScreenEditMode>
Results example:
Change Day Color in SPlanner widget
Code:
<CscFeature_Calendar_SetColorOfDays>XXXXRBX</CscFeature_Calendar_SetColorOfDays>
N.B:
Here X means no change, R means red and B means blue. The order is same as days of week.
Click to expand...
Click to collapse
Results example:
Adding Exit button in default web browser
Code:
<CscFeature_Web_AddOptionToTerminate>TRUE</CscFeature_Web_AddOptionToTerminate>
Results example:
Adding Home button in default web browser
Code:
<CscFeature_Web_EnableHomepageOption>TRUE</CscFeature_Web_EnableHomepageOption>
Results example:
Adding Version info in default web browser
Code:
<CscFeature_Web_ShowVersionInSetting>TRUE</CscFeature_Web_ShowVersionInSetting>
Results example:
Desktop view by default in default web browser
Code:
<CscFeature_Web_EnableDesktopSiteAsDefault>TRUE</CscFeature_Web_EnableDesktopSiteAsDefault>
Results example:
Enable prompt to exit in default web browser
Code:
<CscFeature_Web_EnablePromptToExit>TRUE</CscFeature_Web_EnablePromptToExit>
Results example:
Enable Camera Shutter Sound menu
Thanks to @danivancouver for contributing..
Code:
<CscFeature_Camera_ShutterSoundMenu>TRUE</CscFeature_Camera_ShutterSoundMenu>
Results example:
Excellent
Great summary! I am sure there is more to come and add in near future for you
Nicely done !!
honestly i like the way you have put things together here, everything in order sorted as it should be. and of course understandable for any human being (the one who doesn't understand has a PROBLEM with me) hehe :laugh:
as eybee said more to come for sure there are still many mods to be done there is another one you can write in here (not 100% functional but works) the SecBrowser (MaxTab mod) you can add this to your list, for a professional way it needs by far more GFX but i have no intention of doing that still you can use it to get rid of that 16 max limit.
another thing the lockscreen has another approach to enable it this one is still clean the other requires deleting a line as it's similar to SmartRotation trick
last thing i promise XD the SecPhone mode you can enable the ExtraVolume feature too by going to the CallFeature.smali as soon as you are there you will know what i mean :good:
Good Luck
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
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>
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>
[COLOR="Blue"]</resources>[/COLOR]
- Settings.apk\res\values\ids.xml
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>
[COLOR="Blue"]</resources>[/COLOR]
- Settings.apk\res\values\strings.xml
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>
[COLOR="Blue"]</resources>[/COLOR]
- Settings.apk\res\xml\display_settings.xml
put this line
Code:
[COLOR="Red"]<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" />[/COLOR]
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">
[COLOR="Red"]<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" />[/COLOR]
<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>
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 :
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??????" />
Pay attention to this 0x7f?????? !!!
- Settings.apk\smali\net\margaritov\preference\colorpicker\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??????" />
do it too to all lines below, in the smali
2. const v2, 0x7f0708ed
Code:
<public type="string" name="adi_dialog_color_picker" id="0x7f??????" />
3. const v2, 0x7f0a0233
Code:
<public type="id" name="adi_color_picker_view" id="0x7f??????" />
4. const v2, 0x7f0a0234
Code:
<public type="id" name="adi_old_color_panel" id="0x7f??????" />
5. const v2, 0x7f0a0235
Code:
<public type="id" name="adi_new_color_panel" id="0x7f??????" />
6. const v2, 0x7f0a0236
Code:
<public type="id" name="adi_hex" id="0x7f??????" />
7. const v2, 0x7f0a0237
Code:
<public type="id" name="adi_enter" id="0x7f??????" />
8. const v2, 0x7f0a0238
Code:
<public type="id" name="adi_ics_color" id="0x7f??????" />
9. const v1, 0x7f0a0235
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??????" />
do it too to all lines below, in the smali
2. const v3, 0x7f0a023a
Code:
<public type="id" name="monitor_box_adi" id="0x7f??????" />
3. const v3, 0x7f0a023b
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??????" />
do it too to all lines below, in the smali
2. const v0, 0x7f0708ec
Code:
<public type="string" name="adi_notification_background_default_wallpaper" id="0x7f??????" />
3. const v0, 0x7f0708eb
Code:
<public type="string" name="adi_notification_background_custom_image" id="0x7f??????" />
4. const v0, 0x7f0708ea
Code:
<public type="string" name="adi_notification_background_color_fill" id="0x7f??????" />
5. const v0, 0x7f0708eb
Code:
<public type="string" name="adi_notification_background_custom_image" id="0x7f??????" />
6. const v4, 0x7f05005c
Code:
<public type="xml" name="adi_notification_drawer_style" id="0x7f??????" />
7. const v18, 0x7f0708f5
Code:
<public type="string" name="adi_choose_color_title" id="0x7f??????" />
8. const v18, 0x7f0708a6
Code:
<public type="string" name="ok" id="0x7f??????" />
9. const v18, 0x7f0700ec
Code:
<public type="string" name="cancel" id="0x7f??????" />
- Done and recompile it, push to you system/app, or system/priv-app
CyanogenMod 10 only !
SystemUI.apk
CyanogenMod 10/JB 4.1.2
- Decompile your CM-10 SystemUI.apk
Download attached file and merge to your decompiled SystemUI.apk
- SystemUI.apk\res\layout\status_bar_expanded_header.xml
change this :
Code:
<LinearLayout android:gravity="center_vertical" android:orientation="horizontal" [COLOR="Red"]android:background="@drawable/notification_header_bg"[/COLOR] android:layout_width="fill_parent" android:layout_height="wrap_content" android:baselineAligned="false"
to like this :
Code:
<LinearLayout android:gravity="center_vertical" android:orientation="horizontal" [COLOR="Red"]android:background="#ff000000"[/COLOR] android:layout_width="fill_parent" android:layout_height="wrap_content" android:baselineAligned="false"
- SystemUI.apk\res\layout\status_bar_expanded.xml
add the red line
Code:
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout android:id="@id/notification_panel" android:background="@drawable/notification_panel_bg" android:paddingTop="@dimen/notification_panel_padding_top" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginLeft="@dimen/notification_panel_margin_left"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
[COLOR="Red"]<com.android.systemui.statusbar.phone.NotificationWallpaper android:id="@id/notification_wallpaper" android:layout_width="fill_parent" android:layout_height="fill_parent" />[/COLOR]
<TextView android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Network" android:gravity="center" android:layout_gravity="bottom" android:id="@id/carrier_label" android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="@dimen/carrier_label_height" android:layout_marginBottom="@dimen/close_handle_height" />
<LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginBottom="@dimen/close_handle_underlap">
<include android:layout_width="fill_parent" android:layout_height="@dimen/notification_panel_header_height" layout="@layout/status_bar_expanded_header" />
<com.android.systemui.statusbar.powerwidget.PowerWidget android:id="@id/exp_power_stat" android:layout_width="fill_parent" android:layout_height="@dimen/notification_panel_widget_height" />
<TextView android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Network.EmergencyOnly" android:gravity="center" android:id="@id/emergency_calls_only" android:paddingBottom="4.0dip" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="wrap_content" />
<ScrollView android:id="@id/scroll" android:fadingEdge="none" android:layout_width="fill_parent" android:layout_height="fill_parent" android:overScrollMode="always">
<com.android.systemui.statusbar.policy.NotificationRowLayout android:id="@id/latestItems" android:layout_width="fill_parent" android:layout_height="wrap_content" systemui:rowHeight="@dimen/notification_row_min_height" />
</ScrollView>
</LinearLayout>
<com.android.systemui.statusbar.phone.CloseDragHandle android:layout_gravity="bottom" android:orientation="vertical" android:id="@id/close" android:layout_width="fill_parent" android:layout_height="@dimen/close_handle_height">
<ImageView android:layout_gravity="bottom" android:layout_width="fill_parent" android:layout_height="@dimen/close_handle_height" android:src="@drawable/status_bar_close" android:scaleType="fitXY" />
</com.android.systemui.statusbar.phone.CloseDragHandle>
</FrameLayout>
- SystemUI.apk\res\values\ids.xml
add this line to end of it before </resources>
Code:
[COLOR="Red"]<item type="id" name="notification_wallpaper">false</item>[/COLOR]
[COLOR="Blue"]</resources>[/COLOR]
- SystemUI.apk\res\values\public.xml
seacrh for this line
Code:
<public type="drawable" name="notification_panel_bg" id="0x7f??????" />
and pay attention to 0x7f??????
- SystemUI.apk\smali\com\android\systemui\statusbar\phone\PhoneStatusBar.smali
add the red line
Code:
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
[COLOR="Red"]Lcom/android/systemui/statusbar/phone/PhoneStatusBar$AdiObserver;,[/COLOR]
Lcom/android/systemui/statusbar/phone/PhoneStatusBar$FastColorDrawable;,
Lcom/android/systemui/statusbar/phone/PhoneStatusBar$MyTicker;,
Lcom/android/systemui/statusbar/phone/PhoneStatusBar$H;,
Lcom/android/systemui/statusbar/phone/PhoneStatusBar$SettingsObserver;
Code:
new-instance v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$29;
invoke-direct {v0, p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$29;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)V
iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStartTracing:Ljava/lang/Runnable;
.line 2759
new-instance v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$30;
invoke-direct {v0, p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$30;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)V
iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStopTracing:Ljava/lang/Runnable;
.line 2847
return-void
.end method
[COLOR="Red"].method static synthetic access$98000(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)V
.locals 0
.parameter "x0"
.prologue
.line 125
invoke-direct {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setNotificationsTransparency()V
return-void
.end method
.method static synthetic access$99000(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)V
.locals 0
.parameter "x0"
.prologue
.line 125
invoke-direct {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setNotificationWallpaperHelper()V
return-void
.end method[/COLOR]
.method static synthetic access$000(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;I)V
.locals 0
.parameter "x0"
.parameter "x1"
.prologue
.line 116
invoke-direct {p0, p1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->adjustBrightness(I)V
return-void
.end method
Code:
.method private loadNotificationShade()V
.locals 12
.prologue
.line 1009
iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPile:Lcom/android/systemui/statusbar/policy/NotificationRowLayout;
if-nez v10, :cond_0
.line 1044
:goto_0
return-void
.line 1011
:cond_0
iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNotificationData:Lcom/android/systemui/statusbar/NotificationData;
invoke-virtual {v10}, Lcom/android/systemui/statusbar/NotificationData;->size()I
move-result v0
.line 1013
.local v0, N:I
new-instance v8, Ljava/util/ArrayList;
invoke-direct {v8}, Ljava/util/ArrayList;-><init>()V
.line 1015
.local v8, toShow:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Landroid/view/View;>;"
invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->isDeviceProvisioned()Z
move-result v5
.line 1017
.local v5, provisioned:Z
const/4 v3, 0x0
.local v3, i:I
:goto_1
if-ge v3, v0, :cond_3
.line 1018
iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNotificationData:Lcom/android/systemui/statusbar/NotificationData;
sub-int v11, v0, v3
add-int/lit8 v11, v11, -0x1
invoke-virtual {v10, v11}, Lcom/android/systemui/statusbar/NotificationData;->get(I)Lcom/android/systemui/statusbar/NotificationData$Entry;
move-result-object v2
.line 1019
.local v2, ent:Lcom/android/systemui/statusbar/NotificationData$Entry;
if-nez v5, :cond_1
iget-object v10, v2, Lcom/android/systemui/statusbar/NotificationData$Entry;->notification:Lcom/android/internal/statusbar/StatusBarNotification;
invoke-virtual {p0, v10}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->showNotificationEvenIfUnprovisioned(Lcom/android/internal/statusbar/StatusBarNotification;)Z
move-result v10
if-eqz v10, :cond_2
.line 1020
:cond_1
iget-object v10, v2, Lcom/android/systemui/statusbar/NotificationData$Entry;->row:Landroid/view/View;
invoke-virtual {v8, v10}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
.line 1017
:cond_2
add-int/lit8 v3, v3, 0x1
goto :goto_1
.line 1024
.end local v2 #ent:Lcom/android/systemui/statusbar/NotificationData$Entry;
:cond_3
new-instance v7, Ljava/util/ArrayList;
invoke-direct {v7}, Ljava/util/ArrayList;-><init>()V
.line 1025
.local v7, toRemove:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Landroid/view/View;>;"
const/4 v3, 0x0
:goto_2
iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPile:Lcom/android/systemui/statusbar/policy/NotificationRowLayout;
invoke-virtual {v10}, Lcom/android/systemui/statusbar/policy/NotificationRowLayout;->getChildCount()I
move-result v10
if-ge v3, v10, :cond_5
.line 1026
iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPile:Lcom/android/systemui/statusbar/policy/NotificationRowLayout;
invoke-virtual {v10, v3}, Lcom/android/systemui/statusbar/policy/NotificationRowLayout;->getChildAt(I)Landroid/view/View;
move-result-object v1
.line 1027
.local v1, child:Landroid/view/View;
invoke-virtual {v8, v1}, Ljava/util/ArrayList;->contains(Ljava/lang/Object;)Z
move-result v10
if-nez v10, :cond_4
.line 1028
invoke-virtual {v7, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
.line 1025
:cond_4
add-int/lit8 v3, v3, 0x1
goto :goto_2
.line 1032
.end local v1 #child:Landroid/view/View;
:cond_5
invoke-virtual {v7}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;
move-result-object v4
.local v4, i$:Ljava/util/Iterator;
:goto_3
invoke-interface {v4}, Ljava/util/Iterator;->hasNext()Z
move-result v10
if-eqz v10, :cond_6
invoke-interface {v4}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v6
check-cast v6, Landroid/view/View;
.line 1033
.local v6, remove:Landroid/view/View;
iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPile:Lcom/android/systemui/statusbar/policy/NotificationRowLayout;
invoke-virtual {v10, v6}, Lcom/android/systemui/statusbar/policy/NotificationRowLayout;->removeView(Landroid/view/View;)V
goto :goto_3
.line 1036
.end local v6 #remove:Landroid/view/View;
:cond_6
[COLOR="Red"]invoke-direct {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setNotificationsTransparency()V[/COLOR]
const/4 v3, 0x0
:goto_4
invoke-virtual {v8}, Ljava/util/ArrayList;->size()I
move-result v10
if-ge v3, v10, :cond_8
.line 1037
invoke-virtual {v8, v3}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
move-result-object v9
check-cast v9, Landroid/view/View;
.line 1038
.local v9, v:Landroid/view/View;
invoke-virtual {v9}, Landroid/view/View;->getParent()Landroid/view/ViewParent;
move-result-object v10
if-nez v10, :cond_7
.line 1039
iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPile:Lcom/android/systemui/statusbar/policy/NotificationRowLayout;
invoke-virtual {v10, v9, v3}, Lcom/android/systemui/statusbar/policy/NotificationRowLayout;->addView(Landroid/view/View;I)V
.line 1036
:cond_7
add-int/lit8 v3, v3, 0x1
goto :goto_4
.line 1043
.end local v9 #v:Landroid/view/View;
:cond_8
iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mSettingsButton:Landroid/view/View;
invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->isDeviceProvisioned()Z
move-result v11
invoke-virtual {v10, v11}, Landroid/view/View;->setEnabled(Z)V
goto/16 :goto_0
.end method
Code:
.method private setIntruderAlertVisibility(Z)V
.locals 0
.parameter "vis"
.prologue
.line 2569
return-void
.end method
[COLOR="Red"].method private setNotificationWallpaperHelper()V
.locals 5
.prologue
.line 2948
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;
invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v1, "notif_wallpaper_alpha"
const/4 v2, 0x0
invoke-static {v0, v1, v2}, Landroid/provider/Settings$System;->getFloat(Landroid/content/ContentResolver;Ljava/lang/String;F)F
move-result v0
.line 2949
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;
invoke-virtual {v1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
const-string v2, "notification_background"
invoke-static {v1, v2}, Landroid/provider/Settings$System;->getString(Landroid/content/ContentResolver;Ljava/lang/String;)Ljava/lang/String;
move-result-object v1
.line 2950
new-instance v2, Ljava/io/File;
const-string v3, "/data/data/com.android.settings/files/notification_wallpaper.jpg"
invoke-direct {v2, v3}, Ljava/io/File;-><init>(Ljava/lang/String;)V
.line 2951
iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNotificationPanel:Landroid/view/View;
const/4 v4, 0x0
invoke-virtual {v3, v4}, Landroid/view/View;->setBackgroundResource(I)V
.line 2952
invoke-virtual {v2}, Ljava/io/File;->exists()Z
move-result v2
if-nez v2, :cond_1
.line 2953
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNotificationPanel:Landroid/view/View;
const v3, [COLOR="Blue"]0x7f02004d[/COLOR]
invoke-virtual {v2, v3}, Landroid/view/View;->setBackgroundResource(I)V
.line 2954
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNotificationPanel:Landroid/view/View;
invoke-virtual {v2}, Landroid/view/View;->getBackground()Landroid/graphics/drawable/Drawable;
move-result-object v2
.line 2955
if-eqz v1, :cond_0
invoke-virtual {v1}, Ljava/lang/String;->isEmpty()Z
move-result v3
if-nez v3, :cond_0
.line 2956
const/4 v3, 0x0
invoke-virtual {v2, v3}, Landroid/graphics/drawable/Drawable;->setColorFilter(Landroid/graphics/ColorFilter;)V
.line 2957
invoke-static {v1}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I
move-result v1
sget-object v3, Landroid/graphics/PorterDuff$Mode;->SRC_ATOP:Landroid/graphics/PorterDuff$Mode;
invoke-virtual {v2, v1, v3}, Landroid/graphics/drawable/Drawable;->setColorFilter(ILandroid/graphics/PorterDuff$Mode;)V
.line 2959
:cond_0
const/high16 v1, 0x3f80
sub-float v0, v1, v0
const/high16 v1, 0x437f
mul-float/2addr v0, v1
float-to-int v0, v0
invoke-virtual {v2, v0}, Landroid/graphics/drawable/Drawable;->setAlpha(I)V
.line 2961
:cond_1
return-void
.end method
.method private setNotificationsTransparency()V
.locals 8
.prologue
const/high16 v7, 0x437f
const/high16 v6, 0x3f80
.line 2965
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;
invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v1, "notif_alpha"
const/4 v2, 0x0
invoke-static {v0, v1, v2}, Landroid/provider/Settings$System;->getFloat(Landroid/content/ContentResolver;Ljava/lang/String;F)F
move-result v1
.line 2966
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPile:Lcom/android/systemui/statusbar/policy/NotificationRowLayout;
if-eqz v0, :cond_2
.line 2967
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNotificationData:Lcom/android/systemui/statusbar/NotificationData;
invoke-virtual {v0}, Lcom/android/systemui/statusbar/NotificationData;->size()I
move-result v2
.line 2968
const/4 v0, 0x0
:goto_0
if-ge v0, v2, :cond_2
.line 2969
iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNotificationData:Lcom/android/systemui/statusbar/NotificationData;
sub-int v4, v2, v0
add-int/lit8 v4, v4, -0x1
invoke-virtual {v3, v4}, Lcom/android/systemui/statusbar/NotificationData;->get(I)Lcom/android/systemui/statusbar/NotificationData$Entry;
move-result-object v3
.line 2970
iget-object v4, v3, Lcom/android/systemui/statusbar/NotificationData$Entry;->expanded:Landroid/view/View;
.line 2971
if-eqz v4, :cond_0
invoke-virtual {v4}, Landroid/view/View;->getBackground()Landroid/graphics/drawable/Drawable;
move-result-object v5
if-eqz v5, :cond_0
invoke-virtual {v4}, Landroid/view/View;->getBackground()Landroid/graphics/drawable/Drawable;
move-result-object v4
sub-float v5, v6, v1
mul-float/2addr v5, v7
float-to-int v5, v5
invoke-virtual {v4, v5}, Landroid/graphics/drawable/Drawable;->setAlpha(I)V
.line 2972
:cond_0
invoke-virtual {v3}, Lcom/android/systemui/statusbar/NotificationData$Entry;->getLargeView()Landroid/view/View;
move-result-object v3
.line 2973
if-eqz v3, :cond_1
invoke-virtual {v3}, Landroid/view/View;->getBackground()Landroid/graphics/drawable/Drawable;
move-result-object v4
if-eqz v4, :cond_1
invoke-virtual {v3}, Landroid/view/View;->getBackground()Landroid/graphics/drawable/Drawable;
move-result-object v3
sub-float v4, v6, v1
mul-float/2addr v4, v7
float-to-int v4, v4
invoke-virtual {v3, v4}, Landroid/graphics/drawable/Drawable;->setAlpha(I)V
.line 2968
:cond_1
add-int/lit8 v0, v0, 0x1
goto :goto_0
.line 2976
:cond_2
return-void
.end method[/COLOR]
.method private setPileLayers(I)V
.locals 14
.parameter "layerType"
.prologue
.line 1593
iget-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPile:Lcom/android/systemui/statusbar/policy/NotificationRowLayout;
invoke-virtual {v9}, Lcom/android/systemui/statusbar/policy/NotificationRowLayout;->getChildCount()I
move-result v2
.line 1595
.local v2, count:I
packed-switch p1, :pswitch_data_0
change this 0x7f02004d, according to the value you got in your own public.aml
<public type="drawable" name="notification_panel_bg" id="0x7f??????" />
Code:
const-string v1, "android.intent.action.CLOSE_SYSTEM_DIALOGS"
invoke-virtual {v0, v1}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V
.line 655
const-string v1, "android.intent.action.SCREEN_OFF"
invoke-virtual {v0, v1}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V
.line 656
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBroadcastReceiver:Landroid/content/BroadcastReceiver;
invoke-virtual {v3, v1, v0}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
.line 658
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/android/systemui/statusbar/powerwidget/PowerWidget;
invoke-virtual {v0}, Lcom/android/systemui/statusbar/powerwidget/PowerWidget;->setupWidget()V
[COLOR="Red"]new-instance v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$AdiObserver;
new-instance v1, Landroid/os/Handler;
invoke-direct {v1}, Landroid/os/Handler;-><init>()V
invoke-direct {v0, p0, v1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$AdiObserver;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;Landroid/os/Handler;)V
invoke-virtual {v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$AdiObserver;->observe()V[/COLOR]
.line 660
invoke-static {}, Landroid/view/VelocityTracker;->obtain()Landroid/view/VelocityTracker;
move-result-object v0
iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mVelocityTracker:Landroid/view/VelocityTracker;
.line 662
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
- -SystemUI.apk\smali\com\android\systemui\statusbar\phone\PhoneStatusBar$FastColorDrawable.smali
change the red line
Code:
# virtual methods
.method public draw(Landroid/graphics/Canvas;)V
.locals 2
.parameter "canvas"
.prologue
.line 2856
[COLOR="Red"]iget v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$FastColorDrawable;->mColor:I[/COLOR]
sget-object v1, Landroid/graphics/PorterDuff$Mode;->SRC:Landroid/graphics/PorterDuff$Mode;
invoke-virtual {p1, v0, v1}, Landroid/graphics/Canvas;->drawColor(ILandroid/graphics/PorterDuff$Mode;)V
.line 2857
return-void
.end method
to like this
Code:
# virtual methods
.method public draw(Landroid/graphics/Canvas;)V
.locals 2
.parameter "canvas"
.prologue
.line 2856
[COLOR="Red"]const v0, -0x28000000[/COLOR]
sget-object v1, Landroid/graphics/PorterDuff$Mode;->SRC:Landroid/graphics/PorterDuff$Mode;
invoke-virtual {p1, v0, v1}, Landroid/graphics/Canvas;->drawColor(ILandroid/graphics/PorterDuff$Mode;)V
.line 2857
return-void
.end method
- Done and recompile your SystemUI.apk, push to system/app
CyanogenMod 10.1/10.2/11
SystemUI.apk
Cyanogenmod CM10.1/JB 4.2, CM10.2/JB.4.3, CM11/KK
- Decompile your CM10.1/CM10.2/CM11 SystemUI.apk
- Download attached file and merge to your decompiled SystemUI.apk
- SystemUI.apk\res\layout\status_bar_expanded.xml
add the red line
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.statusbar.phone.NotificationPanelView android:id="@id/notification_panel" android:background="@drawable/notification_panel_bg" android:paddingTop="@dimen/notification_panel_padding_top" android:layout_width="0.0dip" android:layout_height="wrap_content" android:layout_marginLeft="@dimen/notification_panel_margin_left"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
[COLOR="Red"]<com.android.systemui.statusbar.phone.NotificationWallpaper android:id="@id/notification_wallpaper" android:layout_width="fill_parent" android:layout_height="fill_parent" />[/COLOR]
<View android:id="@id/handle" android:background="@drawable/status_bar_close" android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="@dimen/close_handle_height" />
<include android:layout_gravity="bottom" android:layout_width="fill_parent" android:layout_height="@dimen/carrier_label_height" android:layout_marginBottom="@dimen/close_handle_height" layout="@layout/carrier_label" />
- SystemUI.apk\res\values\ids.xml
add this line to end of it before </resources>
Code:
[COLOR="Red"]<item type="id" name="notification_wallpaper">false</item>[/COLOR]
[COLOR="Blue"]</resources>[/COLOR]
- SystemUI.apk\res\values\public.xml
seacrh for this line
Code:
<public type="drawable" name="notification_panel_bg" id="0x7f??????" />
and pay attention to 0x7f??????
- SystemUI.apk\smali\com\android\systemui\statusbar\phone\PhoneStatusBar.smali
add the red line
Code:
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
[COLOR="Red"]Lcom/android/systemui/statusbar/phone/PhoneStatusBar$AdiObserver;,[/COLOR]
Lcom/android/systemui/statusbar/phone/PhoneStatusBar$TilesChangedObserver;,
Lcom/android/systemui/statusbar/phone/PhoneStatusBar$MyTicker;,
Lcom/android/systemui/statusbar/phone/PhoneStatusBar$H;,
Lcom/android/systemui/statusbar/phone/PhoneStatusBar$SettingsObserver;
Code:
new-instance v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$32;
invoke-direct {v0, p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$32;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)V
iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStartTracing:Ljava/lang/Runnable;
.line 2902
new-instance v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$33;
invoke-direct {v0, p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$33;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)V
iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStopTracing:Ljava/lang/Runnable;
.line 2963
return-void
.end method
[COLOR="Red"].method static synthetic access$98000(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)V
.locals 0
.parameter "x0"
.prologue
.line 125
invoke-direct {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setNotificationsTransparency()V
return-void
.end method
.method static synthetic access$99000(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)V
.locals 0
.parameter "x0"
.prologue
.line 125
invoke-direct {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setNotificationWallpaperHelper()V
return-void
.end method[/COLOR]
.method static synthetic access$000(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;I)V
.locals 0
.parameter "x0"
.parameter "x1"
.prologue
.line 116
invoke-direct {p0, p1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->adjustBrightness(I)V
return-void
.end method
Code:
.method private loadNotificationShade()V
.locals 12
.prologue
.line 1138
iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPile:Lcom/android/systemui/statusbar/policy/NotificationRowLayout;
if-nez v10, :cond_1
.line 1175
:cond_0
:goto_0
return-void
.line 1140
:cond_1
iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNotificationData:Lcom/android/systemui/statusbar/NotificationData;
invoke-virtual {v10}, Lcom/android/systemui/statusbar/NotificationData;->size()I
move-result v0
.line 1142
.local v0, N:I
new-instance v8, Ljava/util/ArrayList;
invoke-direct {v8}, Ljava/util/ArrayList;-><init>()V
.line 1144
.local v8, toShow:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Landroid/view/View;>;"
invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->isDeviceProvisioned()Z
move-result v5
.line 1146
.local v5, provisioned:Z
const/4 v3, 0x0
.local v3, i:I
:goto_1
if-ge v3, v0, :cond_4
.line 1147
iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNotificationData:Lcom/android/systemui/statusbar/NotificationData;
sub-int v11, v0, v3
add-int/lit8 v11, v11, -0x1
invoke-virtual {v10, v11}, Lcom/android/systemui/statusbar/NotificationData;->get(I)Lcom/android/systemui/statusbar/NotificationData$Entry;
move-result-object v2
.line 1148
.local v2, ent:Lcom/android/systemui/statusbar/NotificationData$Entry;
if-nez v5, :cond_3
iget-object v10, v2, Lcom/android/systemui/statusbar/NotificationData$Entry;->notification:Lcom/android/internal/statusbar/StatusBarNotification;
invoke-virtual {p0, v10}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->showNotificationEvenIfUnprovisioned(Lcom/android/internal/statusbar/StatusBarNotification;)Z
move-result v10
if-nez v10, :cond_3
.line 1146
:cond_2
:goto_2
add-int/lit8 v3, v3, 0x1
goto :goto_1
.line 1149
:cond_3
iget-object v10, v2, Lcom/android/systemui/statusbar/NotificationData$Entry;->notification:Lcom/android/internal/statusbar/StatusBarNotification;
invoke-virtual {p0, v10}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->notificationIsForCurrentUser(Lcom/android/internal/statusbar/StatusBarNotification;)Z
move-result v10
if-eqz v10, :cond_2
.line 1150
iget-object v10, v2, Lcom/android/systemui/statusbar/NotificationData$Entry;->row:Landroid/view/View;
invoke-virtual {v8, v10}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
goto :goto_2
.line 1153
.end local v2 #ent:Lcom/android/systemui/statusbar/NotificationData$Entry;
:cond_4
new-instance v7, Ljava/util/ArrayList;
invoke-direct {v7}, Ljava/util/ArrayList;-><init>()V
.line 1154
.local v7, toRemove:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Landroid/view/View;>;"
const/4 v3, 0x0
:goto_3
iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPile:Lcom/android/systemui/statusbar/policy/NotificationRowLayout;
invoke-virtual {v10}, Lcom/android/systemui/statusbar/policy/NotificationRowLayout;->getChildCount()I
move-result v10
if-ge v3, v10, :cond_6
.line 1155
iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPile:Lcom/android/systemui/statusbar/policy/NotificationRowLayout;
invoke-virtual {v10, v3}, Lcom/android/systemui/statusbar/policy/NotificationRowLayout;->getChildAt(I)Landroid/view/View;
move-result-object v1
.line 1156
.local v1, child:Landroid/view/View;
invoke-virtual {v8, v1}, Ljava/util/ArrayList;->contains(Ljava/lang/Object;)Z
move-result v10
if-nez v10, :cond_5
.line 1157
invoke-virtual {v7, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
.line 1154
:cond_5
add-int/lit8 v3, v3, 0x1
goto :goto_3
.line 1161
.end local v1 #child:Landroid/view/View;
:cond_6
invoke-virtual {v7}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;
move-result-object v4
.local v4, i$:Ljava/util/Iterator;
:goto_4
invoke-interface {v4}, Ljava/util/Iterator;->hasNext()Z
move-result v10
if-eqz v10, :cond_7
invoke-interface {v4}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v6
check-cast v6, Landroid/view/View;
.line 1162
.local v6, remove:Landroid/view/View;
iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPile:Lcom/android/systemui/statusbar/policy/NotificationRowLayout;
invoke-virtual {v10, v6}, Lcom/android/systemui/statusbar/policy/NotificationRowLayout;->removeView(Landroid/view/View;)V
goto :goto_4
.line 1165
.end local v6 #remove:Landroid/view/View;
:cond_7
[COLOR="Red"]invoke-direct {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setNotificationsTransparency()V[/COLOR]
const/4 v3, 0x0
:goto_5
invoke-virtual {v8}, Ljava/util/ArrayList;->size()I
move-result v10
if-ge v3, v10, :cond_9
.line 1166
invoke-virtual {v8, v3}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
move-result-object v9
check-cast v9, Landroid/view/View;
.line 1167
.local v9, v:Landroid/view/View;
invoke-virtual {v9}, Landroid/view/View;->getParent()Landroid/view/ViewParent;
move-result-object v10
if-nez v10, :cond_8
.line 1168
iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPile:Lcom/android/systemui/statusbar/policy/NotificationRowLayout;
invoke-virtual {v10, v9, v3}, Lcom/android/systemui/statusbar/policy/NotificationRowLayout;->addView(Landroid/view/View;I)V
.line 1165
:cond_8
add-int/lit8 v3, v3, 0x1
goto :goto_5
.line 1172
.end local v9 #v:Landroid/view/View;
:cond_9
iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mSettingsButton:Landroid/widget/ImageView;
if-eqz v10, :cond_0
.line 1173
iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mSettingsButton:Landroid/widget/ImageView;
invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->isDeviceProvisioned()Z
move-result v11
invoke-virtual {v10, v11}, Landroid/widget/ImageView;->setEnabled(Z)V
goto/16 :goto_0
.end method
Code:
.method private setIntruderAlertVisibility(Z)V
.locals 0
.parameter "vis"
.prologue
.line 2711
return-void
.end method
[COLOR="Red"].method private setNotificationsTransparency()V
.locals 8
.prologue
const/high16 v7, 0x437f
const/high16 v6, 0x3f80
.line 3216
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;
invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v1, "notif_alpha"
const/4 v2, 0x0
invoke-static {v0, v1, v2}, Landroid/provider/Settings$System;->getFloat(Landroid/content/ContentResolver;Ljava/lang/String;F)F
move-result v1
.line 3217
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPile:Lcom/android/systemui/statusbar/policy/NotificationRowLayout;
if-eqz v0, :cond_2
.line 3218
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNotificationData:Lcom/android/systemui/statusbar/NotificationData;
invoke-virtual {v0}, Lcom/android/systemui/statusbar/NotificationData;->size()I
move-result v2
.line 3219
const/4 v0, 0x0
:goto_0
if-ge v0, v2, :cond_2
.line 3220
iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNotificationData:Lcom/android/systemui/statusbar/NotificationData;
sub-int v4, v2, v0
add-int/lit8 v4, v4, -0x1
invoke-virtual {v3, v4}, Lcom/android/systemui/statusbar/NotificationData;->get(I)Lcom/android/systemui/statusbar/NotificationData$Entry;
move-result-object v3
.line 3221
iget-object v4, v3, Lcom/android/systemui/statusbar/NotificationData$Entry;->expanded:Landroid/view/View;
.line 3222
if-eqz v4, :cond_0
invoke-virtual {v4}, Landroid/view/View;->getBackground()Landroid/graphics/drawable/Drawable;
move-result-object v5
if-eqz v5, :cond_0
invoke-virtual {v4}, Landroid/view/View;->getBackground()Landroid/graphics/drawable/Drawable;
move-result-object v4
sub-float v5, v6, v1
mul-float/2addr v5, v7
float-to-int v5, v5
invoke-virtual {v4, v5}, Landroid/graphics/drawable/Drawable;->setAlpha(I)V
.line 3223
:cond_0
invoke-virtual {v3}, Lcom/android/systemui/statusbar/NotificationData$Entry;->getLargeView()Landroid/view/View;
move-result-object v3
.line 3224
if-eqz v3, :cond_1
invoke-virtual {v3}, Landroid/view/View;->getBackground()Landroid/graphics/drawable/Drawable;
move-result-object v4
if-eqz v4, :cond_1
invoke-virtual {v3}, Landroid/view/View;->getBackground()Landroid/graphics/drawable/Drawable;
move-result-object v3
sub-float v4, v6, v1
mul-float/2addr v4, v7
float-to-int v4, v4
invoke-virtual {v3, v4}, Landroid/graphics/drawable/Drawable;->setAlpha(I)V
.line 3219
:cond_1
add-int/lit8 v0, v0, 0x1
goto :goto_0
.line 3227
:cond_2
return-void
.end method
.method private setNotificationWallpaperHelper()V
.locals 6
.prologue
const/4 v5, 0x0
.line 3200
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;
invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v1, "notif_wallpaper_alpha"
const v2, 0x3dcccccd
invoke-static {v0, v1, v2}, Landroid/provider/Settings$System;->getFloat(Landroid/content/ContentResolver;Ljava/lang/String;F)F
move-result v0
.line 3201
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;
invoke-virtual {v1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
const-string v2, "notification_background"
invoke-static {v1, v2}, Landroid/provider/Settings$System;->getString(Landroid/content/ContentResolver;Ljava/lang/String;)Ljava/lang/String;
move-result-object v1
.line 3202
new-instance v2, Ljava/io/File;
const-string v3, "/data/data/com.android.settings/files/notification_wallpaper.jpg"
invoke-direct {v2, v3}, Ljava/io/File;-><init>(Ljava/lang/String;)V
.line 3203
iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNotificationPanel:Lcom/android/systemui/statusbar/phone/NotificationPanelView;
invoke-virtual {v3, v5}, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->setBackgroundResource(I)V
.line 3204
iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNotificationPanel:Lcom/android/systemui/statusbar/phone/NotificationPanelView;
const v4, [COLOR="Blue"]0x7f02012d[/COLOR]
invoke-virtual {v3, v4}, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->setBackgroundResource(I)V
.line 3205
iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNotificationPanel:Lcom/android/systemui/statusbar/phone/NotificationPanelView;
invoke-virtual {v3}, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->getBackground()Landroid/graphics/drawable/Drawable;
move-result-object v3
.line 3206
invoke-virtual {v3, v5}, Landroid/graphics/drawable/Drawable;->setAlpha(I)V
.line 3207
invoke-virtual {v2}, Ljava/io/File;->exists()Z
move-result v2
if-nez v2, :cond_1
.line 3208
if-eqz v1, :cond_0
invoke-virtual {v1}, Ljava/lang/String;->isEmpty()Z
move-result v2
if-nez v2, :cond_0
.line 3209
invoke-static {v1}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I
move-result v1
sget-object v2, Landroid/graphics/PorterDuff$Mode;->SRC_ATOP:Landroid/graphics/PorterDuff$Mode;
invoke-virtual {v3, v1, v2}, Landroid/graphics/drawable/Drawable;->setColorFilter(ILandroid/graphics/PorterDuff$Mode;)V
.line 3211
:cond_0
const/high16 v1, 0x3f80
sub-float v0, v1, v0
const/high16 v1, 0x437f
mul-float/2addr v0, v1
float-to-int v0, v0
invoke-virtual {v3, v0}, Landroid/graphics/drawable/Drawable;->setAlpha(I)V
.line 3213
:cond_1
return-void
.end method[/COLOR]
.method private setStatusBarLowProfile(Z)V
.locals 18
.parameter
.prologue
.line 2153
move-object/from16 v0, p0
iget-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mLightsOutAnimation:Landroid/animation/Animator;
if-nez v1, :cond_6
.line 2154
move-object/from16 v0, p0
iget-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
or for CyanogenMod 11
Code:
const-string v1, "user_setup_complete"
invoke-static {v1}, Landroid/provider/Settings$Secure;->getUriFor(Ljava/lang/String;)Landroid/net/Uri;
move-result-object v1
const/4 v2, 0x1
iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mUserSetupObserver:Landroid/database/ContentObserver;
iget v4, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mCurrentUserId:I
invoke-virtual {v0, v1, v2, v3, v4}, Landroid/content/ContentResolver;->registerContentObserver(Landroid/net/Uri;ZLandroid/database/ContentObserver;I)V
.line 3105
return-void
.end method
[COLOR="Red"].method private setNotificationsTransparency()V
.locals 8
.prologue
const/high16 v7, 0x437f
const/high16 v6, 0x3f80
.line 3216
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;
invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v1, "notif_alpha"
const/4 v2, 0x0
invoke-static {v0, v1, v2}, Landroid/provider/Settings$System;->getFloat(Landroid/content/ContentResolver;Ljava/lang/String;F)F
move-result v1
.line 3217
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPile:Lcom/android/systemui/statusbar/policy/NotificationRowLayout;
if-eqz v0, :cond_2
.line 3218
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNotificationData:Lcom/android/systemui/statusbar/NotificationData;
invoke-virtual {v0}, Lcom/android/systemui/statusbar/NotificationData;->size()I
move-result v2
.line 3219
const/4 v0, 0x0
:goto_0
if-ge v0, v2, :cond_2
.line 3220
iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNotificationData:Lcom/android/systemui/statusbar/NotificationData;
sub-int v4, v2, v0
add-int/lit8 v4, v4, -0x1
invoke-virtual {v3, v4}, Lcom/android/systemui/statusbar/NotificationData;->get(I)Lcom/android/systemui/statusbar/NotificationData$Entry;
move-result-object v3
.line 3221
iget-object v4, v3, Lcom/android/systemui/statusbar/NotificationData$Entry;->expanded:Landroid/view/View;
.line 3222
if-eqz v4, :cond_0
invoke-virtual {v4}, Landroid/view/View;->getBackground()Landroid/graphics/drawable/Drawable;
move-result-object v5
if-eqz v5, :cond_0
invoke-virtual {v4}, Landroid/view/View;->getBackground()Landroid/graphics/drawable/Drawable;
move-result-object v4
sub-float v5, v6, v1
mul-float/2addr v5, v7
float-to-int v5, v5
invoke-virtual {v4, v5}, Landroid/graphics/drawable/Drawable;->setAlpha(I)V
.line 3223
:cond_0
invoke-virtual {v3}, Lcom/android/systemui/statusbar/NotificationData$Entry;->getLargeView()Landroid/view/View;
move-result-object v3
.line 3224
if-eqz v3, :cond_1
invoke-virtual {v3}, Landroid/view/View;->getBackground()Landroid/graphics/drawable/Drawable;
move-result-object v4
if-eqz v4, :cond_1
invoke-virtual {v3}, Landroid/view/View;->getBackground()Landroid/graphics/drawable/Drawable;
move-result-object v3
sub-float v4, v6, v1
mul-float/2addr v4, v7
float-to-int v4, v4
invoke-virtual {v3, v4}, Landroid/graphics/drawable/Drawable;->setAlpha(I)V
.line 3219
:cond_1
add-int/lit8 v0, v0, 0x1
goto :goto_0
.line 3227
:cond_2
return-void
.end method
.method private setNotificationWallpaperHelper()V
.locals 6
.prologue
const/4 v5, 0x0
.line 3200
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;
invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v1, "notif_wallpaper_alpha"
const v2, 0x3dcccccd
invoke-static {v0, v1, v2}, Landroid/provider/Settings$System;->getFloat(Landroid/content/ContentResolver;Ljava/lang/String;F)F
move-result v0
.line 3201
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;
invoke-virtual {v1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
const-string v2, "notification_background"
invoke-static {v1, v2}, Landroid/provider/Settings$System;->getString(Landroid/content/ContentResolver;Ljava/lang/String;)Ljava/lang/String;
move-result-object v1
.line 3202
new-instance v2, Ljava/io/File;
const-string v3, "/data/data/com.android.settings/files/notification_wallpaper.jpg"
invoke-direct {v2, v3}, Ljava/io/File;-><init>(Ljava/lang/String;)V
.line 3203
iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNotificationPanel:Lcom/android/systemui/statusbar/phone/NotificationPanelView;
invoke-virtual {v3, v5}, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->setBackgroundResource(I)V
.line 3204
iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNotificationPanel:Lcom/android/systemui/statusbar/phone/NotificationPanelView;
const v4, [COLOR="Blue"]0x7f02012d[/COLOR]
invoke-virtual {v3, v4}, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->setBackgroundResource(I)V
.line 3205
iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNotificationPanel:Lcom/android/systemui/statusbar/phone/NotificationPanelView;
invoke-virtual {v3}, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->getBackground()Landroid/graphics/drawable/Drawable;
move-result-object v3
.line 3206
invoke-virtual {v3, v5}, Landroid/graphics/drawable/Drawable;->setAlpha(I)V
.line 3207
invoke-virtual {v2}, Ljava/io/File;->exists()Z
move-result v2
if-nez v2, :cond_1
.line 3208
if-eqz v1, :cond_0
invoke-virtual {v1}, Ljava/lang/String;->isEmpty()Z
move-result v2
if-nez v2, :cond_0
.line 3209
invoke-static {v1}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I
move-result v1
sget-object v2, Landroid/graphics/PorterDuff$Mode;->SRC_ATOP:Landroid/graphics/PorterDuff$Mode;
invoke-virtual {v3, v1, v2}, Landroid/graphics/drawable/Drawable;->setColorFilter(ILandroid/graphics/PorterDuff$Mode;)V
.line 3211
:cond_0
const/high16 v1, 0x3f80
sub-float v0, v1, v0
const/high16 v1, 0x437f
mul-float/2addr v0, v1
float-to-int v0, v0
invoke-virtual {v3, v0}, Landroid/graphics/drawable/Drawable;->setAlpha(I)V
.line 3213
:cond_1
return-void
.end method[/COLOR]
.method private resumeSuspendedAutohide()V
.locals 4
.prologue
.line 2490
iget-boolean v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mAutohideSuspended:Z
if-eqz v0, :cond_0
.line 2491
invoke-direct {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->scheduleAutohide()V
change this 0x7f02012d, according to the value you got in your own public.aml
Code:
<public type="drawable" name="notification_panel_bg" id="0x7f??????" />
next
Code:
invoke-direct {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->resetUserSetupObserver()V
.line 780
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/android/systemui/statusbar/powerwidget/PowerWidget;
invoke-virtual {v0}, Lcom/android/systemui/statusbar/powerwidget/PowerWidget;->setupWidget()V
.line 781
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/android/systemui/statusbar/powerwidget/PowerWidget;
invoke-virtual {v0}, Lcom/android/systemui/statusbar/powerwidget/PowerWidget;->updateVisibility()V
[COLOR="Red"]new-instance v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$AdiObserver;
new-instance v1, Landroid/os/Handler;
invoke-direct {v1}, Landroid/os/Handler;-><init>()V
invoke-direct {v0, p0, v1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$AdiObserver;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;Landroid/os/Handler;)V
invoke-virtual {v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$AdiObserver;->observe()V[/COLOR]
.line 783
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
or for CM10.2/CM11
Code:
const-string v1, "android.intent.action.SCREEN_ON"
invoke-virtual {v0, v1}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V
.line 864
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBroadcastReceiver:Landroid/content/BroadcastReceiver;
invoke-virtual {v5, v1, v0}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
.line 867
invoke-direct {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->resetUserSetupObserver()V
[COLOR="Red"] new-instance v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$AdiObserver;
new-instance v1, Landroid/os/Handler;
invoke-direct {v1}, Landroid/os/Handler;-><init>()V
invoke-direct {v0, p0, v1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$AdiObserver;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;Landroid/os/Handler;)V
invoke-virtual {v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$AdiObserver;->observe()V[/COLOR]
.line 869
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
- Done and recompile your SystemUI.apk
done ,
have a nice Moding
Good luck
Update FIXED, for CyanogenMod 11 !!
oke guys, here is the fix code for CyanogenMod 11
this is who have followed my guide
before :
this code has made SystemUI force stop when there is new incoming notification :
Code:
[COLOR="Blue"].method private setNotificationsTransparency()V
.locals 8
.prologue
const/high16 v7, 0x437f
const/high16 v6, 0x3f80
.line 3216
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;
invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v1, "notif_alpha"
const/4 v2, 0x0
invoke-static {v0, v1, v2}, Landroid/provider/Settings$System;->getFloat(Landroid/content/ContentResolver;Ljava/lang/String;F)F
move-result v1
.line 3217
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPile:Lcom/android/systemui/statusbar/policy/NotificationRowLayout;
if-eqz v0, :cond_2
.line 3218
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNotificationData:Lcom/android/systemui/statusbar/NotificationData;
invoke-virtual {v0}, Lcom/android/systemui/statusbar/NotificationData;->size()I
move-result v2
.line 3219
const/4 v0, 0x0
:goto_0
if-ge v0, v2, :cond_2
.line 3220
iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNotificationData:Lcom/android/systemui/statusbar/NotificationData;
sub-int v4, v2, v0
add-int/lit8 v4, v4, -0x1
invoke-virtual {v3, v4}, Lcom/android/systemui/statusbar/NotificationData;->get(I)Lcom/android/systemui/statusbar/NotificationData$Entry;
move-result-object v3
.line 3221
iget-object v4, v3, Lcom/android/systemui/statusbar/NotificationData$Entry;->expanded:Landroid/view/View;
.line 3222
if-eqz v4, :cond_0
invoke-virtual {v4}, Landroid/view/View;->getBackground()Landroid/graphics/drawable/Drawable;
move-result-object v5
if-eqz v5, :cond_0
invoke-virtual {v4}, Landroid/view/View;->getBackground()Landroid/graphics/drawable/Drawable;
move-result-object v4
sub-float v5, v6, v1
mul-float/2addr v5, v7
float-to-int v5, v5
invoke-virtual {v4, v5}, Landroid/graphics/drawable/Drawable;->setAlpha(I)V
.line 3223
:cond_0
invoke-virtual {v3}, Lcom/android/systemui/statusbar/NotificationData$Entry;->getLargeView()Landroid/view/View;
move-result-object v3
.line 3224
if-eqz v3, :cond_1
invoke-virtual {v3}, Landroid/view/View;->getBackground()Landroid/graphics/drawable/Drawable;
move-result-object v4
if-eqz v4, :cond_1
invoke-virtual {v3}, Landroid/view/View;->getBackground()Landroid/graphics/drawable/Drawable;
move-result-object v3
sub-float v4, v6, v1
mul-float/2addr v4, v7
float-to-int v4, v4
invoke-virtual {v3, v4}, Landroid/graphics/drawable/Drawable;->setAlpha(I)V
.line 3219
:cond_1
add-int/lit8 v0, v0, 0x1
goto :goto_0
.line 3227
:cond_2
return-void
.end method[/COLOR]
so the fix is like this
new code is
Code:
[COLOR="Red"].method private setNotificationsTransparency()V
.locals 6
.prologue
.line 3537
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPile:Lcom/android/systemui/statusbar/policy/NotificationRowLayout;
if-eqz v0, :cond_0
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNotificationData:Lcom/android/systemui/statusbar/NotificationData;
if-nez v0, :cond_1
.line 3560
:cond_0
return-void
.line 3540
:cond_1
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;
invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v1, "notif_alpha"
const/4 v2, 0x0
const/4 v3, -0x2
invoke-static {v0, v1, v2, v3}, Landroid/provider/Settings$System;->getFloatForUser(Landroid/content/ContentResolver;Ljava/lang/String;FI)F
move-result v0
.line 3543
const/high16 v1, 0x3f80
sub-float v0, v1, v0
const/high16 v1, 0x437f
mul-float/2addr v0, v1
float-to-int v1, v0
.line 3544
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNotificationData:Lcom/android/systemui/statusbar/NotificationData;
invoke-virtual {v0}, Lcom/android/systemui/statusbar/NotificationData;->size()I
move-result v2
.line 3545
const/4 v0, 0x0
:goto_0
if-ge v0, v2, :cond_0
.line 3546
iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNotificationData:Lcom/android/systemui/statusbar/NotificationData;
sub-int v4, v2, v0
add-int/lit8 v4, v4, -0x1
invoke-virtual {v3, v4}, Lcom/android/systemui/statusbar/NotificationData;->get(I)Lcom/android/systemui/statusbar/NotificationData$Entry;
move-result-object v3
.line 3547
iget-object v4, v3, Lcom/android/systemui/statusbar/NotificationData$Entry;->expanded:Landroid/view/View;
.line 3548
if-eqz v4, :cond_2
invoke-virtual {v4}, Landroid/view/View;->getBackground()Landroid/graphics/drawable/Drawable;
move-result-object v5
if-eqz v5, :cond_2
.line 3549
invoke-virtual {v4}, Landroid/view/View;->getBackground()Landroid/graphics/drawable/Drawable;
move-result-object v4
invoke-virtual {v4, v1}, Landroid/graphics/drawable/Drawable;->setAlpha(I)V
.line 3551
:cond_2
invoke-virtual {v3}, Lcom/android/systemui/statusbar/NotificationData$Entry;->getBigContentView()Landroid/view/View;
move-result-object v4
.line 3552
if-eqz v4, :cond_3
invoke-virtual {v4}, Landroid/view/View;->getBackground()Landroid/graphics/drawable/Drawable;
move-result-object v5
if-eqz v5, :cond_3
.line 3553
invoke-virtual {v4}, Landroid/view/View;->getBackground()Landroid/graphics/drawable/Drawable;
move-result-object v4
invoke-virtual {v4, v1}, Landroid/graphics/drawable/Drawable;->setAlpha(I)V
.line 3555
:cond_3
iget-object v3, v3, Lcom/android/systemui/statusbar/NotificationData$Entry;->icon:Lcom/android/systemui/statusbar/StatusBarIconView;
.line 3556
if-eqz v3, :cond_4
invoke-virtual {v3}, Lcom/android/systemui/statusbar/StatusBarIconView;->getBackground()Landroid/graphics/drawable/Drawable;
move-result-object v4
if-eqz v4, :cond_4
.line 3557
invoke-virtual {v3}, Lcom/android/systemui/statusbar/StatusBarIconView;->getBackground()Landroid/graphics/drawable/Drawable;
move-result-object v3
invoke-virtual {v3, v1}, Landroid/graphics/drawable/Drawable;->setAlpha(I)V
.line 3545
:cond_4
add-int/lit8 v0, v0, 0x1
goto :goto_0
.end method[/COLOR]
----------------------------------------------------------------------------------------------------------------------------------------------------------
Update FIX, for MTK JB 4.2 !!
Go here : http://forum.xda-developers.com/showpost.php?p=52590255&postcount=40
1st !!!
Niceee....
bookmarked.
keep sharing um.
_/|\_
sorry guys, I think there is a little problem in CM11,.
when there is new incoming notification, systemUi suddently force stop,.
I' ll fix for CM11 ASAP
thanks
Adi Aisiteru Reborn said:
Click to expand...
Click to collapse
Adi Sir,
Do we need to check the register values also while doing the copy paste action. because in mine PhoneStatusBar.smali --> mBroadcastReceiver, registers are v13, v0 and no parameters (p0) which is there in your guide.
Please help in this, that, do we have to adapt the register values according to our SystemUI.
BTW, with your earlier guidance, I already got this mode from your ROM.
SuperDroid-BOND said:
Adi Sir,
Do we need to check the register values also while doing the copy paste action. because in mine PhoneStatusBar.smali --> mBroadcastReceiver, registers are v13, v0 and no parameters (p0) which is there in your guide.
Please help in this, that, do we have to adapt the register values according to our SystemUI.
BTW, with your earlier guidance, I already got this mode from your ROM.
Click to expand...
Click to collapse
I just want to try to make it general Bond, if you already succed with the other method, that's good
and btw, am not good in fixing register value like that Bond , am sorry
Adi Aisiteru Reborn said:
I just want to try to make it general Bond, if you already succed with the other method, that's good
and btw, am not good in fixing register value like that Bond , am sorry
Click to expand...
Click to collapse
Ummmm,
My mentor who taught me fixing FCs through checking register values is saying this to me. I'm amazed Sir. Is there anything wrong or offense I did. If it is like that then please pardon me Sir. I didn't have done that intentionally. I am still a noob who ask too many question infront of your codes. Please pardon me for all of my mistakes.
I am very sorry if I hurt you in any way.
SuperDroid-BOND said:
Ummmm,
My mentor who taught me fixing FCs through checking register values is saying this to me. I'm amazed Sir. Is there anything wrong or offense I did. If it is like that then please pardon me Sir. I didn't have done that intentionally. I am still a noob who ask too many question infront of your codes. Please pardon me for all of my mistakes.
I am very sorry if I hurt you in any way.
Click to expand...
Click to collapse
no Bond , you are amazing , can adapt many code to MTK device
Update FIXED, for CyanogenMod 11 !!
http://forum.xda-developers.com/showpost.php?p=51227641&postcount=5
thanks
Sir @Adi Aisiteru Reborn
Again with your guidance, I did a mod once again.
Thanks a lot for all of this info sir.
Sent from my A110 using Tapatalk
Nice work sir. will try it
@Adi Aisiteru Reborn can you help me? thanks
Code:
E/AndroidRuntime( 1527): FATAL EXCEPTION: main
E/AndroidRuntime( 1527): java.lang.VerifyError: com/android/systemui/statusbar/phone/PhoneStatusBar
E/AndroidRuntime( 1527): at java.lang.Class.newInstanceImpl(Native Method)
E/AndroidRuntime( 1527): at java.lang.Class.newInstance(Class.java:1319)
E/AndroidRuntime( 1527): at com.android.systemui.SystemUIService.onCreate(SystemUIService.java:86)
E/AndroidRuntime( 1527): at android.app.ActivityThread.handleCreateService(ActivityThread.java:2418)
E/AndroidRuntime( 1527): at android.app.ActivityThread.access$1700(ActivityThread.java:143)
E/AndroidRuntime( 1527): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1323)
E/AndroidRuntime( 1527): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 1527): at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime( 1527): at android.app.ActivityThread.main(ActivityThread.java:4963)
E/AndroidRuntime( 1527): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 1527): at java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime( 1527): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038)
E/AndroidRuntime( 1527): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)
E/AndroidRuntime( 1527): at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:126)
E/AndroidRuntime( 1527): at dalvik.system.NativeStart.main(Native Method)
=================================================================
i'm fix it with my self :v
ocoot said:
@Adi Aisiteru Reborn can you help me? thanks
Code:
E/AndroidRuntime( 1527): FATAL EXCEPTION: main
E/AndroidRuntime( 1527): java.lang.VerifyError: com/android/systemui/statusbar/phone/PhoneStatusBar
E/AndroidRuntime( 1527): at java.lang.Class.newInstanceImpl(Native Method)
E/AndroidRuntime( 1527): at java.lang.Class.newInstance(Class.java:1319)
E/AndroidRuntime( 1527): at com.android.systemui.SystemUIService.onCreate(SystemUIService.java:86)
E/AndroidRuntime( 1527): at android.app.ActivityThread.handleCreateService(ActivityThread.java:2418)
E/AndroidRuntime( 1527): at android.app.ActivityThread.access$1700(ActivityThread.java:143)
E/AndroidRuntime( 1527): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1323)
E/AndroidRuntime( 1527): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 1527): at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime( 1527): at android.app.ActivityThread.main(ActivityThread.java:4963)
E/AndroidRuntime( 1527): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 1527): at java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime( 1527): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038)
E/AndroidRuntime( 1527): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)
E/AndroidRuntime( 1527): at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:126)
E/AndroidRuntime( 1527): at dalvik.system.NativeStart.main(Native Method)
=================================================================
i'm fix it with my self :v
Click to expand...
Click to collapse
verify error something like that, does not work on your OS/device
workaround :
skip editing PhoneStatusBar.smali
remove PhoneStatusBar$AdiObserver.smali
only use NotificationWallpaper.smali & NotificationWallpaper$SettingsObserver.smali
and add this
- SystemUI.apk\res\layout\status_bar_expanded .xml
Code:
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout android:id="@id/notification_panel" android:background="@drawable/notification_panel_bg" android:paddingTop="@dimen/notification_panel_padding_top" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginLeft="@dimen/notification_panel_margin_left"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
[COLOR="Red"]<com.android.systemui.statusbar.phone.NotificationWallpaper android:id="@id/notification_wallpaper" android:layout_width="fill_parent" android:layout_height="fill_parent" />[/COLOR]
<TextView android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Network" android:gravity="center" android:layout_gravity="bottom" android:id="@id/carrier_label" android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="@dimen/carrier_label_height" android:layout_marginBottom="@dimen/close_handle_height" />
<LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginBottom="@dimen/close_handle_underlap">
<include android:layout_width="fill_parent" android:layout_height="@dimen/notification_panel_header_height" layout="@layout/status_bar_expanded_header" />
- SystemUI.apk\res\values\ids.xml
Code:
[COLOR="Red"]<item type="id" name="notification_wallpaper">false</item>[/COLOR]
you will get a working cutom image only,
@Adi Aisiteru Reborn am already fix it i'm forgot to change the value on this code
Code:
new-instance v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$AdiObserver;
new-instance v0, Landroid/os/Handler;
invoke-direct {v0}, Landroid/os/Handler;-><init>()V
invoke-direct {v0, p0, v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$AdiObserver;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;Landroid/os/Handler;)V
invoke-virtual {v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$AdiObserver;->observe()V
now, it working good on me
ocoot said:
@Adi Aisiteru Reborn am already fix it i'm forgot to change the value on this code
Code:
new-instance v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$AdiObserver;
new-instance v0, Landroid/os/Handler;
invoke-direct {v0}, Landroid/os/Handler;-><init>()V
invoke-direct {v0, p0, v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$AdiObserver;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;Landroid/os/Handler;)V
invoke-virtual {v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$AdiObserver;->observe()V
now, it working good on me
Click to expand...
Click to collapse
ohh, good, congratulation :good:
Adi Aisiteru Reborn said:
ohh, good, congratulation :good:
Click to expand...
Click to collapse
thanks!
Hi guys,
I would like to share a Mod/Animations that I ported from PAC man ROM.. This will enable a IME(Keyboard) Animations and you will be able to test them and change them on the fly!!
This was originally done on the VZW NOTE 2, if you wish to use my files for another phone/brand go right ahead, just PLEASE credit the people i did!
What exatcly does this mod do?
Click to expand...
Click to collapse
This mod will enable your keyboard to have all different types of Enter and Exit Animations, along with different animations for the Interpolator and speed of the animation..
Here is a video of what I mean..
I started looking into this bc I thought it was a pretty cool feature. I want to remind you that this is NOT my work. I DID NOT create these animations..All I did was port them over to TW 4.3 to make them work:laugh:
Anyone is able to use this mod, just please give proper credit to Devs of PAC Man ROM & Xylon ROM, @zst123 for open source XUI MOD Xposed Module and me if you want
ALSO I want to give a BIG THANKS to:
@dwitherell - for always being there to help and for a sounding bored (LOLLL)
@Deckoz2302 - you already know
@Stryke_the_Orc - logcat thread and a 2nd eye
And too everyone else whos guides I've used to teach me and all the things I know now and am planning to learn along the way
WARNING!!! THIS IS GUIDE IS NOT FOR NOVICE USERS/MODDERS/THEMERS ETC...THERE ARE A LOT OF EDITS IN RES FOLDERS AND SMALI!! IF YOU GET STOCK PLEASE PLEASE POST A LOG OR THE ERROR! I WILL TRY TO BE AS NOOB FRIENDLY AS POSSIBLE BUT THIS IS NOT A NOOB GUIDE/MOD!
PS:This guide may not be PERFECT.. There maybe somethings that I added that this mod may not need..or use.. But i added them for the sake of not missing anything..So if you see something and are like "Why did he add those ids, strings, layouts etc" WHATEVER..Just ignore it or don't use them.. I will try to be as accurate as possible.
So let's begin..
What you'll need:
Note Pad++
Apktool and knowledge on how to read errors
framework-res.apk
SecSettings.apk
framework.jar
PATIENCE
Let's start with SecSettings, decompile it goto res/values..
strings.xml add these:
Code:
<string name="listview_off">Off</string>
<string name="listview_wave_left">Wave (Left)</string>
<string name="listview_wave_right">Wave (Right)</string>
<string name="listview_alpha">Alpha</string>
<string name="listview_scale">Scale</string>
<string name="listview_stack_top">Stack (Top)</string>
<string name="listview_stack_bottom">Stack (Bottom)</string>
<string name="listview_unfold">Unfold</string>
<string name="listview_fold">Fold</string>
<string name="listview_translate_left">Translate (Left)</string>
<string name="listview_translate_right">Translate (Right)</string>
<string name="listview_accelerate_interpolator">Accelerate</string>
<string name="listview_decelerate_interpolator">Decelerate</string>
<string name="listview_accelerate_decelerate_interpolator">Accelerate/Decelerate</string>
<string name="listview_anticipate_interpolator">Anticipate</string>
<string name="listview_overshoot_interpolator">Overshoot</string>
<string name="listview_anticipate_overshoot_interpolator">Anticipate/Overshoot</string>
<string name="listview_bounce_interpolator">Bounce</string>
<string name="listview_cycle_interpolator">Cycle</string>
<string name="listview_linear_interpolator">Linear</string>
<string name="animation_default">Default</string>
<string name="animation_fade">Fade</string>
<string name="animation_slide_right">Slide in right</string>
<string name="animation_slide_left">Slide in left</string>
<string name="animation_slide_right_no_fade">Slide in right (No fade)</string>
<string name="animation_slide_left_no_fade">Slide in left (No fade)</string>
<string name="animation_slide_up">Slide in bottom</string>
<string name="animation_slide_down">Slide in top</string>
<string name="animation_translucent">Translucent</string>
<string name="animation_grow_shrink">Grow in (Top)</string>
<string name="animation_grow_shrink_center">Grow in (Center)</string>
<string name="animation_grow_shrink_bottom">Grow in (Bottom)</string>
<string name="animation_grow_shrink_left">Grow in (Left)</string>
<string name="animation_grow_shrink_right">Grow in (Right)</string>
<string name="ime_animation_title">IME animations</string>
<string name="ime_animation_summary">Set keyboard animations</string>
<string name="ime_animation_test_title">Test IME Animation Here</string>
<string name="ime_enter_animation_title">Enter Animation</string>
<string name="ime_exit_animation_title">Exit Animation</string>
<string name="ime_interpolator_title">Interpolator</string>
<string name="ime_duration_title">IME Duration</string>
<string name="animation_duration_title">Animation duration</string>
<string name="animation_duration_summary">Set duration</string>
<string name="animation_settings_reset_message">Reset all animation settings to default?</string>
Save..
ids.xml add these:
Code:
<item type="id" name="seekBarPrefUnitsRight">false</item>
<item type="id" name="seekBarPrefValue">false</item>
<item type="id" name="seekBarPrefUnitsLeft">false</item>
<item type="id" name="seekBarPrefBarContainer">false</item>
Save..
arrays.xml add these:
Code:
<string-array name="listview_animation_entries">
<item [user=251364]@Str[/user]ing/listview_off</item>
<item [user=251364]@Str[/user]ing/listview_wave_left</item>
<item [user=251364]@Str[/user]ing/listview_wave_right</item>
<item [user=251364]@Str[/user]ing/listview_scale</item>
<item [user=251364]@Str[/user]ing/listview_alpha</item>
<item [user=251364]@Str[/user]ing/listview_stack_top</item>
<item [user=251364]@Str[/user]ing/listview_stack_bottom</item>
<item [user=251364]@Str[/user]ing/listview_unfold</item>
<item [user=251364]@Str[/user]ing/listview_fold</item>
<item [user=251364]@Str[/user]ing/listview_translate_left</item>
<item [user=251364]@Str[/user]ing/listview_translate_right</item>
</string-array>
<string-array name="listview_animation_values">
<item>0</item>
<item>1</item>
<item>2</item>
<item>3</item>
<item>4</item>
<item>5</item>
<item>6</item>
<item>7</item>
<item>8</item>
<item>9</item>
<item>10</item>
</string-array>
<string-array name="listview_interpolator_entries">
<item [user=251364]@Str[/user]ing/listview_off</item>
<item [user=251364]@Str[/user]ing/listview_accelerate_interpolator</item>
<item [user=251364]@Str[/user]ing/listview_decelerate_interpolator</item>
<item [user=251364]@Str[/user]ing/listview_accelerate_decelerate_interpolator</item>
<item [user=251364]@Str[/user]ing/listview_anticipate_interpolator</item>
<item [user=251364]@Str[/user]ing/listview_overshoot_interpolator</item>
<item [user=251364]@Str[/user]ing/listview_anticipate_overshoot_interpolator</item>
<item [user=251364]@Str[/user]ing/listview_bounce_interpolator</item>
<item [user=251364]@Str[/user]ing/listview_cycle_interpolator</item>
<item [user=251364]@Str[/user]ing/listview_linear_interpolator</item>
</string-array>
<string-array name="listview_interpolator_values">
<item>0</item>
<item>1</item>
<item>2</item>
<item>3</item>
<item>4</item>
<item>5</item>
<item>6</item>
<item>7</item>
<item>8</item>
<item>9</item>
</string-array>
<string-array name="anim_controls_entries">
<item [user=251364]@Str[/user]ing/animation_default</item>
<item [user=251364]@Str[/user]ing/animation_fade</item>
<item [user=251364]@Str[/user]ing/animation_slide_right</item>
<item [user=251364]@Str[/user]ing/animation_slide_left</item>
<item [user=251364]@Str[/user]ing/animation_slide_right_no_fade</item>
<item [user=251364]@Str[/user]ing/animation_slide_left_no_fade</item>
<item [user=251364]@Str[/user]ing/animation_slide_up</item>
<item [user=251364]@Str[/user]ing/animation_slide_down</item>
<item [user=251364]@Str[/user]ing/animation_translucent</item>
<item [user=251364]@Str[/user]ing/animation_grow_shrink</item>
<item [user=251364]@Str[/user]ing/animation_grow_shrink_center</item>
<item [user=251364]@Str[/user]ing/animation_grow_shrink_bottom</item>
<item [user=251364]@Str[/user]ing/animation_grow_shrink_left</item>
<item [user=251364]@Str[/user]ing/animation_grow_shrink_right</item>
</string-array>
<string-array name="anim_controls_values">
<item>0</item>
<item>1</item>
<item>2</item>
<item>3</item>
<item>4</item>
<item>5</item>
<item>6</item>
<item>7</item>
<item>8</item>
<item>9</item>
<item>10</item>
<item>11</item>
<item>12</item>
<item>13</item>
</string-array>
Save..
attrs.xml add these:
Code:
<attr name="interval" format="integer" />
<attr name="unitsLeft" format="reference|string" />
<attr name="unitsRight" format="reference|string" />
<attr name="maximum" format="integer" />
<attr name="minimum" format="integer" />
Save..
Now go to res/xml/ and where ever you want to add the preference screen to change the animations.. I added it to a xml that we (N3bula) have specifically for keyboard mods..Add this line
Code:
<PreferenceScreen android:title= [user=251364]@Str[/user]ing/ime_animation_title" android:key="interface_animation_scroll" android:summary= [user=251364]@Str[/user]ing/ime_animation_summary" android:fragment="com.android.settings.pac.KeyboardAnimationInterfaceSettings" />
Goto android/settings/SubSettings.smali
Search
Code:
.method public constructor
add this below .end method
Code:
.method private popFragment()Z
.locals 2
.prologue
.line 46
invoke-virtual {p0}, Lcom/android/settings/SubSettings;->getFragmentManager()Landroid/app/FragmentManager;
move-result-object v0
.line 47
.local v0, "fm":Landroid/app/FragmentManager;
invoke-virtual {v0}, Landroid/app/FragmentManager;->getBackStackEntryCount()I
move-result v1
if-lez v1, :cond_0
.line 48
invoke-virtual {v0}, Landroid/app/FragmentManager;->popBackStack()V
.line 49
const/4 v1, 0x1
.line 51
:goto_0
return v1
:cond_0
const/4 v1, 0x0
goto :goto_0
.end method
Then search
Code:
# virtual methods
Add this below it:
Code:
.method protected isValidFragment(Ljava/lang/String;)Z
.locals 3
.param p1, "fragmentName" # Ljava/lang/String;
.prologue
.line 41
const-string v0, "SubSettings"
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "Launching fragment "
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
.line 42
const/4 v0, 0x1
return v0
.end method
Find
Code:
.method public onNavigateUp()Z
Add blue:
Code:
.method public onNavigateUp()Z
.locals 1
.prologue
.line 27
[COLOR="Blue"]invoke-direct {p0}, Lcom/android/settings/SubSettings;->popFragment()Z
move-result v0
if-nez v0, :cond_0
[/COLOR]
invoke-virtual {p0}, Lcom/android/settings/SubSettings;->finish()V
.line 28
[COLOR="blue"]:cond_0[/COLOR]
const/4 v0, 0x1
return v0
.end method
Now extract the zip below and add all the contents to their respected folders..
SecSettings.zip
Once you have them in place compile the apk, then decompile it so you can pull your new public id's in res/values/public.xml
Here is my public.xml please go through all the smali you added and search for all the 0x7******* (public ids) When you find one search my public.xml for it, find the name, then search your NEW public.xml for that name and id. Then change the id to YOUR NEW ONE. (Please if you don't understand how to do this, then this mod is NOT for you..either that or you need to search and find out what I am talking about. I will not post every id with the name bc there are A LOT)
Now moving on, framework-res.apk, decompile it...go to res/arrays add these..
Code:
<string-array name="anim_controls_entries">
<item [user=251364]@Str[/user]ing/animation_default</item>
<item [user=251364]@Str[/user]ing/animation_fade</item>
<item [user=251364]@Str[/user]ing/animation_slide_right</item>
<item [user=251364]@Str[/user]ing/animation_slide_left</item>
<item [user=251364]@Str[/user]ing/animation_slide_right_no_fade</item>
<item [user=251364]@Str[/user]ing/animation_slide_left_no_fade</item>
<item [user=251364]@Str[/user]ing/animation_slide_up</item>
<item [user=251364]@Str[/user]ing/animation_slide_down</item>
<item [user=251364]@Str[/user]ing/animation_translucent</item>
<item [user=251364]@Str[/user]ing/animation_grow_shrink</item>
<item [user=251364]@Str[/user]ing/animation_grow_shrink_center</item>
<item [user=251364]@Str[/user]ing/animation_grow_shrink_bottom</item>
<item [user=251364]@Str[/user]ing/animation_grow_shrink_left</item>
<item [user=251364]@Str[/user]ing/animation_grow_shrink_right</item>
</string-array>
<string-array name="anim_controls_values">
<item>0</item>
<item>1</item>
<item>2</item>
<item>3</item>
<item>4</item>
<item>5</item>
<item>6</item>
<item>7</item>
<item>8</item>
<item>9</item>
<item>10</item>
<item>11</item>
<item>12</item>
<item>13</item>
</string-array>
Save..
Then go to res/strings.xml add these:
Code:
<string name="animation_fade">Fade</string>
<string name="animation_slide_right">Slide in right</string>
<string name="animation_slide_left">Slide in left</string>
<string name="animation_slide_right_no_fade">Slide in right (No fade)</string>
<string name="animation_slide_left_no_fade">Slide in left (No fade)</string>
<string name="animation_slide_up">Slide in bottom</string>
<string name="animation_slide_down">Slide in top</string>
<string name="animation_default">Default</string>
<string name="animation_translucent">Translucent</string>
<string name="animation_grow_shrink">Grow in (Top)</string>
<string name="animation_grow_shrink_center">Grow in (Center)</string>
<string name="animation_grow_shrink_bottom">Grow in (Bottom)</string>
<string name="animation_grow_shrink_left">Grow in (Left)</string>
<string name="animation_grow_shrink_right">Grow in (Right)</string>
<string name="action_null">Blank</string>
Save..
Now extract the zip below and add them in their respected folder(s)..
framework-res.zip
Compile it and then decompile it, you will need to generate a new public.xml for framework.jar which is the next step..
Goto POST#2
Now framework.jar..goto android\inputservices\InputMethodSevices.smali..
Now search
Code:
# annotations
add blue:
Code:
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Landroid/inputmethodservice/InputMethodService$Insets;,
Landroid/inputmethodservice/InputMethodService$InputMethodSessionImpl;,
Landroid/inputmethodservice/InputMethodService$InputMethodImpl;,
[COLOR="Blue"] Landroid/inputmethodservice/InputMethodService$SettingsObserver;[/COLOR]
}
.end annotation
Search
Code:
# instance fields
add these below
Code:
.field private mAnimationDuration:I
.field private mAnimationEnterIndex:I
.field private mAnimationExitIndex:I
.field mHandler:Landroid/os/Handler;
.field private mInterpolatorIndex:I
.field private mSettingsObserver:Landroid/inputmethodservice/InputMethodService$SettingsObserver;
.field private mWindowIme:Landroid/view/Window;
Now search
Code:
.method static synthetic
add this whole .method
Code:
.method static synthetic access$123(Landroid/inputmethodservice/InputMethodService;)V
.locals 0
.param p0, "x0" # Landroid/inputmethodservice/InputMethodService;
.prologue
.line 232
invoke-direct {p0}, Landroid/inputmethodservice/InputMethodService;->updateSettings()V
return-void
.end method
Now search
Code:
.method private sendInputViewShownState()V
Add this above it:
Code:
.method private retrieveAnimation(Z)Landroid/view/animation/Animation;
.locals 6
.param p1, "enter" # Z
.prologue
.line 1709
if-eqz p1, :cond_1
iget v4, p0, Landroid/inputmethodservice/InputMethodService;->mAnimationEnterIndex:I
:goto_0
invoke-static {v4}, Lcom/android/internal/util/aokp/AwesomeAnimationHelper;->getAnimations(I)[I
move-result-object v1
.line 1710
.local v1, "animArray":[I
if-eqz p1, :cond_2
const/4 v4, 0x1
aget v2, v1, v4
.line 1711
.local v2, "animInt":I
:goto_1
if-nez v2, :cond_3
const/4 v0, 0x0
.line 1718
:cond_0
:goto_2
return-object v0
.line 1709
.end local v1 # "animArray":[I
.end local v2 # "animInt":I
:cond_1
iget v4, p0, Landroid/inputmethodservice/InputMethodService;->mAnimationExitIndex:I
goto :goto_0
.line 1710
.restart local v1 # "animArray":[I
:cond_2
const/4 v4, 0x0
aget v2, v1, v4
goto :goto_1
.line 1712
.restart local v2 # "animInt":I
:cond_3
invoke-static {p0, v2}, Landroid/view/animation/AnimationUtils;->loadAnimation(Landroid/content/Context;I)Landroid/view/animation/Animation;
move-result-object v0
.line 1713
.local v0, "anim":Landroid/view/animation/Animation;
iget v4, p0, Landroid/inputmethodservice/InputMethodService;->mInterpolatorIndex:I
invoke-static {p0, v4}, Lcom/android/internal/util/aokp/AwesomeAnimationHelper;->getInterpolator(Landroid/content/Context;I)Landroid/view/animation/Interpolator;
move-result-object v3
.line 1714
.local v3, "intplr":Landroid/view/animation/Interpolator;
if-eqz v3, :cond_4
invoke-virtual {v0, v3}, Landroid/view/animation/Animation;->setInterpolator(Landroid/view/animation/Interpolator;)V
.line 1715
:cond_4
iget v4, p0, Landroid/inputmethodservice/InputMethodService;->mAnimationDuration:I
if-lez v4, :cond_0
.line 1716
iget v4, p0, Landroid/inputmethodservice/InputMethodService;->mAnimationDuration:I
int-to-long v4, v4
invoke-virtual {v0, v4, v5}, Landroid/view/animation/Animation;->setDuration(J)V
goto :goto_2
.end method
Next search:
Code:
# virtual methods
.method doFinishInput()V
Add this above it:
Code:
.method private updateSettings()V
.locals 4
.prologue
const/4 v3, 0x0
.line 413
invoke-virtual {p0}, Landroid/inputmethodservice/InputMethodService;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
const-string v2, "animation_ime_enter"
invoke-static {v1, v2, v3}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v1
iput v1, p0, Landroid/inputmethodservice/InputMethodService;->mAnimationEnterIndex:I
.line 415
invoke-virtual {p0}, Landroid/inputmethodservice/InputMethodService;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
const-string v2, "animation_ime_exit"
invoke-static {v1, v2, v3}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v1
iput v1, p0, Landroid/inputmethodservice/InputMethodService;->mAnimationExitIndex:I
.line 417
invoke-virtual {p0}, Landroid/inputmethodservice/InputMethodService;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
const-string v2, "animation_ime_interpolator"
invoke-static {v1, v2, v3}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v1
iput v1, p0, Landroid/inputmethodservice/InputMethodService;->mInterpolatorIndex:I
.line 419
invoke-virtual {p0}, Landroid/inputmethodservice/InputMethodService;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
const-string v2, "animation_ime_duration"
invoke-static {v1, v2, v3}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v0
.line 421
.local v0, "temp":I
mul-int/lit8 v1, v0, 0xf
iput v1, p0, Landroid/inputmethodservice/InputMethodService;->mAnimationDuration:I
.line 422
return-void
.end method
Now search
Code:
.method initViews()V
Add whats is in blue:
Code:
sget-object v0, Landroid/R$styleable;->InputMethodService:[I
invoke-virtual {p0, v0}, Landroid/inputmethodservice/InputMethodService;->obtainStyledAttributes([I)Landroid/content/res/TypedArray;
move-result-object v0
iput-object v0, p0, Landroid/inputmethodservice/InputMethodService;->mThemeAttrs:Landroid/content/res/TypedArray;
.line 1082
iget-object v0, p0, Landroid/inputmethodservice/InputMethodService;->mInflater:Landroid/view/LayoutInflater;
const v1, 0x1090063
invoke-virtual {v0, v1, v3}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;
move-result-object v0
iput-object v0, p0, Landroid/inputmethodservice/InputMethodService;->mRootView:Landroid/view/View;
.line 776
[COLOR="Blue"]iget-object v0, p0, Landroid/inputmethodservice/InputMethodService;->mRootView:Landroid/view/View;
const/16 v1, 0x300
invoke-virtual {v0, v1}, Landroid/view/View;->setSystemUiVisibility(I)V[/COLOR]
.line 778
iget-object v0, p0, Landroid/inputmethodservice/InputMethodService;->mWindow:Landroid/inputmethodservice/SoftInputWindow;
iget-object v1, p0, Landroid/inputmethodservice/InputMethodService;->mRootView:Landroid/view/View;
invoke-virtual {v0, v1}, Landroid/inputmethodservice/SoftInputWindow;->setContentView(Landroid/view/View;)V
.line 1085
iget-object v0, p0, Landroid/inputmethodservice/InputMethodService;->mRootView:Landroid/view/View;
invoke-virtual {v0}, Landroid/view/View;->getViewTreeObserver()Landroid/view/ViewTreeObserver;
Next search:
Code:
const-string v1, "fancy_ime_animations"
should be just a few lines down
Add blue
Code:
const-string v1, "fancy_ime_animations"
invoke-static {v0, v1, v2}, Landroid/provider/Settings$Global;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v0
if-eqz v0, :cond_0
.line 782
[COLOR="blue"]iget-object v0, p0, Landroid/inputmethodservice/InputMethodService;->mWindow:Landroid/inputmethodservice/SoftInputWindow;
invoke-virtual {v0}, Landroid/inputmethodservice/SoftInputWindow;->getWindow()Landroid/view/Window;
move-result-object v0
const v1, 0x1030201
invoke-virtual {v0, v1}, Landroid/view/Window;->setWindowAnimations(I)V
[/COLOR]
.line 785
:cond_0
iget-object v0, p0, Landroid/inputmethodservice/InputMethodService;->mRootView:Landroid/view/View;
const v1, 0x1020351
invoke-virtual {v0, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Landroid/view/ViewGroup;
Search
Code:
const-string v0, "KOR"
Add blue above like this:
Code:
invoke-virtual {v0, v4}, Landroid/widget/FrameLayout;->setVisibility(I)V
[COLOR="blue"]new-instance v0, Landroid/os/Handler;
invoke-direct {v0}, Landroid/os/Handler;-><init>()V
iput-object v0, p0, Landroid/inputmethodservice/InputMethodService;->mHandler:Landroid/os/Handler;[/COLOR]
.line 1113
const-string v0, "KOR"
const-string v1, "USA"
NOW search
Code:
.method public onCreate()V
Add blue:
Code:
invoke-virtual {v1}, Landroid/inputmethodservice/SoftInputWindow;->getWindow()Landroid/view/Window;
move-result-object v1
const/high16 v2, 0x1000000
invoke-virtual {v1, v2}, Landroid/view/Window;->addFlags(I)V
.line 1003
:cond_0
[COLOR="blue"] new-instance v0, Landroid/os/Handler;
invoke-direct {v0}, Landroid/os/Handler;-><init>()V
iput-object v0, p0, Landroid/inputmethodservice/InputMethodService;->mHandler:Landroid/os/Handler;
.line 742
new-instance v0, Landroid/inputmethodservice/InputMethodService$SettingsObserver;
iget-object v1, p0, Landroid/inputmethodservice/InputMethodService;->mHandler:Landroid/os/Handler;
invoke-direct {v0, p0, v1}, Landroid/inputmethodservice/InputMethodService$SettingsObserver;-><init>(Landroid/inputmethodservice/InputMethodService;Landroid/os/Handler;)V
iput-object v0, p0, Landroid/inputmethodservice/InputMethodService;->mSettingsObserver:Landroid/inputmethodservice/InputMethodService$SettingsObserver;
.line 743
iget-object v0, p0, Landroid/inputmethodservice/InputMethodService;->mSettingsObserver:Landroid/inputmethodservice/InputMethodService$SettingsObserver;
invoke-virtual {v0}, Landroid/inputmethodservice/InputMethodService$SettingsObserver;->observe()V[/COLOR]
invoke-virtual {p0}, Landroid/inputmethodservice/InputMethodService;->initViews()V
.line 1004
iget-object v1, p0, Landroid/inputmethodservice/InputMethodService;->mWindow:Landroid/inputmethodservice/SoftInputWindow;
invoke-virtual {v1}, Landroid/inputmethodservice/SoftInputWindow;->getWindow()Landroid/view/Window;
move-result-object v1
const/4 v2, -0x1
const/4 v3, -0x2
invoke-virtual {v1, v2, v3}, Landroid/view/Window;->setLayout(II)V
.line 1016
[COLOR="blue"] iget-object v0, p0, Landroid/inputmethodservice/InputMethodService;->mWindow:Landroid/inputmethodservice/SoftInputWindow;
invoke-virtual {v0}, Landroid/inputmethodservice/SoftInputWindow;->getWindow()Landroid/view/Window;
move-result-object v0
iput-object v0, p0, Landroid/inputmethodservice/InputMethodService;->mWindowIme:Landroid/view/Window;
.line 747
invoke-direct {p0}, Landroid/inputmethodservice/InputMethodService;->updateSettings()V[/COLOR]
new-instance v0, Landroid/content/IntentFilter;
invoke-direct {v0}, Landroid/content/IntentFilter;-><init>()V
.line 1017
.local v0, "filter":Landroid/content/IntentFilter;
const-string v1, "RequestAxT9Info"
invoke-virtual {v0, v1}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V
.line 1018
const-string v1, "com.samsung.axt9info.close"
invoke-virtual {v0, v1}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V
.line 1023
iget-object v1, p0, Landroid/inputmethodservice/InputMethodService;->mBR:Landroid/content/BroadcastReceiver;
invoke-virtual {p0, v1, v0}, Landroid/inputmethodservice/InputMethodService;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
.line 1024
const-string v1, "InputMethodService"
const-string v2, "mBR.registerReceiver()"
invoke-static {v1, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
.line 1054
return-void
.end method
Search
Code:
.method public onWindowHidden()V
Replace whole method with this:
Code:
.method public onWindowHidden()V
.locals 6
.prologue
.line 1669
iget v4, p0, Landroid/inputmethodservice/InputMethodService;->mAnimationExitIndex:I
if-nez v4, :cond_1
.line 1670
iget-object v4, p0, Landroid/inputmethodservice/InputMethodService;->mWindow:Landroid/inputmethodservice/SoftInputWindow;
invoke-virtual {v4}, Landroid/inputmethodservice/SoftInputWindow;->getWindow()Landroid/view/Window;
move-result-object v4
const v5, 0x1030056
invoke-virtual {v4, v5}, Landroid/view/Window;->setWindowAnimations(I)V
.line 1706
:cond_0
:goto_0
return-void
.line 1673
:cond_1
invoke-virtual {p0}, Landroid/inputmethodservice/InputMethodService;->getWindow()Landroid/app/Dialog;
move-result-object v1
.line 1674
.local v1, "dialog":Landroid/app/Dialog;
invoke-virtual {v1}, Landroid/app/Dialog;->getWindow()Landroid/view/Window;
move-result-object v4
iput-object v4, p0, Landroid/inputmethodservice/InputMethodService;->mWindowIme:Landroid/view/Window;
.line 1675
iget-object v4, p0, Landroid/inputmethodservice/InputMethodService;->mWindowIme:Landroid/view/Window;
const/4 v5, -0x1
invoke-virtual {v4, v5}, Landroid/view/Window;->setWindowAnimations(I)V
.line 1677
new-instance v2, Landroid/os/Handler;
invoke-direct {v2}, Landroid/os/Handler;-><init>()V
.line 1678
.local v2, "handler":Landroid/os/Handler;
new-instance v3, Landroid/inputmethodservice/InputMethodService$4;
invoke-direct {v3, p0, v1}, Landroid/inputmethodservice/InputMethodService$4;-><init>(Landroid/inputmethodservice/InputMethodService;Landroid/app/Dialog;)V
.line 1685
.local v3, "runnable":Ljava/lang/Runnable;
const/4 v4, 0x0
invoke-direct {p0, v4}, Landroid/inputmethodservice/InputMethodService;->retrieveAnimation(Z)Landroid/view/animation/Animation;
move-result-object v0
.line 1686
.local v0, "anim":Landroid/view/animation/Animation;
if-eqz v0, :cond_0
.line 1687
new-instance v4, Landroid/inputmethodservice/InputMethodService$5;
invoke-direct {v4, p0, v2, v3, v1}, Landroid/inputmethodservice/InputMethodService$5;-><init>(Landroid/inputmethodservice/InputMethodService;Landroid/os/Handler;Ljava/lang/Runnable;Landroid/app/Dialog;)V
invoke-virtual {v0, v4}, Landroid/view/animation/Animation;->setAnimationListener(Landroid/view/animation/Animation$AnimationListener;)V
.line 1698
invoke-virtual {v1}, Landroid/app/Dialog;->show()V
.line 1699
iget-object v4, p0, Landroid/inputmethodservice/InputMethodService;->mRootView:Landroid/view/View;
invoke-virtual {v4, v0}, Landroid/view/View;->startAnimation(Landroid/view/animation/Animation;)V
.line 1700
iget v4, p0, Landroid/inputmethodservice/InputMethodService;->mAnimationDuration:I
if-lez v4, :cond_2
.line 1701
iget v4, p0, Landroid/inputmethodservice/InputMethodService;->mAnimationDuration:I
mul-int/lit8 v4, v4, 0x2
int-to-long v4, v4
invoke-virtual {v2, v3, v4, v5}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z
goto :goto_0
.line 1703
:cond_2
const-wide/16 v4, 0x3e8
invoke-virtual {v2, v3, v4, v5}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z
goto :goto_0
.end method
Next search
Code:
.method public onWindowShown()V
Replace whole method with this:
Code:
.method public onWindowShown()V
.locals 4
.prologue
.line 1651
iget v2, p0, Landroid/inputmethodservice/InputMethodService;->mAnimationEnterIndex:I
if-nez v2, :cond_1
.line 1652
iget-object v2, p0, Landroid/inputmethodservice/InputMethodService;->mWindow:Landroid/inputmethodservice/SoftInputWindow;
invoke-virtual {v2}, Landroid/inputmethodservice/SoftInputWindow;->getWindow()Landroid/view/Window;
move-result-object v2
const v3, 0x1030056
invoke-virtual {v2, v3}, Landroid/view/Window;->setWindowAnimations(I)V
.line 1662
:cond_0
:goto_0
return-void
.line 1655
:cond_1
invoke-virtual {p0}, Landroid/inputmethodservice/InputMethodService;->getWindow()Landroid/app/Dialog;
move-result-object v1
.line 1656
.local v1, "dialog":Landroid/app/Dialog;
invoke-virtual {v1}, Landroid/app/Dialog;->getWindow()Landroid/view/Window;
move-result-object v2
iput-object v2, p0, Landroid/inputmethodservice/InputMethodService;->mWindowIme:Landroid/view/Window;
.line 1657
iget-object v2, p0, Landroid/inputmethodservice/InputMethodService;->mWindowIme:Landroid/view/Window;
const/4 v3, -0x1
invoke-virtual {v2, v3}, Landroid/view/Window;->setWindowAnimations(I)V
.line 1658
invoke-virtual {v1}, Landroid/app/Dialog;->show()V
.line 1659
const/4 v2, 0x1
invoke-direct {p0, v2}, Landroid/inputmethodservice/InputMethodService;->retrieveAnimation(Z)Landroid/view/animation/Animation;
move-result-object v0
.line 1660
.local v0, "anim":Landroid/view/animation/Animation;
if-eqz v0, :cond_0
.line 1661
iget-object v2, p0, Landroid/inputmethodservice/InputMethodService;->mRootView:Landroid/view/View;
invoke-virtual {v2, v0}, Landroid/view/View;->startAnimation(Landroid/view/animation/Animation;)V
goto :goto_0
.end method
Extract the zip and add them to their respected folder(s):
framework.jar.zip
After that YOUR DONE!!!
Make sure you have compiled everything with YOUR NEW public ids.. Then go head and transfer/flash the files..
REMINDER!! Please post a log/error if you are having problems. I will try to help as much as possible...:good:
#2
Can you give me your public from framework-res?
the_vanya1 said:
Can you give me your public from framework-res?
Click to expand...
Click to collapse
Wish i could. Dont have them at the momment. They are pretty high level resources so you should not need them
I need to know ids for framework.jar
the_vanya1 said:
I need to know ids for framework.jar
Click to expand...
Click to collapse
Did you see my post above? I do not have them, but the resources (ids) in framework.jar are pretty high level, meaning there ahould not be any difference between devices. Have you tried to compile and test it with the ones present above?
Code:
E/AndroidRuntime( 1726): FATAL EXCEPTION: main
E/AndroidRuntime( 1726): Process: com.android.settings, PID: 1726
E/AndroidRuntime( 1726): java.lang.NoClassDefFoundError: com.android.internal.util.aokp.AwesomeAnimationHelper
E/AndroidRuntime( 1726): at com.android.settings.pac.KeyboardAnimationInterfaceSettings.onCreate(KeyboardAnimationInterfaceSettings.java:74)
E/AndroidRuntime( 1726): at android.app.Fragment.performCreate(Fragment.java:1678)
E/AndroidRuntime( 1726): at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:859)
E/AndroidRuntime( 1726): at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1062)
E/AndroidRuntime( 1726): at android.app.BackStackRecord.run(BackStackRecord.java:698)
E/AndroidRuntime( 1726): at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1447)
E/AndroidRuntime( 1726): at android.app.Activity.performStart(Activity.java:5273)
E/AndroidRuntime( 1726): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2311)
E/AndroidRuntime( 1726): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2390)
E/AndroidRuntime( 1726): at android.app.ActivityThread.access$800(ActivityThread.java:151)
E/AndroidRuntime( 1726): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1321)
E/AndroidRuntime( 1726): at android.os.Handler.dispatchMessage(Handler.java:110)
E/AndroidRuntime( 1726): at android.os.Looper.loop(Looper.java:193)
E/AndroidRuntime( 1726): at android.app.ActivityThread.main(ActivityThread.java:5292)
E/AndroidRuntime( 1726): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 1726): at java.lang.reflect.Method.invoke(Method.java:515)
E/AndroidRuntime( 1726): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:824)
E/AndroidRuntime( 1726): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:640)
E/AndroidRuntime( 1726): at dalvik.system.NativeStart.main(Native Method)
the_vanya1 said:
Code:
E/AndroidRuntime( 1726): FATAL EXCEPTION: main
E/AndroidRuntime( 1726): Process: com.android.settings, PID: 1726
E/AndroidRuntime( 1726): java.lang.NoClassDefFoundError: com.android.internal.util.aokp.AwesomeAnimationHelper
E/AndroidRuntime( 1726): at com.android.settings.pac.KeyboardAnimationInterfaceSettings.onCreate(KeyboardAnimationInterfaceSettings.java:74)
E/AndroidRuntime( 1726): at android.app.Fragment.performCreate(Fragment.java:1678)
E/AndroidRuntime( 1726): at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:859)
E/AndroidRuntime( 1726): at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1062)
E/AndroidRuntime( 1726): at android.app.BackStackRecord.run(BackStackRecord.java:698)
E/AndroidRuntime( 1726): at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1447)
E/AndroidRuntime( 1726): at android.app.Activity.performStart(Activity.java:5273)
E/AndroidRuntime( 1726): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2311)
E/AndroidRuntime( 1726): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2390)
E/AndroidRuntime( 1726): at android.app.ActivityThread.access$800(ActivityThread.java:151)
E/AndroidRuntime( 1726): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1321)
E/AndroidRuntime( 1726): at android.os.Handler.dispatchMessage(Handler.java:110)
E/AndroidRuntime( 1726): at android.os.Looper.loop(Looper.java:193)
E/AndroidRuntime( 1726): at android.app.ActivityThread.main(ActivityThread.java:5292)
E/AndroidRuntime( 1726): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 1726): at java.lang.reflect.Method.invoke(Method.java:515)
E/AndroidRuntime( 1726): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:824)
E/AndroidRuntime( 1726): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:640)
E/AndroidRuntime( 1726): at dalvik.system.NativeStart.main(Native Method)
Click to expand...
Click to collapse
aokp.AwesomeAnimationHelper
Did you add this directory and smali?
yes, sir (im in cm 11)
the_vanya1 said:
yes, sir (im in cm 11)
Click to expand...
Click to collapse
Check here I think I posted it
Edit: disregard that settings publics. Not sure what to tell ya bud.
thx, sir. Success
excuse me,,, can i get your public.xml framework-res? .. so that I can match the public id proper and suitable..
thanks before
sorry for my bad english
qoejohn said:
excuse me,,, can i get your public.xml framework-res? .. so that I can match the public id proper and suitable..
thanks before
sorry for my bad english
Click to expand...
Click to collapse
I do not have access to them anymore.. You should not even need them if I remember correctly..
lacoursiere18 said:
I do not have access to them anymore.. You should not even need them if I remember correctly..
Click to expand...
Click to collapse
ok...thanks sir
Nice. Hope we can see more guides from you.
There is a framework's id in NEWSeekBarPreference.smali (settings smali) I am not sure whether this needs to be matched or as you said not required?
const v4, 0x1020016