Each system app should be compiled as system app to retain signature..For compiling Framewor-res.apk i select option "11 compile system APK files" or none apk file?
Sorry for my bad english...
Each system app should be compiled as system app to retain signature..
So yes (option 11) compile system APK files..
Remember framework-res.apk is essential program in your phone, so set compression level to 0 (in general low compression level but 0 will sure work!!) before compiling.
I compliled with option 11 but not work..(dimension of framework after is less)
If its not heavily moded try replacing resource.rc and classes.dex inside original with the ones in build folder....
You can use 7zip i personally use it and it fine...
Sent from my GT-N7000 using Tapatalk 2
- 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.
+----------------------------------------------------------------------------+
| Post #[URL="http://xdaforums.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://xdaforums.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://xdaforums.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://xdaforums.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://xdaforums.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://xdaforums.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://xdaforums.com/showpost.php?p=47555493&postcount=8"]8[/URL] |
+----------------------------------------------------------------------------+
| |
| - Ink effect enabling |
| - Integrating application in settings menu |
| |
+----------------------------------------------------------------------------+
| Post #[URL="http://xdaforums.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://xdaforums.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://xdaforums.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://xdaforums.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://xdaforums.com/showpost.php?p=47555546&postcount=17"]17[/URL] CSC FEATURES |
+----------------------------------------------------------------------------+
| |
| |
+----------------------------------------------------------------------------+
Remember to set compression level to 0 in APK-Multi tool before proceeding in these steps
6. Recompile and push it to your phone.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
# 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
# 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
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;
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;
We need to do our changes to two files; android.policy.jar and SecSettings.apkThis method is originally done by Mirko_ddd, so please go to his thread and thank him
.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
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
<string name="aosp_lock_screen">AOSP Lockscreen</string>
<string name="aosp_lock_screen_description">Original Jelly Bean Lockscreen</string>
<CheckBoxPreference android:title="@string/aosp_lock_screen" android:key="majdi_aosp_lock" android:summary="@string/aosp_lock_screen_description" />
1. Backsmali android.policy.jarThis method is originally done by Mirko_ddd, so please go to his thread and thank him
.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]
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
const/4 v1, 0x[B][COLOR="Red"]1[/COLOR][/B]
const/4 v1, 0x[B][COLOR="Blue"]0[/COLOR][/B]
.parameter "[B][COLOR="Red"]enabled[/COLOR][/B]"
.parameter "[B][COLOR="Blue"]disabled[/COLOR][/B]"
1. Decompile SystemUI.apk by Apk-Multi tool
<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>
<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>
Results:N.B: you can put any hex color code for clock text color instead #ffffff above there
[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]
[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]
[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]
6. Leave public.xml file opened and go to the next step..N.B: You might have different id values, but don't worry it will be the same principle!!
[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]
.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;
So the line will be: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)
.line 418
const/4 v1, 0x[B][COLOR="Purple"]9[/COLOR][/B]
new-array v1, v1, [Lcom/android/internal/policy/impl/GlobalActions$Action;
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
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:- 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)
.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]
7. Now save changes and exit.- 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)
9. Smali (recompile) the finished android.policy.jarYou need to open GlobalActions$ScreenCap$1.smali, GlobalActions$Download.smali, GlobalActions$Recovery.smali and GlobalActions$SafeMode.smali and look for this line:
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$xxxCode: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;
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
.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
.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
<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>
<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" />
[B][COLOR="Blue"].field private mSafeModePref:Landroid/preference/CheckBoxPreference;[/COLOR]
[COLOR="Green"].field private mScreenShotPref:Landroid/preference/CheckBoxPreference;[/COLOR][/B]
.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]
.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
.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
: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
: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
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;
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)Some ROMs might have different number on reboot button (i.e, GlobalActions$5). You find right one by tracking mRestart
.end annotation
[COLOR="Blue"][B]# static fields
.field protected static rebootMode:I
.field protected static final rebootOptions:[Ljava/lang/String;[/B][/COLOR]
# instance fields
# 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
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:
to:Code:Lcom/android/server/pm/ShutdownThread
Code:Lcom/android/server/power/ShutdownThread
[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]
.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]
goto/16 :goto_b
.line 717
nop
[B][COLOR="Blue"] nop[/COLOR][/B]
:pswitch_data_1ca
.packed-switch 0x1
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
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
invoke-virtual {p1}, Landroid/telephony/SmsMessage;->getTimestampMillis()J
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
invoke-virtual {v0}, Landroid/telephony/gsm/CbMessage;->getTimestampMillis()J
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).
const-string v8, "android.intent.category[COLOR="Blue"].MULTIWINDOW[/COLOR]_LAUNCHER"
const-string v8, "android.intent.category.LAUNCHER"
[COLOR="Blue"][B].method public isSupportApp(Ljava/lang/String;)Z
.registers 2
.prologue
const/4 v0, 0x1
return p0
.end method[/B][/COLOR]
<bool name="config_fixedWallpaperOffset">[B][COLOR="Blue"]true[/COLOR][/B]</bool>
<bool name="config_fixedWallpaperOffset">[B][COLOR="Blue"]false[/COLOR][/B]</bool>
<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>
<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>
<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!!
<style name="HomeIcon" parent="@style/BaseHomeIcon">
<item name="android:textSize">[COLOR="Blue"][B]13.0[/B][/COLOR]dip</item>
<style name="MenuIcon" parent="@style/BaseMenuIcon">
<item name="android:textSize">[B][COLOR="Blue"]13.0[/COLOR][/B]dip</item>
ro.sf.lcd_density=[B][COLOR="Red"]320[/COLOR][/B]
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
.method protected handleLowBattery(Z)V
.registers 5
.parameter "temp"
.prologue
.line 2072
[COLOR="Blue"][B]return-void[/B][/COLOR]
const-string v1, "AbstractCameraActivity"
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
.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"
.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;
: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
: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
.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
.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!!
.method protected handleLowBattery(Z)V
.registers 4
.parameter "temp"
.prologue
.line 3267
[B][COLOR="Blue"]return-void[/COLOR][/B]
const-string v0, "Camcorder"
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
.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"
1. Go to classout\com\sec\android\app\camera\ folder and open MediaRecorderProfile.smali file.VIDEO QUALITY:
1080p: Normal - 17MBit / Fine - 24MBit / Superfine - 30MBit
720p: Normal - 9MBit / Fine - 13MBit / Superfine - 17MBit
SOUND QUALITY:
192kbit/s, 48000 khz
: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
.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
.method public static getRecipientLimit()I
.registers 1
.prologue
.line 656
[B][COLOR="Blue"]const/16 v0, 0xc8[/COLOR][/B]
return v0
.end method
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
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
.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
.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
.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
.method public static getMaxRecipientLength()I
.registers 1
.prologue
.line 2259
[B][COLOR="Blue"]const/16 v0, 0x3e8[/COLOR][/B]
return v0
.end method
.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
.method public static getMmsMaxRecipient()I
.registers 1
.prologue
.line 2498
[B][COLOR="Blue"]const/16 v0, 0x3e8[/COLOR][/B]
return v0
.end method
.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
.method public static getSmsToMmsTextThreshold()I
.registers 1
.prologue
.line 585
[B][COLOR="Blue"]const/16 v0, 0x3e8[/COLOR][/B]
return v0
.end method
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
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"
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
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.
.field private static final RATE_LIMIT:I = [B][COLOR="Red"]0x64[/COLOR][/B]
.field private static final RATE_LIMIT:I = [B][COLOR="Blue"]0x3e8[/COLOR][/B]
Why??
0x64 means 100 in hexadecimal format. So we put 0x3e8 which means 1000 in hexadecimal format
.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
.method public static getMaxSlideCount()I
.registers 1
.prologue
.line 825
[B][COLOR="Blue"]const/16 v0, 0x3e8[/COLOR][/B]
return v0
.end method
1. Decompile SystemUI.apk by APK-Multi-Tool.
<?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>
<item type="id" name="exp_power_stat">false</item>
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):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!!
.field mPostCollapseCleanup:Ljava/lang/Runnable;
[B][COLOR="Blue"].field mPowerWidget:Lcom/wanam/systemui/quickpanel/PowerWidget;[/COLOR][/B]
.field mQueueLock:Ljava/lang/Object;
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
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;
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):N.B: You should use the newly generated id in public.xml (in res\values folder) for "exp_power_stat" in place of 0x7fxxxxxx
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
<?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">
<?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">
.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
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:
Add the 3 frameworks (2,3 and 4):Code:isFrameworkApk: true usesFramework: ids: - 1 sdkInfo: minSdkVersion: '16' targetSdkVersion: '16'
Now you can make your changes and re-compile.Code:isFrameworkApk: true usesFramework: ids: - 1 [B][COLOR="Blue"] - 2 - 3 - 4[/COLOR][/B] sdkInfo: minSdkVersion: '16' targetSdkVersion: '16'
1. Decompile SystemUI.apk by APK-Multi tool
<?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>
4. Save changes, recompile and push to your phone.First blue line is for recent apps icon and the second one is for lock screen icon