Thread closed - Miscellaneous Android Development

Thread closed

Download attachment.zip from HERE
Screenshot inside the attachment.zip

Trying this!
---------- Post added at 01:58 PM ---------- Previous post was at 01:05 PM ----------
Its Giving error while cmpiling about parameter something.. If i remove the parameter like the tinted statusbar it gives me parameter errors of the next .smali file.. Any solution? Shall i remove all parameters??

Papdya said:
Trying this!
---------- Post added at 01:58 PM ---------- Previous post was at 01:05 PM ----------
Its Giving error while cmpiling about parameter something.. If i remove the parameter like the tinted statusbar it gives me parameter errors of the next .smali file.. Any solution? Shall i remove all parameters??
Click to expand...
Click to collapse
Android version?

Papdya said:
Trying this!
---------- Post added at 01:58 PM ---------- Previous post was at 01:05 PM ----------
Its Giving error while cmpiling about parameter something.. If i remove the parameter like the tinted statusbar it gives me parameter errors of the next .smali file.. Any solution? Shall i remove all parameters??
Click to expand...
Click to collapse
Apktool version used?

eboybasit said:
Guide "Android L Quick Setting {Toggle} Panel"
Items Required:
-Apktool v 1.5.2 {must}
-notepad ++
-attachment.zip
-brain.jar
-patience.apk
Procedure:-
-Decompile SystemUI.apk
-Open res/layout
-Open gemini_status_bar_expanded.xml (mtk) / tw_status_bar_expanded.xml (touchwiz) {depends on your chipset}
Copy this and paste it in your expanded.
Code:
<include layout="@layout/eboy_toggle_mda" />
Save it.
- Open res/values/colors.xml
● Copy the below given codes and paste it above </resources>
Code:
<color name="quickpanel_text_color_ing">#ff75899b</color>
<color name="quickpanel_text_color_off">#ff999fa4</color>
<color name="quickpanel_text_color_on">#ffffffff</color>
Save it.
Now Open ids.xml
● Copy the below given codes and paste it above </resources>
Code:
<item type="id" name="quickpanel_wifi_btn_icon">false</item>
<item type="id" name="quickpanel_bluetooth_btn_icon">false</item>
<item type="id" name="quickpanel_gps_btn_icon">false</item>
<item type="id" name="quickpanel_data_btn_icon">false</item>
<item type="id" name="quickpanel_sync_btn_icon">false</item>
<item type="id" name="quickpanel_rotate_btn_icon">false</item>
<item type="id" name="quickpanel_sound_btn_icon">false</item>
<item type="id" name="quickpanel_vibrate_btn_icon">false</item>
<item type="id" name="quickpanel_quick_settings">false</item>
Save it.
After that Open string.xml
● Copy the below given codes and paste it above </resources>
Code:
<string name="quickpanel_wifi_text">Wi-Fi</string>
<string name="quickpanel_bluetooth_text">Bluetooth</string>
<string name="quickpanel_gps_text">GPS</string>
<string name="quickpanel_data_text">Data</string>
<string name="quickpanel_sync_text">Auto\nSync</string>
<string name="quickpanel_rotate_text">Auto\nRotation</string>
<string name="quickpanel_sound_text">Sound</string>
<string name="quickpanel_vibrate_text">Vibration</string>
Merge files attachment.zip in their respective folders.
Save,,,,,Recompile and decompile again...
Now its time for id replacement.Open public.xml and search the corresponding id and replace it in corresponding smali file as said below.
FOR EXAMPLE YOU HAVE TO SEARCH ID OF TOGGLE IN PUBLIC.XML AND YOU HAVE TO REPLACE THIS 0X7F0D0152 BY THE ID YOU GOT FROM PUBLIC.XML
OPEN SystemUI\smali\com\mda\Ltoggle\AutoRotationSettingButton.smali (6 hits)
Code:
Line 98: const v3, 0x7f090168<public type="id" name="quickpanel_rotate_btn_icon"
Line 130: const v1, 0x7f02026b<public type="drawable" name="quickpanel_icon_rotate_on"
Line 133: const v4, 0x7f0a0010<public type="color" name="quickpanel_text_color_on"
Line 139: const v1, 0x7f02026a<public type="drawable" name="quickpanel_icon_rotate_off"
Line 142: const v4, 0x7f0a000f<public type="color" name="quickpanel_text_color_off"
Line 312: const v0, 0x7f0c01bb<public type="string" name="quickpanel_rotate_text"
OPEN SystemUI\smali\com\mda\Ltoggle\BluetoothSettingButton.smali (8 hits)
Code:
Line 146: const v3, 0x7f090164<public type="id" name="quickpanel_bluetooth_btn_icon"
Line 178: const v1, 0x7f020263<public type="drawable" name="quickpanel_icon_bluetooth_on"
Line 181: const v4, 0x7f0a0010<public type="color" name="quickpanel_text_color_on"
Line 187: const v1, 0x7f020262<public type="drawable" name="quickpanel_icon_bluetooth_off"
Line 190: const v4, 0x7f0a000f<public type="color" name="quickpanel_text_color_off"
Line 196: const v1, 0x7f020261<public type="drawable" name="quickpanel_icon_bluetooth_ing"
Line 199: const v4, 0x7f0a000e<public type="color" name="quickpanel_text_color_ing"
Line 477: const v0, 0x7f0c011e<public type="string" name="quickpanel_bluetooth_text"
OPEN SystemUI\smali\com\mda\Ltoggle\GpsSettingButton.smali (6 hits)
Code:
Line 98: const v3, 0x7f090165<public type="id" name="quickpanel_gps_btn_icon"
Line 130: const v1, 0x7f020267<public type="drawable" name="quickpanel_icon_gps_on"
Line 133: const v4, 0x7f0a0010<public type="color" name="quickpanel_text_color_on"
Line 139: const v1, 0x7f020266<public type="drawable" name="quickpanel_icon_gps_off"
Line 142: const v4, 0x7f0a000f<public type="color" name="quickpanel_text_color_off"
Line 312: const v0, 0x7f0c011f<public type="string" name="quickpanel_gps_text"
Open SystemUI\smali\com\mda\Ltoggle\MobileDataSettingButton.smali (6 hits)
Code:
Line 142: const v3, 0x7f090166<public type="id" name="quickpanel_data_btn_icon"
Line 174: const v1, 0x7f020265<public type="drawable" name="quickpanel_icon_data_on"
Line 177: const v4, 0x7f0a0010<public type="color" name="quickpanel_text_color_on"
Line 183: const v1, 0x7f020264<public type="drawable" name="quickpanel_icon_data_off"
Line 186: const v4, 0x7f0a000f<public type="color" name="quickpanel_text_color_off"
Line 433: const v0, 0x7f0c01ba<public type="string" name="quickpanel_data_text"
OPEN SystemUI\smali\com\mda\Ltoggle\SoundSettingButton.smali (6 hits)
Code:
Line 127: const v3, 0x7f090169<public type="id" name="quickpanel_sound_btn_icon"
Line 159: const v1, 0x7f02026d<public type="drawable" name="quickpanel_icon_sound_on"
Line 162: const v4, 0x7f0a0010<public type="color" name="quickpanel_text_color_on"
Line 168: const v1, 0x7f02026c<public type="drawable" name="quickpanel_icon_sound_off"
Line 171: const v4, 0x7f0a000f<public type="color" name="quickpanel_text_color_off"
Line 478: const v0, 0x7f0c01bc<public type="string" name="quickpanel_sound_text"
OPEN SystemUI\smali\com\mda\Ltoggle\SyncSettingButton.smali (6 hits)
Code:
Line 103: const v3, 0x7f090167<public type="id" name="quickpanel_sync_btn_icon"
Line 135: const v1, 0x7f02026f<public type="drawable" name="quickpanel_icon_sync_on"
Line 138: const v4, 0x7f0a0010<public type="color" name="quickpanel_text_color_on"
Line 144: const v1, 0x7f02026e<public type="drawable" name="quickpanel_icon_sync_off"
Line 147: const v4, 0x7f0a000f<public type="color" name="quickpanel_text_color_off"
Line 315: const v0, 0x7f0c0129<public type="string" name="quickpanel_sync_text"
OPEN SystemUI\smali\com\mda\Ltoggle\VibrateSettingButton.smali (6 hits)
Code:
Line 157: const v3, 0x7f09016a<public type="id" name="quickpanel_vibrate_btn_icon"
Line 189: const v1, 0x7f020271<public type="drawable" name="quickpanel_icon_vibrate_on"
Line 192: const v4, 0x7f0a0010<public type="color" name="quickpanel_text_color_on"
Line 198: const v1, 0x7f020270<public type="drawable" name="quickpanel_icon_vibrate_off"
Line 201: const v4, 0x7f0a000f<public type="color" name="quickpanel_text_color_off"
Line 330: const v0, 0x7f0c01bd<public type="string" name="quickpanel_vibrate_text"
OPEN SystemUI\smali\com\mda\Ltoggle\WifiSettingButton.smali (8 hits)
Code:
Line 90: const v3, 0x7f090163<public type="id" name="quickpanel_wifi_btn_icon"
Line 122: const v1, 0x7f020274<public type="drawable" name="quickpanel_icon_wifi_on"
Line 125: const v4, 0x7f0a0010<public type="color" name="quickpanel_text_color_on"
Line 131: const v1, 0x7f020273<public type="drawable" name="quickpanel_icon_wifi_off"
Line 134: const v4, 0x7f0a000f<public type="color" name="quickpanel_text_color_off"
Line 140: const v1, 0x7f020272<public type="drawable" name="quickpanel_icon_wifi_ing"
Line 143: const v4, 0x7f0a000e<public type="color" name="quickpanel_text_color_ing"
Line 415: const v0, 0x7f0c011d<public type="string" name="quickpanel_wifi_text"
Save, recompile, sign it and push.
Note:- If anyone got force close while long pressing the toggle ,,,he is requested to all the smalis of mda folder one by one and should replace the word collapsepanels by collapse
Tested in JB 4.1.2 (TOUCHWIZ) AND JB 4.2.2 (MTK) BY ME
Credit And Thanks To:
-Allah SWT
-Muhammad (sallal lahu alayhi wassallam)
-MDA
-Rio Hutaburat
-MAAADR
Click to expand...
Click to collapse
i dont think its working on kitkat :\

vibhu0009 said:
i dont think its working on kitkat :\
Click to expand...
Click to collapse
Thats your thinking,,,,,lets see what other make

Not working on KK[emoji17]
eboybasit said:
Thats your thinking,,,,,lets see what other make
Click to expand...
Click to collapse
vibhu0009 said:
i dont think its working on kitkat :\
Click to expand...
Click to collapse

Snapdragon815 said:
Not working on KK[emoji17]
Click to expand...
Click to collapse
I already said tested in jb hehe not in kk

haha..ur posting all maad tuts in.xda..Im also
going to do this..let me ask..admins..

ShadeSK said:
haha..ur posting all maad tuts in.xda..Im also
going to do this..let me ask..admins..
Click to expand...
Click to collapse
go n ask i took permissions to share not like grabbing credits like you :v,,,,why are u getting jealous of me :'v

ShadeSK said:
haha..ur posting all maad tuts in.xda..Im also
going to do this..let me ask..admins..
Click to expand...
Click to collapse
For your kind info this is the first tut of maaad i have shared here :'v go n check your dictionary

I don't understand step 1 tell me where past this line in status_bar_expanded.XML
Code:
<include layout="@layout/eboy_toggle_mda" />
If I Help You Then Say Thanks

relax guys he already ask permission on MaaaDr

ShadeSK said:
haha..ur posting all maad tuts in.xda..Im also
going to do this..let me ask..admins..
Click to expand...
Click to collapse
Vicky7999 said:
I don't understand step 1 tell me where past this line in status_bar_expanded.XML
Code:
<include layout="@layout/eboy_toggle_mda" />
If I Help You Then Say Thanks
Click to expand...
Click to collapse
In your gemini status bar expanded.xml

TheCardinal said:
relax guys he already ask permission on MaaaDr
Click to expand...
Click to collapse
thanks for proving my truthfullness sir @TheCardinal..... Mr @ShadeSK you got a call here

eboybasit said:
thanks for proving my truthfullness sir @TheCardinal..... Mr @ShadeSK you got a call here
Click to expand...
Click to collapse
i am a member there also @Eboy Basit on there facebook group. my name is zterh gadnu mcforest
member also of #underground and #material rom

Snapdragon815 said:
Not working on KK[emoji17]
Click to expand...
Click to collapse
lol on kitkat you wil get force close

vibhu0009 said:
lol on kitkat you wil get force close
Click to expand...
Click to collapse
Ok but not on every kk rom

eboybasit said:
Ok but not on every kk rom
Click to expand...
Click to collapse
i will give a try once again n see if its working or not

Related

[ACS][HOW-TO][EB13]Reboot Mode

How-To Reboot Mod
{
"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"
}
Brought To You By MysteryEmotionz​
I would like to say thank you to all my supporters and the people that have donated.
If you would like to donate don’t hesitate and buy me a beer by clicking any of my donation links or buy me a beer in my sig.
(Donation Link)
DISCLAIMER:
We at ACSyndicate are in no way, shape, or form responsible for bricking your device. You're flashing this product at your own risk. Always back up your device. If you point your finger and try to blame us we will laugh and enjoy our beer.
Credits:
untermensch for his reference thread.
Raiderep for bring this to DI18.
Mammon for DK28.
What You'll Need:
Android SDK
Apkmanager 4.9
Smali / Basmali
Image Editor
Notepad++
7Zip
Framework-res.apk
Android.policy.jar
Instructions:
1. Decompile Framework-res.apk using apk manager
2. Navigate to framework-res.apk/res/values
3. Open up public.xml using Notepad++
4. Add this line at the end of the strings section
Code:
<public type="string" name="reboot" id="0x010404cf" />
5. Add this line at the end of the drawable section
Code:
<public type="drawable" name="reboot" id="0x01080422" />
6. Save the xml
7. Still in framework-res.apk/res/values open up strings.xml and add this at the end
Code:
<string name="reboot">Reboot</string>
8. Create a reboot icons and save it has reboot.png
9. Drag that image into framework-res.apk/res/drawable
10. Compile the framework-res.apk
Thats if for framework-res.apk no to smali
1. Open up Android.policy.jar using 7Zip and pull out classes.dex and place it where you have smali and basmali
2. run this in your command prompt (where you have adb)
Code:
java -jar baksmali.jar -o out/classes/ classes.dex
3. Navigate to out/dex/com/android/internal/policy/impl
4. Copy GlobalActions$3.smali
5. Paste the copy of GlobalAction$3.smali and rename to GlobalAction$8.smali
6. Delete Everything in side and add using Notepad++
Code:
.class Lcom/android/internal/policy/impl/GlobalActions$8;
.super Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
.source "GlobalActions.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
value = Lcom/android/internal/policy/impl/GlobalActions;->createDialog()Landroid/app/AlertDialog;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x0
name = null
.end annotation
# instance fields
.field final synthetic this$0:Lcom/android/internal/policy/impl/GlobalActions;
# direct methods
.method constructor <init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
.registers 4
.parameter
.parameter "x0"
.parameter "x1"
.prologue
.line 243
iput-object p1, p0, Lcom/android/internal/policy/impl/GlobalActions$8;->this$0:Lcom/android/internal/policy/impl/GlobalActions;
invoke-direct {p0, p2, p3}, Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;-><init>(II)V
return-void
.end method
# virtual methods
.method public onPress()V
.registers 3
const-string v0, "Reboot Now"
invoke-static {v0}, Landroid/os/Power;->reboot(Ljava/lang/String;)V
return-void
.end method
.method public showBeforeProvisioning()Z
.registers 2
.prologue
.line 244
const/4 v0, 0x1
return v0
.end method
.method public showDuringKeyguard()Z
.registers 2
.prologue
.line 240
const/4 v0, 0x1
return v0
.end method
7. Save
8. Now open up GlobalActions.smali and add this at line 506
Code:
aput-object v2, v0, v1
const/4 v1, 0x4
new-instance v2, Lcom/android/internal/policy/impl/GlobalActions$8;
const v3, 0x1080422
const v4, 0x10404cf
invoke-direct {v2, p0, v3, v4}, Lcom/android/internal/policy/impl/GlobalActions$8;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
9. Save
10. In you command prompt run
Code:
java -Xmx512M -jar smali.jar out/classes/ classes.dex
11.Zip up both the framework-res.apk and andoid.policy.jar in a flashable zip and flash away
If you see any errors please let me know and ill adjust the instructions. Feel free to ask for help if also need.
Please give me a nod if you include this in any of your themes or roms
Check Out Our New Home​
​http://www.acsyndicate.net/
I'm gonna add download and recovery once I figure them out for eb13
Sent from my SPH-D700 using Tapatalk
MysteryEmotionz said:
I'm gonna add download and recovery once I figure them out for eb13
Sent from my SPH-D700 using Tapatalk
Click to expand...
Click to collapse
on dameon's stock deodexed rom I was able to use quickboot to get into recovery but it wouldn't mount the sdcard for some reason. reboot and shutdown worked fine but I'm assuming it's something with the redirector not mounting the sdcard? Either way, can't wait till you got this **** goin.
I'm gonna implement the same mods I did on eclair. This will elimante the need of a app. I'm thinking of just adding recovery and forget download mode as that one isn't really needed
Sent from my SPH-D700 using Tapatalk
MysteryEmotionz said:
I'm gonna implement the same mods I did on eclair. This will elimante the need of a app. I'm thinking of just adding recovery and forget download mode as that one isn't really needed
Sent from my SPH-D700 using Tapatalk
Click to expand...
Click to collapse
Yes download mode is not needed, as for clockwork, i never got it it to redirect on eclair, hopefully the new one will direct to my orange clockwork.
MysteryEmotionz said:
I'm gonna implement the same mods I did on eclair. This will elimante the need of a app. I'm thinking of just adding recovery and forget download mode as that one isn't really needed
Sent from my SPH-D700 using Tapatalk
Click to expand...
Click to collapse
I agree, don't waste your time on download mode. Reboot, Recovery, Power Off would be perfect.
I have working CW 3.0.0.6 in my midNIGHT ROM v4.... You need the kernel from the one click and the updated recovery file for the redirector in the system/bin. The problem is that the kernel in its current form breaks auto rotate... So right now you have to choose between auto rotate or working redirector.
I pulled it in v4.1 until the kernel is updated...
9. Drag that image into framework-res.apk/res/drawable
Click to expand...
Click to collapse
Are you sure it's not drawable-hdpi? Just double checking.
TheDub said:
Are you sure it's not drawable-hdpi? Just double checking.
Click to expand...
Click to collapse
Your correct thanks for pointing that out
Sent from my SPH-D700 using Tapatalk
Unfortunately it didn't work for me
Followed the directions to the word with the exception of changing "0x1080422" to "0x1080480" in both the Smali and Drawable section of public.xml due to the battery percent mod already using this id.
Compiled both files just fine.. it boots right up. The only noticable change is the font for Phone Options has changed (gone way down in size) and the phone eventually crashes.
TheDub said:
Unfortunately it didn't work for me
Followed the directions to the word with the exception of changing "0x1080422" to "0x1080480" in both the Smali and Drawable section of public.xml due to the battery percent mod already using this id.
Compiled both files just fine.. it boots right up. The only noticable change is the font for Phone Options has changed (gone way down in size) and the phone eventually crashes.
Click to expand...
Click to collapse
Are you using a de-odexed rom as your base?
Sent from my SPH-D700 using Tapatalk
MysteryEmotionz said:
Are you using a de-odexed rom as your base?
Sent from my SPH-D700 using Tapatalk
Click to expand...
Click to collapse
Yep, sure am.
TheDub said:
Yep, sure am.
Click to expand...
Click to collapse
pm me with your google talk so we can talk live and figure out what whent wrong
Sent from my SPH-D700 using Tapatalk
Sorry don't have Google Talk currently setup excpet my personal one heh I'll get around to get that setup for dev purposes...
but here are the changes I've made.
public.xml Changes
Code:
<public type="string" name="reboot" id="0x010404cf" />
<public type="drawable" name="reboot" id="0x01080480" />
strings.xml Changes
Code:
<string name="reboot">Reboot</string>
ClobalActions$8.smali
Code:
.class Lcom/android/internal/policy/impl/GlobalActions$8;
.super Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
.source "GlobalActions.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
value = Lcom/android/internal/policy/impl/GlobalActions;->createDialog()Landroid/app/AlertDialog;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x0
name = null
.end annotation
# instance fields
.field final synthetic this$0:Lcom/android/internal/policy/impl/GlobalActions;
# direct methods
.method constructor <init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
.registers 4
.parameter
.parameter "x0"
.parameter "x1"
.prologue
.line 243
iput-object p1, p0, Lcom/android/internal/policy/impl/GlobalActions$8;->this$0:Lcom/android/internal/policy/impl/GlobalActions;
invoke-direct {p0, p2, p3}, Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;-><init>(II)V
return-void
.end method
# virtual methods
.method public onPress()V
.registers 3
const-string v0, "Reboot Now"
invoke-static {v0}, Landroid/os/Power;->reboot(Ljava/lang/String;)V
return-void
.end method
.method public showBeforeProvisioning()Z
.registers 2
.prologue
.line 244
const/4 v0, 0x1
return v0
.end method
.method public showDuringKeyguard()Z
.registers 2
.prologue
.line 240
const/4 v0, 0x1
return v0
.end method
GlobalActions.smali (Lines 506-516)
Code:
aput-object v2, v0, v1
const/4 v1, 0x4
new-instance v2, Lcom/android/internal/policy/impl/GlobalActions$8;
const v3, 0x1080480
const v4, 0x10404cf
invoke-direct {v2, p0, v3, v4}, Lcom/android/internal/policy/impl/GlobalActions$8;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
From my phone it looks like you did everything right. I'll attach a copy of my globalactions$8.smali and globalactions.smali for you to compare. Honestly I think I may have missed a step in my how-to
Sent from my SPH-D700 using Tapatalk
TheDub said:
Sorry don't have Google Talk currently setup excpet my personal one heh I'll get around to get that setup for dev purposes...
but here are the changes I've made.
public.xml Changes
Code:
<public type="string" name="reboot" id="0x010404cf" />
<public type="drawable" name="reboot" id="0x01080480" />
strings.xml Changes
Code:
<string name="reboot">Reboot</string>
ClobalActions$8.smali
Code:
.class Lcom/android/internal/policy/impl/GlobalActions$8;
.super Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
.source "GlobalActions.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
value = Lcom/android/internal/policy/impl/GlobalActions;->createDialog()Landroid/app/AlertDialog;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x0
name = null
.end annotation
# instance fields
.field final synthetic this$0:Lcom/android/internal/policy/impl/GlobalActions;
# direct methods
.method constructor <init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
.registers 4
.parameter
.parameter "x0"
.parameter "x1"
.prologue
.line 243
iput-object p1, p0, Lcom/android/internal/policy/impl/GlobalActions$8;->this$0:Lcom/android/internal/policy/impl/GlobalActions;
invoke-direct {p0, p2, p3}, Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;-><init>(II)V
return-void
.end method
# virtual methods
.method public onPress()V
.registers 3
const-string v0, "Reboot Now"
invoke-static {v0}, Landroid/os/Power;->reboot(Ljava/lang/String;)V
return-void
.end method
.method public showBeforeProvisioning()Z
.registers 2
.prologue
.line 244
const/4 v0, 0x1
return v0
.end method
.method public showDuringKeyguard()Z
.registers 2
.prologue
.line 240
const/4 v0, 0x1
return v0
.end method
GlobalActions.smali (Lines 506-516)
Code:
aput-object v2, v0, v1
const/4 v1, 0x4
new-instance v2, Lcom/android/internal/policy/impl/GlobalActions$8;
const v3, 0x1080480
const v4, 0x10404cf
invoke-direct {v2, p0, v3, v4}, Lcom/android/internal/policy/impl/GlobalActions$8;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
Click to expand...
Click to collapse
I did the same but I kept getting errors when I put the last java command. It kept saying character not recognized a bunch of times. Any help?
rcastel2 said:
I did the same but I kept getting errors when I put the last java command. It kept saying character not recognized a bunch of times. Any help?
Click to expand...
Click to collapse
Try this to compile the jar.
java -Xmx512M -jar smali.jar out/classes/ -o new-classes.dex
Sent from my SPH-D700 using Tapatalk

[HOWTO]Implement Swipe to Remove Notification

Hi there, I want to share this tutorial for implementing Swipe-to-Remove Notification feature found in CyanogenMod to stock ROM (Gingerbread or earlier ROM). Sure it will be available on ICS but for those who like to add one to their custom ROM here's how Currently i don't know to whom should i give credit to, if anybody knows please post below and i'll add the link for the original modder. Thanks to:
1. like-p for help showing me what files to be edited
2. LeoMar75 for some info on how to control Stub switch case
This mod is based on Sony Ericsson Xperia Ray, so take care when adding to another device, some code might be different though so no direct copy paste, please learn some of the line first.
PS: For Froyo mod, please follow Jason-EX here
Requirement:
1. decompiled Framework.jar with Baksmali manager
2. decompiled SystemUI.apk with APK Multi Tool
3. Some Basic understanding about editing xml file and smali code.
4. WinMerge or other comparison tool (to better editing and comparing with my sample file)
5. Backup the framework.jar and SystemUI.apk first!
Files to be edited:
in SystemUI.apk
res/anim/
res/layout/status_bar_latest_event.xml
res/values/public.xml
smali/com/android/systemui/statusbar/LatestItemContainer$1.smali
smali/com/android/systemui/statusbar/LatestItemContainer.smali
smali/com/android/systemui/statusbar/StatusBarService$7.smali (or depends on your numbering, could be $8 or larger)
smali/com/android/systemui/statusbar/StatusBarService.smali
in framework.jar:
smali/com/android/internal/statusbar/IStatusBarService$Stub$Proxy.smali
smali/com/android/internal/statusbar/IStatusBarService$Stub.smali
smali/com/android/internal/statusbar/IStatusBarService.smali
UPDATE: This is the additional guide for other device when editing StatusBarService.smali. See here:
1. HTC based
2. Samsung based
Alright, let's mod one by one
1. Editing SystemUI.apk
1.1 Editing res/anim
We are registering anim object here, so swipe animation can be done.
Create folder anim (if not exists yet) inside /res folder
Create 2 file named slide_out_left_basic.xml and slide_out_right_basic.xml inside res/anim folder
for slide_out_left_basic.xml, edit the file and fill with this
Code:
<?xml version="1.0" encoding="utf-8"?>
<translate android:duration="@android:integer/config_mediumAnimTime" android:fromXDelta="0.0" android:toXDelta="-100.0%p"
xmlns:android="http://schemas.android.com/apk/res/android" />
for slide_out_right_basic.xml, edit the file and fill with this
Code:
<?xml version="1.0" encoding="utf-8"?>
<translate android:duration="@android:integer/config_mediumAnimTime" android:fromXDelta="0.0" android:toXDelta="100.0%p"
xmlns:android="http://schemas.android.com/apk/res/android" />
Save both
Update: Mirko ddd (&shoman94 have pointed that out before but i have no idea where to change, sorry mate) have given me the tip to improve the gesture. read his post here Thanks mate, both of you!
1.2 Editing res/layout/status_bar_latest_event.xml
We are replacing LinearLayout object used in StatusBar with LatestItemContainer here, so notification can be removed. We handle the Styling first by editing this .xml first. Here are the steps:
Change the code from Original code to this (change the bold one)
Code:
<?xml version="1.0" encoding="utf-8"?>
<[B]com.android.systemui.statusbar.LatestItemContainer [/B]android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="65.0sp"
xmlns:android="http://schemas.android.com/apk/res/android">
<com.android.systemui.statusbar.LatestItemView android:id="@id/content" android:background="@android:drawable/status_bar_item_background" android:paddingRight="6.0sp" android:focusable="true" android:clickable="true" android:layout_width="fill_parent" android:layout_height="64.0sp" android:shadowColor="#ff000000" android:shadowDx="0.0" android:shadowDy="1.0" android:shadowRadius="2.0" />
<View android:background="@drawable/divider_horizontal_light_opaque" android:layout_width="fill_parent" android:layout_height="wrap_content" />
<[B]/com.android.systemui.statusbar.LatestItemContainer[/B]>
Save
1.3 Editing res/values/public.xml
This one is for registering anim file that we made on step 1.1 to be available publicly and to be recognized in .smali program. Here are the steps:
Recompile your apk after putting anim file into /res folder
Decompile again the resulting apk
Inside /res/values/public.xml, you'll found something like this:
Code:
<resources>
.
.
.
[B]
<public type="anim" name="slide_out_left_basic" id="0x7f0c0000" />
<public type="anim" name="slide_out_right_basic" id="0x7f0c0001" />
[/B]
</resources>
[*]Remember the ID for both anim lines. This will be applied again on the step 1.4
1.4 Adding smali/com/android/systemui/statusbar/LatestItemContainer$1.smali and smali/com/android/systemui/statusbar/LatestItemContainer.smali
This is the class of LatestItemContainer that will be used to handle the notification list instead of LatestItemView. Here are the steps:
Please download from the attachment
insert the files inside to mentioned folder above
Inside LatestItemContainer$1.smali, there's an id that references the anim from step1.2. please edit it if you have different id for anim left or anim from previous step.
Code:
.line 53
:cond_0
const/high16 v1, [B]0x7f0c[/B]
and
Code:
.line 51
const v1, [B]0x7f0c0001[/B]
1.5 Add smali/com/android/systemui/statusbar/StatusBarService$7.smali (or depends on your existing framework numbering, could be $8 or larger)
This is additional function for StatusBarService to handle onClearNotification function. Here are the steps:
Extract the StatusBarService$7.smali from attachment
If StatusBarService$7.smali does not exist before, just place it inside, if not, skip this step.
If StatusBarService$7.smali exists, Please rename the file to StatusBarService$8.smali (or whatever higher number that is unused) and rename all the line inside the file from
Code:
StatusBarService$7
to
Code:
StatusBarService$8
1.6 Edit smali/com/android/systemui/statusbar/StatusBarService.smali
UPDATE: This is the additional guide for other device when editing StatusBarService.smali. See here:
1. Generic java readout
2. HTC based
3. Samsung based
This is the file that generate NotificationView. Please take care of the changes here more carefully because there might be some differences between vendors in this file. Here are the steps:
Open StatusBarService.smali and find this function
Code:
.method makeNotificationView(Lcom/android/internal/statusbar/StatusBarNotification;Landroid/view/ViewGroup;)[Landroid/view/View;
Find this code in the makeNotificationView function body:
Code:
invoke-virtual {v0, v1, v2, v3}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;
move-result-object v18
const v4, 0x7f0b0014
move-object/from16 v0, v18
move v1, v4
invoke-virtual {v0, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;
move-result-object v10
Insert the bold code below between the existing code:
Code:
invoke-virtual {v0, v1, v2, v3}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;
move-result-object v18
[B] check-cast v18, Lcom/android/systemui/statusbar/LatestItemContainer;
.line 516
.local v18, row:Lcom/android/systemui/statusbar/LatestItemContainer;
move-object/from16 v0, v16
iget v0, v0, Landroid/app/Notification;->flags:I
move v4, v0
and-int/lit8 v4, v4, 0x2
if-nez v4, :cond_swno
move-object/from16 v0, v16
iget v0, v0, Landroid/app/Notification;->flags:I
move v4, v0
and-int/lit8 v4, v4, 0x20
if-nez v4, :cond_swno
new-instance v4, Lcom/android/systemui/statusbar/StatusBarService$7;
move-object v0, v4
move-object/from16 v1, p0
move-object/from16 v2, p1
invoke-direct {v0, v1, v2}, Lcom/android/systemui/statusbar/StatusBarService$7;-><init>(Lcom/android/systemui/statusbar/StatusBarService;Lcom/android/internal/statusbar/StatusBarNotification;)V
move-object/from16 v0, v18
move-object v1, v4
invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/LatestItemContainer;->setOnSwipeCallback(Ljava/lang/Runnable;)V
.line 735
:cond_swno[/B]
const v4, 0x7f0b0014
move-object/from16 v0, v18
move v1, v4
[B] invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/LatestItemContainer;->findViewById(I)Landroid/view/View;[/B]
move-result-object v10
Once again, change
Code:
StatusBarService$7
to
Code:
StatusBarService$8
line if you happened to have StatusBarService$8.smali as the result of renaming on the previous step.
IMPORTANT LOGIC TO BE UNDERSTOOD: This step tells the function to:
1. cast the already made View Object to LatestItemContainer instead of using LatestView class.
2. Filter if the Notification is removable or not
3. the LatestItemContainer object (v18) is assigned with onSwipeCallback(new StatusBarService$7)
Change the following (still on the same function body):
Code:
move v1, v4
invoke-virtual {v0, v1}, Landroid/view/View;->setDrawingCacheEnabled(Z)V
.line 542
const/4 v4, 0x3
to
Code:
move v1, v4
[B] invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/LatestItemContainer;->setDrawingCacheEnabled(Z)V
[/B]
.line 542
const/4 v4, 0x3
Please note:
StatusBarService.smali might be different between vendor, so please adapt with your .smali to implement the above coding.
2. Editing framework.jar
2.1 editing smali/com/android/internal/statusbar/IStatusBarService$Stub.smali
Here are the steps:
Add this code on variable declaration part inside the file
Code:
.field static final TRANSACTION_onClearAllNotifications:I = 0xb
[B].field static final TRANSACTION_onNotificationClear:I = 0xc[/B]
.field static final TRANSACTION_onNotificationClick:I = 0x9
.field static final TRANSACTION_onNotificationError:I = 0xa
If the 0xc is already used on another static value, you must change it so it remains unique.
Find this code:
Code:
.method public onTransact(ILandroid/os/Parcel;Landroid/os/Parcel;I)Z
.registers 14
.parameter "code"
.parameter "data"
.parameter "reply"
.parameter "flags"
.annotation system Ldalvik/annotation/Throws;
value = {
Landroid/os/RemoteException;
}
.end annotation
.prologue
.line 39
sparse-switch p1, :sswitch_data_124
change to
Code:
.method public onTransact(ILandroid/os/Parcel;Landroid/os/Parcel;I)Z
.registers 14
.parameter "code"
.parameter "data"
.parameter "reply"
.parameter "flags"
.annotation system Ldalvik/annotation/Throws;
value = {
Landroid/os/RemoteException;
}
.end annotation
.prologue
.line 39
[B]sparse-switch p1, :sswitch_data_13e[/B]
Insert/replace this code (it is at the end of the file):
Code:
.line 176
const/4 v0, 0x1
goto/16 :goto_7
.line 39
:sswitch_data_124
.sparse-switch
0x1 -> :sswitch_f
0x2 -> :sswitch_1c
0x3 -> :sswitch_29
0x4 -> :sswitch_42
0x5 -> :sswitch_5f
0x6 -> :sswitch_7b
0x7 -> :sswitch_8d
0x8 -> :sswitch_c7
0x9 -> :sswitch_d5
0xa -> :sswitch_ef
0xb -> :sswitch_116
0x5f4e5446 -> :sswitch_8
.end sparse-switch
to
Code:
[B]
.line 176
const/4 v0, 0x1
goto/16 :goto_7
.end local v1 #_arg0:Ljava/lang/String;
.end local v2 #_arg1:Ljava/lang/String;
.end local v3 #_arg2:I
:sswitch_124
const-string v0, "com.android.internal.statusbar.IStatusBarService"
invoke-virtual {p2, v0}, Landroid/os/Parcel;->enforceInterface(Ljava/lang/String;)V
.line 177
invoke-virtual {p2}, Landroid/os/Parcel;->readString()Ljava/lang/String;
move-result-object v1
.line 178
.restart local v1 #_arg0:Ljava/lang/String;
invoke-virtual {p2}, Landroid/os/Parcel;->readString()Ljava/lang/String;
move-result-object v2
.line 179
.restart local v2 #_arg1:Ljava/lang/String;
invoke-virtual {p2}, Landroid/os/Parcel;->readInt()I
move-result v3
.line 180
.restart local v3 #_arg2:I
invoke-virtual {p0, v1, v2, v3}, Lcom/android/internal/statusbar/IStatusBarService$Stub;->onNotificationClear(Ljava/lang/String;Ljava/lang/String;I)V
.line 181
invoke-virtual {p3}, Landroid/os/Parcel;->writeNoException()V
.line 182
const/4 v0, 0x1
goto/16 :goto_7[/B]
.line 39
:sswitch_data_13e
.sparse-switch
0x1 -> :sswitch_f
0x2 -> :sswitch_1c
0x3 -> :sswitch_29
0x4 -> :sswitch_42
0x5 -> :sswitch_5f
0x6 -> :sswitch_7b
0x7 -> :sswitch_8d
0x8 -> :sswitch_c7
0x9 -> :sswitch_d5
0xa -> :sswitch_ef
0xb -> :sswitch_116
[B]0xc -> :sswitch_124[/B]
0x5f4e5446 -> :sswitch_8
.end sparse-switch
it's important to note this
Code:
[B]0xc -> :sswitch_124[/B]
If you rename the static at the previous steps, please change the 0xc accordingly.
2.2 Editing smali/com/android/internal/statusbar/IStatusBarService$Stub$Proxy.smali
Here are the steps:
Insert these function code to the file:
Code:
.method public onNotificationClear(Ljava/lang/String;Ljava/lang/String;I)V
.registers 9
.parameter "pkg"
.parameter "tag"
.parameter "id"
.annotation system Ldalvik/annotation/Throws;
value = {
Landroid/os/RemoteException;
}
.end annotation
.prologue
.line 359
invoke-static {}, Landroid/os/Parcel;->obtain()Landroid/os/Parcel;
move-result-object v0
.line 360
.local v0, _data:Landroid/os/Parcel;
invoke-static {}, Landroid/os/Parcel;->obtain()Landroid/os/Parcel;
move-result-object v1
.line 362
.local v1, _reply:Landroid/os/Parcel;
:try_start_8
const-string v2, "com.android.internal.statusbar.IStatusBarService"
invoke-virtual {v0, v2}, Landroid/os/Parcel;->writeInterfaceToken(Ljava/lang/String;)V
.line 363
invoke-virtual {v0, p1}, Landroid/os/Parcel;->writeString(Ljava/lang/String;)V
.line 364
invoke-virtual {v0, p2}, Landroid/os/Parcel;->writeString(Ljava/lang/String;)V
.line 365
invoke-virtual {v0, p3}, Landroid/os/Parcel;->writeInt(I)V
.line 366
iget-object v2, p0, Lcom/android/internal/statusbar/IStatusBarService$Stub$Proxy;->mRemote:Landroid/os/IBinder;
const/16 v3, 0xa
const/4 v4, 0x0
invoke-interface {v2, v3, v0, v1, v4}, Landroid/os/IBinder;->transact(ILandroid/os/Parcel;Landroid/os/Parcel;I)Z
.line 367
invoke-virtual {v1}, Landroid/os/Parcel;->readException()V
:try_end_21
.catchall {:try_start_8 .. :try_end_21} :catchall_28
.line 370
invoke-virtual {v1}, Landroid/os/Parcel;->recycle()V
.line 371
invoke-virtual {v0}, Landroid/os/Parcel;->recycle()V
.line 373
return-void
.line 370
:catchall_28
move-exception v2
invoke-virtual {v1}, Landroid/os/Parcel;->recycle()V
.line 371
invoke-virtual {v0}, Landroid/os/Parcel;->recycle()V
throw v2
.end method
Please inspect the code for this part:
Code:
[B]const/16 v3, 0xa[/B]
const/4 v4, 0x0
invoke-interface {v2, v3, v0, v1, v4}, Landroid/os/IBinder;->transact(ILandroid/os/Parcel;Landroid/os/Parcel;I)Z
The bold one must match on one of the switch case value at the end of IStatusBarService$Stub.smali,
in my phone actually the valid one is the TRANSACTION_onNotificationError (0xa) so if your NotificationError is not 0xa but 0xb for example, please change the bold one to 0xb
Save
2.3 editing smali/com/android/internal/statusbar/IStatusBarService.smali
Insert this function code to the file. Here are the steps:
Insert these function code to the file:
Code:
.method public abstract onNotificationClear(Ljava/lang/String;Ljava/lang/String;I)V
.annotation system Ldalvik/annotation/Throws;
value = {
Landroid/os/RemoteException;
}
.end annotation
.end method
Save
There you have it AFAIK, the files that you need to take care more than others are:
1. smali/com/android/systemui/statusbar/StatusBarService.smali
2. res/values/public.xml
The rest can be applied from the attachment below directly. Ok that's all, after you are done, compile both SystemUI.apk and Framework.jar.
How to Compile the right way?
1. SystemUI.apk ->
Compile with APK Multi Tool, press y and y twice with all the requested input,
delete modified file from keep folder, and after that continue compiling.
Copy from original APK the META-INF and AndroidManifest.xml to the unsignedSystemUI.apk
rename unsignedSystemUI.apk to signedSystemUI.apk
select Zipalign from APK Multi Tool to optimize apk.
Rename to SystemUI.apk (move the original one just in case)
2. framework.jar ->
Smali inside Baksmali Manager
Replace classes.dex inside framework.jar with the generated one.
and apply on your phone.
Hope this helps you (programmer ofc, not end user ) to implement on your device.
G'day!
Mate, thank you so much for this - I have been trying to figure it out for our ROM for weeks LOL I'm going to give it a try this evening and I'll let you know if I get it! Thanks again
Dunc001 said:
Mate, thank you so much for this - I have been trying to figure it out for our ROM for weeks LOL I'm going to give it a try this evening and I'll let you know if I get it! Thanks again
Click to expand...
Click to collapse
Ok let me know mate
ill try it on my SGY
Looks fun! great post
tommytomatoe said:
Looks fun! great post
Click to expand...
Click to collapse
Updated step, to give you some warning about StatusBarService$7 naming convention
definitely gonna give this a try!!
great akaka.try it soon.
did u know how to port ICS layout to stock rom? can u write a tut?
this will be great!!
nvt992 said:
great akaka.try it soon.
did u know how to port have ICS layout to stock rom? can u write a tut?
this will be great!!
Click to expand...
Click to collapse
What layout? Do you mean ICS launcher layout or..?
no.see my attach
nvt992 said:
no.see my attach
Click to expand...
Click to collapse
Well do you have the original link? First, i know nothing about that, so i should learn first. and secondly, it's more about theme editing, so i think it's more about editing XML inside SystemUI.apk rather than coding a .smali like above. Thirdly, the shortcut for setting in ICS IMHO is not as efficient as Power Widget Status Bar.
hansip87 said:
Well do you have the original link? First, i know nothing about that, so i should learn first. and secondly, it's more about theme editing, so i think it's more about editing XML inside SystemUI.apk rather than coding a .smali like above. Thirdly, the shortcut for setting in ICS IMHO is not as efficient as Power Widget Status Bar.
Click to expand...
Click to collapse
this is for cm7
patch http://forum.xda-developers.com/showthread.php?t=1324924
or original theme
http://forum.xda-developers.com/showthread.php?t=1334922
hope u can do it
nvt992 said:
this is for cm7
patch http://forum.xda-developers.com/showthread.php?t=1324924
or original theme
http://forum.xda-developers.com/showthread.php?t=1334922
hope u can do it
Click to expand...
Click to collapse
Well ok thanks but don't count on me ok because i am currently researching for 2G/3G toggle button for PowerWidget, this one is not that high on my list, but you never know..
ok thank you
where can i get Baksmali manager?
lasmaty07 said:
where can i get Baksmali manager?
Click to expand...
Click to collapse
Check back later mate, just uploading right now because of on the original link, it's dead. I'll upload it for us all to share
EDIT: Uploaded. Click Baksmali Manager link on the first page to download. APK Multi Tool can be found on the same parent thread (Hacking General)
Done, but get this error when recompiling .apk
Code:
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\me\Desktop\folder>apktool.bat b -f -d out
I: Smaling...
Exception in thread "main" brut.androlib.AndrolibException: Could not smali file
: [email protected]
at brut.androlib.src.DexFileBuilder.addSmaliFile(Unknown Source)
at brut.androlib.src.DexFileBuilder.addSmaliFile(Unknown Source)
at brut.androlib.src.SmaliBuilder.buildFile(Unknown Source)
at brut.androlib.src.SmaliBuilder.build(Unknown Source)
at brut.androlib.src.SmaliBuilder.build(Unknown Source)
at brut.androlib.Androlib.buildSourcesSmali(Unknown Source)
at brut.androlib.Androlib.buildSources(Unknown Source)
at brut.androlib.Androlib.build(Unknown Source)
at brut.androlib.Androlib.build(Unknown Source)
at brut.apktool.Main.cmdBuild(Unknown Source)
at brut.apktool.Main.main(Unknown Source)
Tried to do it manually like this and using apk multitool, but same error in log.
even tried to compile just after decompiling but that's no help.. same error
Any help?
jaggyjags said:
Done, but get this error when recompiling .apk
Code:
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\me\Desktop\folder>apktool.bat b -f -d out
I: Smaling...
Exception in thread "main" brut.androlib.AndrolibException: Could not smali file
: [email protected]
at brut.androlib.src.DexFileBuilder.addSmaliFile(Unknown Source)
at brut.androlib.src.DexFileBuilder.addSmaliFile(Unknown Source)
at brut.androlib.src.SmaliBuilder.buildFile(Unknown Source)
at brut.androlib.src.SmaliBuilder.build(Unknown Source)
at brut.androlib.src.SmaliBuilder.build(Unknown Source)
at brut.androlib.Androlib.buildSourcesSmali(Unknown Source)
at brut.androlib.Androlib.buildSources(Unknown Source)
at brut.androlib.Androlib.build(Unknown Source)
at brut.androlib.Androlib.build(Unknown Source)
at brut.apktool.Main.cmdBuild(Unknown Source)
at brut.apktool.Main.main(Unknown Source)
Tried to do it manually like this and using apk multitool, but same error in log.
even tried to compile just after decompiling but that's no help.. same error
Any help?
Click to expand...
Click to collapse
APKTools is a bit outdated and i'm afraid some incompatibilites with Google SDK might be the source of the problem. search APK Multi Tools and use that one instead with SDK release 16 and up.
Hello, and thanks for the how-to!
Sadly I couldn't get it to work on my phone (Motorola Atrix 2). Some of the smali files were pretty different... I tried my best but there were definitely moments when I wasn't sure if I was doing the correct thing... SystemUI won't compile.
Hi, all. Seems the statusbarservice.smali is very different from each other. So to help you all, this is the java code that should give you a better understanding. Please read here https://github.com/nadlabak/android...m/android/server/status/StatusBarService.java
Sent from my ST18i using XDA App

[Dev][Modding]TW Lollipop, Torch, 5Way reboot, SystemUI patches [more]

Before everything I am still a noob and this is what I read, dig and somehow have been trying to figure out so please be friendly if you got some of/his so-called guides are not complete or need to be more comprehensive. And as sharing is caring I would like to share some hack or patches to make our devices smarter.
Requirement:
apktool. I have been using Advanced ApkTool but there is some problem on Samsung Lollipop on which some apps cannot be decompiled/recompile correctly. Then, I found an apktool kit which is moddified specially for Samsung Lollipop android version and I repacked Advanced ApkTool with the proper apktool.
You can download it here. credit @BDFreak
Notepad++ program from here
Willing to learn, patience, sense of try and error and a little brain
Content:
5Way Reboot TW lollipop
Enable Torch Toggle in Settings
Add Internet Speed meter on Statusbar
Remove Sfinder and Quick Connect from notification panel:
3Minit Battery
Add lockscreen and recent shortcut on Notification panel header
Move WiFi and Data icons to left side of statusbar
3minit quick launch for TW Lollipop
Center Clock on statusbar
How to enable other Samsung lockscreen effects
Add Flashlight and Screenshot to Power Menu
TW Themeing guides
Remove green and orange banner when dialing/receiving calls
How to make Sun shape AOSP brightness handle on notification panel
How to make AOSP category divider on SETTINGS
5Way Reboot TW
Marshmallow
See here
Lollipop
Credit @darkera13 from http://samsungviet.vn/ :good:
And thanks @daxgirl for some hints :good:
I thought here is good place to post and keep some guides for future modifications.
Decompile android.policy.jar and go to smali /com/android/internal/policy/impl/GlobalActions.smali
Search:
Code:
new-instance v2, Lcom/android/internal/policy/impl/GlobalActions$[COLOR="SeaGreen"]8[/COLOR];
Change to:
Code:
new-instance v2, Lcom/android/internal/policy/impl/GlobalActions$[COLOR="Red"]99[/COLOR];
Search:
Code:
invoke-direct {v2, v0, v3, v4}, Lcom/android/internal/policy/impl/GlobalActions$[COLOR="SeaGreen"]8[/COLOR];-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
Change to:
Code:
invoke-direct {v2, v0, v3, v4}, Lcom/android/internal/policy/impl/GlobalActions$[COLOR="red"]99[/COLOR];-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
Save this file and now open smali/com/android/internal/policy/impl/GlobalActions $ SinglePressAction.smali
Search:
Code:
# Instance fields
Add following in red above it
Code:
[COLOR="SeaGreen"].end annotation[/COLOR]
# static fields
[COLOR="Red"].field public static rebootMode:I
.field public static final rebootOptions:[Ljava/lang/String;
.field public static final rebootString:[Ljava/lang/String;[/COLOR]
[COLOR="SeaGreen"]# instance fields
.field public customAction:I[/COLOR]
Search:
Code:
.method protected constructor <init>(II)V
Add entire method above it
Code:
# direct methods
.method static constructor <clinit>()V
.locals 9
const/4 v8, 0x5
const/4 v7, 0x4
const/4 v6, 0x3
const/4 v5, 0x2
const/4 v4, 0x1
const/4 v3, 0x0
new-array v0, v8, [Ljava/lang/String;
const-string v2, "Reboot"
aput-object v2, v0, v3
const-string v2, "Hot Reboot"
aput-object v2, v0, v4
const-string v2, "Download"
aput-object v2, v0, v5
const-string v2, "Recovery"
aput-object v2, v0, v6
const-string v2, "Safe Mode"
aput-object v2, v0, v7
sput-object v0, Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;->rebootString:[Ljava/lang/String;
new-array v1, v8, [Ljava/lang/String;
const-string v2, "Reboot"
aput-object v2, v1, v3
const-string v2, "Hot Reboot"
aput-object v2, v1, v4
const-string v2, "Download"
aput-object v2, v1, v5
const-string v2, "Recovery"
aput-object v2, v1, v6
const-string v2, "Safe Mode"
aput-object v2, v1, v7
sput-object v1, Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;->rebootOptions:[Ljava/lang/String;
return-void
.end method
[COLOR="SeaGreen"].method protected constructor <init>(II)V[/COLOR]
Save. Now download attached files and copy them into smali/com/android/internal/policy/impl/here.
Make sure Lcom/android/internal/policy/impl/GlobalActions got the same access$, it's access$500 at my end it might be different in different devices. Compare GlobalActions.smali with GlobalActions$99.smali
There is an id in GlobalActions$99;
Code:
const v2, [COLOR="Red"]0x112000a[/COLOR]
that also needs to be same as in framework>public
Code:
<public type="bool" name="show_ongoing_ime_switcher" id="0x0112000a" />
Click to expand...
Click to collapse
Recompile and profit.
If you would like to change power menu's title, open GlobalActions$99.smali
Search for
Code:
const-string v2, "[COLOR="Red"]Reboot Options[/COLOR]"
and change it to whatever you wish
Enable Torch Toggle in Settings
Integrate In Settings
edit 1: Smali's are updated to cover all TW devices thanks @tdunham :good:
edit 2: Smali's are updated for Android MM compatibilty thanks @tdunham @edzamber :good:
Decompile Settings
Download attached torch_materials.zip and paste them accordingly
Go to values folder open arrays.xml and check whether following arrays are availble if not add them
Code:
<string-array name="torchlight_timeout_entries">
<item>15 seconds</item>
<item>30 seconds</item>
<item>1 minute</item>
<item>2 minutes</item>
<item>10 minutes</item>
</string-array>
<string-array name="torchlight_timeout_values">
<item>15000</item>
<item>30000</item>
<item>60000</item>
<item>120000</item>
<item>600000</item>
</string-array>
Go to values folder open plurals.xml and check whether you have following plurals if not add them
Code:
</plurals>
<plurals name="torchlight_timeout_minutes">
<item quantity="other">%d minutes</item>
<item quantity="one">1 minute</item>
</plurals>
<plurals name="torchlight_timeout_seconds">
<item quantity="other">%d seconds</item>
<item quantity="one">1 second</item>
</plurals>
Go to values folder open strings.xml and check whether you have following strings if not add them
Code:
<string name="torchlight_settings">Torch light</string>
<string name="torchlight_settings_title">Torch light</string>
<string name="torchlight_summary">Turn on the torch light by pressing and holding the volume up key while the screen is off.</string>
<string name="torchlight_timeout_title">Torch light time-out</string>
<string name="torchlight_timeout_summary">After %1$s</string>
Go to xml folder, open device_headers.xml and add following line in red
Code:
[COLOR="Red"] </header>
<header android:icon="@drawable/ic_settings_torchlight" android:id="@id/torchlight_settings" android:title="@string/torchlight_settings" android:fragment="com.android.settings.torchlight.TorchlightSettings" />[/COLOR]
<header android:icon="@drawable/ic_settings_powersaving" android:id="@id/power_saving_mode" android:title="@string/power_saving_mode_title" android:fragment="com.android.settings.powersavingmode.MenuPowerSavingModeSettings" />
add red line below in display_settings_2013.xml.
Code:
<CheckBoxPreference android:title="@string/intelligent_sleep_title" android:key="smartscreen_stay" android:summary="@string/intelligent_sleep_summary" />
[COLOR="Red"]<PreferenceScreen android:title="Torchlight" android:key="[COLOR="red"]torchlight[/COLOR]" android:fragment="com.android.settings.torchlight.TorchlightSettings" />[/COLOR]
<CheckBoxPreference android:title="@string/smart_pause_title" android:key="smartscreen_pause" android:summary="@string/smart_pause_summary" />
Now it's time to create ids, so recompile and rename settings as settings_new to avoid confusion
Now decompile settings_new
Go to TorchlightSettings.smali
Open public.xml too and check what I noted beside every id, match ids accordingly
Recompile and profit >
Integrate in ROM Control (MM)
Code:
<SwitchPreference
android:title="Torchlight"
android:key="[COLOR="Red"]torchlight_enable[/COLOR]"
android:summary="Turn on the torch light by pressing and holding the volume up key while the screen is off" android:defaultValue="0" />
<com.[COLOR="Red"]aryamod[/COLOR].romcontrol.prefs.MyListPreference
android:entries="@array/torchlight_timeout_entries"
android:title="@string/torchlight_timeout_title"
android:key="torchlight_timeout"
android:dependency="torchlight_enable"
android:entryValues="@array/torchlight_timeout_values" />
Add Auto Start Management
This mod would let you choose to prevent/allow selected apps of running on system startup.
Download attached zip and drop those files in your settings.
Now go to values open ids.xml and add following
Code:
<item type="id" name="autostarts_settings">false</item>
<item type="id" name="appName">false</item>
<item type="id" name="aryamod">false</item>
open strings.xml and add following:
Code:
<string name="autostarts_title">Autostarts</string>
<string name="autostarts_allowed">Has allowed</string>
<string name="autostarts_prohibited">Has prohibited</string>
<string name="autostarts_allow_progress_msg">Being restored boot, please wait...</string>
<string name="autostarts_prohibit_progress_msg">Prohibit boot, please wait...</string>
<string name="autostarts_empty_msg">No installation boot applications</string>
<string name="autostarts_optimize_empty_msg">No optimize the startup items</string>
<string name="autostarts_optimize_btn_title">Optimize the startup items</string>
<string name="autostarts_all_btn_title">Automatically Start All Applications</string>
You also need to add a header for it, which can be added anywhere in settings depending on your preference, I added in DEVICE tab like below:
Add line below in display_headers.xml.
Code:
<header android:icon="@drawable/ic_settings_autostarts" android:id="@id/aryamod" android:title="@string/autostarts_title" android:fragment="com.android.settings.autostarts.LewaManageAutostarts" />
Now it's time to produce ID, so recompile modified settings and decompile it again, go to autostart smali materials and check those IDs which I noted (starting with #<public type="...) in those smali, there might be several to check and match with your produced IDs.
How to enable UPSM for Note 3
In this guide we would mod service.jar and secsettings.apk, firstly download UPSM.zip and put EmergencyLauncher, EmergencyModeService and EmergencyProvider in app folder in attached zip.
service.jar
decompile service.jar and go to services\com\android\server
open SystemServer.smali and search for
Code:
.method static final startEmergencyModeService(Landroid/content/Context;)V
and change the entire method with following:
Code:
.method static final startEmergencyModeService(Landroid/content/Context;)V
.registers 6
:try_start_0
invoke-static {p0}, Lcom/sec/android/emergencymode/EmergencyManager;->getInstance(Landroid/content/Context;)Lcom/sec/android/emergencymode/EmergencyManager;
move-result-object v1
invoke-virtual {v1}, Lcom/sec/android/emergencymode/EmergencyManager;->readyEmergencyMode()V
:try_end_7
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_7} :catch_8
:goto_7
return-void
:catch_8
move-exception v0
const-string v2, "SystemServer"
new-instance v3, Ljava/lang/StringBuilder;
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
const-string v4, "Starting emergency service failed: "
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v3
invoke-virtual {v3, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
move-result-object v3
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v3
invoke-static {v2, v3}, Landroid/util/Slog;->d(Ljava/lang/String;Ljava/lang/String;)I
goto :goto_7
.end method
OK now UPSM is enabled but there is a issue that after disabling it some widgets would be removed from the home screen so we need to correct the service
go to services\com\android\server\appwidget
open AppWidgetServiceImpl.smali and search for following method
Code:
.method private deleteProviderLocked(Lcom/android/server/appwidget/AppWidgetServiceImpl$Provider;)V
Now change the entire method the one in zip attached
same smali search for
Code:
.method private queryIntentReceivers(Landroid/content/Intent;I)Ljava/util/List;
change the entire method the one in zip attached
Search for this method
Code:
.method private readProfileStateFromFileLocked(Ljava/io/FileInputStream;ILjava/util/List;)I
change the entire method the one in zip attached
SecSettings.apk
Next we need to enable and access UPSM launcher that depends on you whether you have your own rom customizer or would like to add it in settings, I couldn't find proper smali to enable it as stock but I tired adding it in settings as following
decompile secsettings and add this in id.xml
Code:
<item type="id" name="aryamod">false</item>
open display_headers.xml and add UPSM header everywhere you would like to be shown like this:
Code:
<header android:icon="@drawable/ic_settings_powersaving" android:id="@id/aryamod" android:title="@string/powersaving_ultra" android:key="ultra_powersaving" android:fragment="com.android.settings.powersavingmode.PowerSavingModeUltra" />
Add Internet Speed meter on Statusbar
Decompile SystemUI.apk
Go to SystemUI.apk\res\layout open system_icons.xml
Add following line in red
Code:
<LinearLayout android:gravity="center" android:orientation="horizontal" android:id="@id/signal_battery_cluster" android:layout_width="wrap_content" android:layout_height="fill_parent" android:paddingStart="2.0dip">
[COLOR="Red"] <com.android.systemui.statusbar.policy.Traffic android:textAppearance="@style/TextAppearance.StatusBar.Traffic" android:gravity="left|center" android:id="@id/traffic" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />[/COLOR]
<include android:id="@id/signal_cluster" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginStart="2.0dip" android:layout_marginEnd="@dimen/rssi_battery_gap" layout="@layout/signal_cluster_view" />
Go to Values folder and add this in styles.xml
Code:
<style name="TextAppearance.StatusBar.Traffic" parent="@style/TextAppearance.StatusBar.Clock">
<item name="android:textSize">12.0dip</item>
<item name="android:textStyle">normal</item>
<item name="android:textColor">#bfffffff</item>
<item name="android:textAllCaps">false</item>
</style>
Open ids.xml and add following line at the bottom of page:
Code:
<item type="id" name="traffic">false</item>
copy the smali files to
smali/com/android/systemui/statusbar/policy/
Recompile and profit.
Additional Step about How to move Internet Speed meter to left side on Statusbar: Read here
[MOD] [GUIDE] Status Bar Network Traffic (Separate In/Out)
Remove Sfinder and Quick Connect from notification panel:
See here
3Minit Battery
How to add 3minit battery as this patch is changed on lollipop
You need to add red line in system_icons.xml, the rest (copying smali part) is same as the guide in main thread
Go to SystemUI.apk\res\layout and open system_icons.xml
Make sure it looks like this:
Code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:gravity="center_vertical" android:id="@id/system_icons" android:layout_width="wrap_content" android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<com.android.keyguard.AlphaOptimizedLinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/statusIcons" android:layout_width="wrap_content" android:layout_height="fill_parent" android:alpha="0.74" />
<LinearLayout android:gravity="center" android:orientation="horizontal" android:id="@id/signal_battery_cluster" android:layout_width="wrap_content" android:layout_height="fill_parent" android:paddingStart="2.0dip">
<include android:id="@id/signal_cluster" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginStart="2.0dip" android:layout_marginEnd="@dimen/rssi_battery_gap" layout="@layout/signal_cluster_view" />
<TextView android:textSize="@dimen/battery_text_size" android:textColor="@color/battery_text_color" android:layout_gravity="center" android:id="@id/battery_text" android:layout_width="wrap_content" android:layout_height="wrap_content" android:alpha="0.74" android:importantForAccessibility="no" android:fontFamily="sans-serif" android:layout_marginStart="@dimen/battery_text_marginStart" />
[COLOR="red"] <com.android.systemui.BatteryMeterView android:id="@id/battery" android:layout_width="0.0dip" android:layout_height="0.0dip" android:layout_marginBottom="@dimen/battery_icon_bottom_margin" android:alpha="0.74" android:layout_marginStart="3.0dip" />
<com.android.systemui.statusbar.policy.MinitBattery android:layout_width="wrap_content" android:layout_height="wrap_content"[/COLOR] />
</LinearLayout>
</LinearLayout>
Move WiFi and Data icons to left side of statusbar
Decompile SystemUI, go to layout and open system_icons.xml
Search for
Code:
<include android:id="@id/signal_cluster" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginStart="2.0dip" android:layout_marginEnd="@dimen/rssi_battery_gap" layout="@layout/signal_cluster_view" />
Change it to
Code:
<include android:id="@id/signal_cluster" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginStart="2.0dip" android:layout_marginEnd="@dimen/rssi_battery_gap" layout="@layout/signal_cluster_view" />
Go to status_bar.xml
Add following line in red
Code:
<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/operatorLogoIcon_org" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/tw_stat_notify_operator_logo_org" />
[COLOR="Red"]<include android:id="@id/signal_cluster" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_marginBottom="-5.0dip" android:layout_marginLeft="-5.0dip" layout="@layout/signal_cluster_view" />[/COLOR]
Now download my modified signal_cluster_view.xml and check with yours
Save, recompile.
3minit quick launch for TW Lollipop
Firstly go download 3minit quick launcher smali from main thread
As there are some changes in lollipop which is not same as the guide in the original thread we are going to edit our file as below.
SystemUI.apk\res\layout open quick_connect_layout_zero.xml
Make sure it's like following:
Code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:orientation="vertical" android:id="@id/sfinder_qconnect_layout" android:background="@drawable/quick_connect_layout_bg" android:layout_width="fill_parent" android:layout_height=[COLOR="red"]"wrap_content"[/COLOR]
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
[COLOR="Red"] <HorizontalScrollView android:scrollbars="none" android:layout_width="fill_parent" android:layout_height="@dimen/finder_connect_layout_height">
<com.android.systemui.statusbar.policy.quicklaunch.QuickLaunchContainer android:gravity="center" android:layout_width="wrap_content" android:layout_height="@dimen/finder_connect_layout_height" android:layout_centerHorizontal="true" />
</HorizontalScrollView>[/COLOR]
<LinearLayout android:orientation="vertical" android:id="@id/sfinder_qconnect_layout" android:focusable="true" android:descendantFocusability="afterDescendants" android:layout_width="0.0dip" android:layout_height="0.0dip">
<LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:paddingLeft="@dimen/finder_connect_button_padding_right" android:paddingTop="@dimen/finder_connect_button_padding_top" android:paddingRight="@dimen/finder_connect_button_padding_left" android:paddingBottom="@dimen/finder_connect_button_padding_bottom" android:focusable="true" android:descendantFocusability="afterDescendants" android:layout_width="0.0dip" android:layout_height="0.0dip">
<RelativeLayout android:id="@id/sfinder_button_layout" android:background="@drawable/ripple_drawable" android:focusable="true" android:nextFocusLeft="@id/quick_connect_button_layout" android:nextFocusRight="@id/quick_connect_button_layout" android:clickable="true" android:layout_width="0.0dip" android:layout_height="@dimen/finder_connect_button_height" android:layout_weight="0.0" android:layout_marginEnd="0.0dip">
<TextView android:textSize="@dimen/tw_quick_panel_sfinder_qconnect_button_text_size" android:textColor="@drawable/tw_quick_panel_sfinder_qconnect_button_text_color" android:gravity="center" android:id="@id/sfinder_button_big" android:layout_width="0.0dip" android:layout_height="0.0dip" android:text="@string/accessibility_sfinder_button" android:singleLine="true" android:drawableLeft="@drawable/tw_quick_panel_quick_sfinder_button_image" android:drawablePadding="@dimen/tw_quick_panel_sfinder_qconnect_drawable_padding" android:layout_centerHorizontal="true" android:layout_centerVertical="true" android:fontFamily="sec-roboto-light" />
</RelativeLayout>
<ImageView android:id="@id/expanded_divider_3" android:background="@color/quickpanel_button_divider_color" android:layout_width="0.0dip" android:layout_height="0.0dip" android:layout_marginTop="0.0dip" android:layout_marginBottom="0.0dip" android:alpha="@dimen/quickpanel_button_divider_alpha" android:layout_toStartOf="@id/sfinder_button_layout" />
<RelativeLayout android:id="@id/quick_connect_button_layout" android:background="@drawable/ripple_drawable" android:focusable="true" android:nextFocusLeft="@id/sfinder_button_layout" android:nextFocusRight="@id/sfinder_button_layout" android:clickable="true" android:layout_width="0.0dip" android:layout_height="0.0dip" android:layout_weight="0.0" android:layout_marginStart="0.0dip">
<TextView android:textSize="@dimen/tw_quick_panel_sfinder_qconnect_button_text_size" android:textColor="@drawable/tw_quick_panel_sfinder_qconnect_button_text_color" android:gravity="center" android:id="@id/qconnect_button_big" android:layout_width="0.0dip" android:layout_height="0.0dip" android:text="@string/accessibility_qconnect_button" android:singleLine="true" android:drawableLeft="@drawable/tw_quick_panel_quick_qconnect_button_image" android:drawablePadding="@dimen/tw_quick_panel_sfinder_qconnect_drawable_padding" android:layout_centerHorizontal="true" android:layout_centerVertical="true" android:fontFamily="sec-roboto-light" />
</RelativeLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
As we are removing Sfinder and Quick Connect for better interface all dpi regarding to Sfinder and Quick Connect should be set to 0 so check them all.
Now as 3minit quick launcher is bigger than Sfinder and Quick connect we need to modify that area related to those buttons to fit 3minit launcher
So go to values and open dimens.xml
Search for
Code:
<dimen name="finder_connect_layout_height">[COLOR="red"]57.0dip[/COLOR]</dimen>
Change to
Code:
<dimen name="finder_connect_layout_height">[COLOR="red"]75.0dip[/COLOR]</dimen>
Center Clock on statusbar
Go here
How to make a round corner for recent apps window
SystemUI.apk>dimens.xml
Change
Code:
<dimen name="recents_task_view_rounded_corners_radius">2.0dip</dimen>
to
Code:
<dimen name="recents_task_view_rounded_corners_radius">20.0dip</dimen>
credit @tkari4
How to enable other Samsung lockscreen effects
Read here and here
Add Flashlight and Screenshot to Power Menu
Read here
More Themes for TW Launcher
Find here
How to enable the native rotation in the TouchWizHome_K.apk
Here
How to disable signature checks
Here
Removing SysScope - Permanent "Official" Device Status
Here
[Guides & Links] THE GALAXY S5 UNIFIED MODS THREAD
Amazing guides and people, make sure to check
Remove green and orange banner when dialing/receiving calls
Read here
How to make Sun shape AOSP brightness handle on notification panel
Read here
How to make AOSP category divider on SETTINGS
Read here
How to change Action bar color:
Look for following in framework\color.xml
Code:
<color name="material_blue_grey_800"> tab background
<color name="material_blue_grey_900"> status bar background
Thanks @Breakcore_Rush for themeing guides
3Minit Battery
In res/layout/system_icons.xml
PHP:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:gravity="center_vertical" android:id="@id/system_icons" android:layout_width="wrap_content" android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<com.android.keyguard.AlphaOptimizedLinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/statusIcons" android:layout_width="wrap_content" android:layout_height="fill_parent" android:alpha="0.74" />
<LinearLayout android:gravity="center" android:orientation="horizontal" android:id="@id/signal_battery_cluster" android:layout_width="wrap_content" android:layout_height="fill_parent" android:paddingStart="2.0dip">
<include android:id="@id/signal_cluster" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginStart="2.0dip" android:layout_marginEnd="@dimen/rssi_battery_gap" layout="@layout/signal_cluster_view" />
<TextView android:textSize="@dimen/battery_text_size" android:textColor="@color/battery_text_color" android:layout_gravity="center" android:id="@id/battery_text" android:layout_width="wrap_content" android:layout_height="wrap_content" android:alpha="0.74" android:importantForAccessibility="no" android:fontFamily="sans-serif" android:layout_marginStart="@dimen/battery_text_marginStart" />
<com.android.systemui.BatteryMeterView android:id="@id/battery" android:layout_width="0.0dip" android:layout_height="0.0dip" android:layout_marginBottom="@dimen/battery_icon_bottom_margin" android:alpha="0.74" android:layout_marginStart="3.0dip" />
<com.android.systemui.statusbar.policy.MinitBattery android:layout_width="wrap_content" android:layout_height="wrap_content" />
</LinearLayout>
</LinearLayout>
kmokhtar79 said:
Maybe this one
Click to expand...
Click to collapse
Hi dev...great work done...thanks a lot. If you can plz make a tut to make apks multidpi, that would be very nice.
unisol107 said:
Hi dev...great work done...thanks a lot. If you can plz make a tut to make apks multidpi, that would be very nice.
Click to expand...
Click to collapse
For this we need to ask from master @tkari4
Sent from my SM-N9005 using Tapatalk
Hello @kmokhtar79,
Very usefull and very nice guide!! Perhaps it interested for you: http://forum.xda-developers.com/showpost.php?p=58056310&postcount=581
Figuring out AOSP Lollipop icons
Hi, do you guys know how to figure out implementing AOSP Wifi, Data, and Battery vector xmls like on Stock Lollipop? I see that the codes are already there when comparing SystemUI with a 5.0 Nexus 5's ROM, but I don't have time to figure out how it is implemented. Thanks!
@kmokhtar79
Do I have to sign & zipalign apk after recompiling?
There is no png file in lock_lock_patch.rar
nasif69 said:
@kmokhtar79
Do I have to sign & zipalign apk after recompiling?
There is no png file in lock_lock_patch.rar
Click to expand...
Click to collapse
Do NOT use sign for system files. After modification is done open your modded file and original file, drag and drop META-INF and AndroidManifs.xml from original one to modded one without extracting it. Sometimes app signature is corrupted after compilation. This would fix it. There are 2 white png file that you may not notice them just select all in folder they would be highlighted.
Edit: You you are correct, corrected home_lock_patch.zip.
Sent from my SM-N9005 using Tapatalk
kmokhtar79 said:
Do NOT use sign for system files. After modification is done open your modded file and original file, drag and drop META-INF and AndroidManifs.xml from original one to modded one without extracting it. Sometimes app signature is corrupted after compilation. This would fix it. There are 2 white png file that you may not notice them just select all in folder they would be highlighted.
Edit: You you are correct, corrected home_lock_patch.zip.
Sent from my SM-N9005 using Tapatalk
Click to expand...
Click to collapse
Thanks.
Do I have to recompile & zipalign?
---------- Post added at 12:30 PM ---------- Previous post was at 11:57 AM ----------
@kmokhtar79
It works. But only lock screen & homebutton. No recent apps.
What I have to do for recent apps?
Good :good::good::good:
????
Mate can u add only speed network meter for this systemui.apk on this thread by Djimmy please
http://forum.xda-developers.com/showthread.php?t=2982939
Sent from my SM-N9005 using Tapatalk
thereassaad said:
Mate can u add only speed network meter for this systemui.apk on this thread by Djimmy please
http://forum.xda-developers.com/showthread.php?t=2982939
Sent from my SM-N9005 using Tapatalk
Click to expand...
Click to collapse
I am sorry mate, this thread is supposed to be modding thread, you just try following guides any step you got problem just post your problem and me or others would help you. I did it last night according to the same mentioned steps.
kmokhtar79 said:
I am sorry mate, this thread is supposed to be modding thread, you just try following guides any step you got problem just post your problem and me or others would help you. I did it last night according to the same mentioned steps.
Click to expand...
Click to collapse
Okay thanks btw my don't have laptop for 2 week its on service center thanks i will try to do it by apktool.apk from my phone thanks
Sent from my SM-N9005 using Tapatalk
thereassaad said:
Okay thanks btw my don't have laptop for 2 week its on service center thanks i will try to do it by apktool.apk from my phone thanks
Sent from my SM-N9005 using Tapatalk
Click to expand...
Click to collapse
In that case I can send you through pm.
Sent from my SM-N9005 using Tapatalk

Project Closed

Project Closed.............................
Download Attachment from HERE
Reserved for jb 4.2.2 MTK
Reserved for jb 4.2.2 MTK.
Reserved For JB 4.2.2 MTK
Screenshot
Sorry for my bad english
EboyBasit said:
Notes:
- This is another way of creating L panel. it has better swipe animation than lollifox.
- You need to be "very patient" andhave a lot of time as this is a time consuming tutorial.
- I won't explain how to do things like pushing the apps, setting the permission, or how to get a value in public.xml and use that to change something in a certain smali. Why? Because its been tackled a lot of times on the previous guides is posted. - common sense is a must.
- I won't also explain how to push the signature, or what is a signature, what is signing or how to sign an app. Those are different topics, just check pinned post for their guides.
- Read everything.
You'll need the following:
- Brain.apk
- Common Sense.apk
- apktool (version 1.5.2)
- rootexplorer
- text editor
- AnotherLPanelGuide.zip
- SystemUI.apk
Let's begin.
Part A:
Note: Import (framework-res.apk, and mediatek-res.apk first)
1. Decompile SystemUI.apk
2. Extract SystemUIFiles folder and merge the files of the Attachment to your SystemUI
==========================================================================
3. Open ids.xml in /res/values
Add this code before </resources>
Code:
<item type="id" name="owner">false</item>
<item type="id" name="photo_picker_cover">false</item>
<item type="id" name="owner_cover">false</item>
<item type="id" name="name_field_cover">false</item>
<item type="id" name="name_edit_cover">false</item>
<item type="id" name="image_cover">false</item>
<item type="id" name="photo_picker">false</item>
<item type="id" name="name_field">false</item>
<item type="id" name="name_edit">false</item>
<item type="id" name="colored_bar">false</item>
<item type="id" name="thumbnail_border">false</item>
<item type="id" name="handle_background">false</item>
4. Open dimens.xml in /res/values
find this
Code:
<dimen name="quick_settings_cell_height">
replace the value with 90.0dip
also find this
Code:
<dimen name="quick_settings_cell_gap">
replace the value with 0.0dip then save
5. Open Styles.xml in /res/values
=Find this=
Code:
<style name="TextAppearance.StatusBar.Expanded.Clock" parent="@style/TextAppearance.StatusBar.Expanded">
change it to become like this
Code:
<style name="TextAppearance.StatusBar.Expanded.Clock" parent="@style/TextAppearance.StatusBar.Expanded">
<item name="android:textSize">14.0sp</item>
<item name="android:textStyle">normal</item>
<item name="android:textColor">#ffffffff</item>
<item name="android:fontFamily">sans-serif-medium</item>
</style>
=Find this=
Code:
<style name="TextAppearance.StatusBar.Expanded.Date" parent="@style/TextAppearance.StatusBar.Expanded">
change it to become like this
Code:
<style name="TextAppearance.StatusBar.Expanded.Date" parent="@style/TextAppearance.StatusBar.Expanded">
<item name="android:textSize">14.0sp</item>
<item name="android:textStyle">normal</item>
<item name="android:textColor">#b2ffffff</item>
</style>
[/CODE
=Add this at the bottom before </resources>
[CODE]
<style name="TextAppearance.QuickSettings.Toggle" parent="@style/TextAppearance.QuickSettings">
<item name="android:textSize">12.0sp</item>
<item name="android:textStyle">normal</item>
<item name="android:textColor">#b3ffffff</item>
<item name="android:fontFamily">sans-serif-regular-systemui</item>
</style>
<style name="Theme.Lalalee" parent="@*android:style/Theme.Holo.Light.Dialog">
<item name="android:windowBackground">@*android:color/transparent</item>
<item name="android:windowNoTitle">true</item>
</style>
6.Open colors.xml in /res/values/
add this at the bottom before </resources>
Code:
<color name="qset_text_color_off">#b3ffffff</color>
<color name="qset_text_color_on">#b3ffffff</color>
<color name="qs_tile_normal">#ff263238</color>
7. Open AndroidManifest.xml
add this at the bottom before </application>
Code:
<activity android:theme="@style/Theme.Lalalee" android:name="com.android.settings.Profile">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
</intent-filter>
</activity>
Open Drawables.xml and add this above </resources>
Code:
<item type="drawable" name="handle_bar_background_color">#ff222222</item>
8. Open SystemUIService.smali in /smali/com/android/systemui
find:
# virtual methods
Add this at the bottom "remember to add 1 gap after the .end method
Code:
.method public PussyBatt(Landroid/view/View;)V
.locals 3
.param p1, "v" # Landroid/view/View;
.prologue
.line 2431
new-instance v0, Landroid/content/Intent;
invoke-direct {v0}, Landroid/content/Intent;-><init>()V
.line 2432
const-string v1, "com.android.settings"
const-string v2, "com.android.settings.fuelgauge.PowerUsageSummary"
invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
const/high16 v2, 0x10000000
invoke-virtual {v0, v2}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;
move-result-object v0
.line 2433
invoke-virtual {p0, v0}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V
const-string v1, "statusbar"
invoke-virtual {p0, v1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/app/StatusBarManager;
invoke-virtual {v0}, Landroid/app/StatusBarManager;->collapsePanels()V
.line 1720
return-void
.end method
.method public PussyProf(Landroid/view/View;)V
.locals 3
.param p1, "v" # Landroid/view/View;
.prologue
.line 2431
new-instance v0, Landroid/content/Intent;
invoke-direct {v0}, Landroid/content/Intent;-><init>()V
.line 2432
const-string v1, "com.android.settings"
const-string v2, "com.android.settings.Profile"
invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
const/high16 v2, 0x10000000
invoke-virtual {v0, v2}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;
move-result-object v0
.line 2433
invoke-virtual {p0, v0}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V
const-string v1, "statusbar"
invoke-virtual {p0, v1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/app/StatusBarManager;
invoke-virtual {v0}, Landroid/app/StatusBarManager;->collapsePanels()V
.line 1720
return-void
.end method
.method public PussySett(Landroid/view/View;)V
.locals 3
.param p1, "v" # Landroid/view/View;
.prologue
.line 2431
new-instance v0, Landroid/content/Intent;
invoke-direct {v0}, Landroid/content/Intent;-><init>()V
.line 2432
const-string v1, "com.android.settings"
const-string v2, "com.android.settings.Settings"
invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
const/high16 v2, 0x10000000
invoke-virtual {v0, v2}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;
move-result-object v0
.line 2433
invoke-virtual {p0, v0}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V
const-string v1, "statusbar"
invoke-virtual {p0, v1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/app/StatusBarManager;
invoke-virtual {v0}, Landroid/app/StatusBarManager;->collapsePanels()V
.line 1720
return-void
.end method
9. Recompile your systemui
Click to expand...
Click to collapse
I got this error code while recompiling at Tutorial 9th Part A.
C:\Users\Husin\Documents\Apktool JB 4.2.2>apktool b -f -d SystemUI
I: Using Apktool 2.0.1
I: Smaling smali folder into classes.dex...
SystemUI\smali\android\widget\CircleDrawable.smali[227,4] Error for input '.parameter': Invalid directive
SystemUI\smali\android\widget\CircleDrawable.smali[227,15] mismatched input '"bitmap"' expecting END_METHOD_DIRECTIVE
SystemUI\smali\android\widget\CircleDrawable.smali[415,4] Error for input '.parameter': Invalid directive
SystemUI\smali\android\widget\CircleDrawable.smali[415,15] mismatched input '"drawable"' expecting END_METHOD_DIRECTIVE
SystemUI\smali\android\widget\CircleDrawable.smali[521,4] Error for input '.parameter': Invalid directive
SystemUI\smali\android\widget\CircleDrawable.smali[521,15] mismatched input '"bitmap"' expecting END_METHOD_DIRECTIVE
SystemUI\smali\android\widget\CircleDrawable.smali[544,4] Error for input '.parameter': Invalid directive
SystemUI\smali\android\widget\CircleDrawable.smali[544,15] mismatched input '"drawable"' expecting END_METHOD_DIRECTIVE
SystemUI\smali\android\widget\CircleDrawable.smali[849,15] no viable alternative at input 'dx'
SystemUI\smali\android\widget\CircleDrawable.smali[853,15] no viable alternative at input 'dy'
SystemUI\smali\android\widget\CircleDrawable.smali[896,15] no viable alternative at input 'scale'
SystemUI\smali\android\widget\CircleDrawable.smali[1325,4] Error for input '.parameter': Invalid directive
SystemUI\smali\android\widget\CircleDrawable.smali[1325,15] mismatched input '"canvas"' expecting END_METHOD_DIRECTIVE
SystemUI\smali\android\widget\CircleDrawable.smali[1537,4] Error for input '.parameter': Invalid directive
SystemUI\smali\android\widget\CircleDrawable.smali[1537,15] mismatched input '"bounds"' expecting END_METHOD_DIRECTIVE
SystemUI\smali\android\widget\CircleDrawable.smali[1557,4] Error for input '.parameter': Invalid directive
SystemUI\smali\android\widget\CircleDrawable.smali[1557,15] mismatched input '"state"' expecting END_METHOD_DIRECTIVE
SystemUI\smali\android\widget\CircleDrawable.smali[1601,4] Error for input '.parameter': Invalid directive
SystemUI\smali\android\widget\CircleDrawable.smali[1601,15] mismatched input '"alpha"' expecting END_METHOD_DIRECTIVE
SystemUI\smali\android\widget\CircleDrawable.smali[1618,4] Error for input '.parameter': Invalid directive
SystemUI\smali\android\widget\CircleDrawable.smali[1618,15] mismatched input '"color"' expecting END_METHOD_DIRECTIVE
SystemUI\smali\android\widget\CircleDrawable.smali[1635,4] Error for input '.parameter': Invalid directive
SystemUI\smali\android\widget\CircleDrawable.smali[1635,15] mismatched input '"colors"' expecting END_METHOD_DIRECTIVE
SystemUI\smali\android\widget\CircleDrawable.smali[1679,4] Error for input '.parameter': Invalid directive
SystemUI\smali\android\widget\CircleDrawable.smali[1679,15] mismatched input '"width"' expecting END_METHOD_DIRECTIVE
SystemUI\smali\android\widget\CircleDrawable.smali[1700,4] Error for input '.parameter': Invalid directive
SystemUI\smali\android\widget\CircleDrawable.smali[1700,15] mismatched input '"cf"' expecting END_METHOD_DIRECTIVE
SystemUI\smali\android\widget\CircleDrawable.smali[1717,4] Error for input '.parameter': Invalid directive
SystemUI\smali\android\widget\CircleDrawable.smali[1717,15] mismatched input '"radius"' expecting END_METHOD_DIRECTIVE
SystemUI\smali\android\widget\CircleDrawable.smali[1729,4] Error for input '.parameter': Invalid directive
SystemUI\smali\android\widget\CircleDrawable.smali[1729,15] mismatched input '"dither"' expecting END_METHOD_DIRECTIVE
SystemUI\smali\android\widget\CircleDrawable.smali[1746,4] Error for input '.parameter': Invalid directive
SystemUI\smali\android\widget\CircleDrawable.smali[1746,15] mismatched input '"filter"' expecting END_METHOD_DIRECTIVE
SystemUI\smali\android\widget\CircleDrawable.smali[1763,4] Error for input '.parameter': Invalid directive
SystemUI\smali\android\widget\CircleDrawable.smali[1763,15] mismatched input '"oval"' expecting END_METHOD_DIRECTIVE
SystemUI\smali\android\widget\CircleDrawable.smali[1775,4] Error for input '.parameter': Invalid directive
SystemUI\smali\android\widget\CircleDrawable.smali[1775,15] mismatched input '"scaleType"' expecting END_METHOD_DIRECTIVE
Exception in thread "main" brut.androlib.AndrolibException: Could not smali file: android/widget/CircleDrawable.smali
at brut.androlib.src.SmaliBuilder.buildFile(SmaliBuilder.java:71)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:55)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:41)
at brut.androlib.Androlib.buildSourcesSmali(Androlib.java:372)
at brut.androlib.Androlib.buildSources(Androlib.java:299)
at brut.androlib.Androlib.build(Androlib.java:282)
at brut.androlib.Androlib.build(Androlib.java:256)
at brut.apktool.Main.cmdBuild(Main.java:225)
at brut.apktool.Main.main(Main.java:84)
Click to expand...
Click to collapse
JB 4.2.2 and I'm using original (stock) SystemUI.apk deodexed
can you help me ?
-_- use apktool 1.5.2 while following my tutorials -_- huh
EboyBasit said:
-_- use apktool 1.5.2 while following my tutorials -_- huh
Click to expand...
Click to collapse
i'm using apktool 1.5.2
got error message
Code:
C:\Users\GDay\Downloads\Advanced+ApkTool+v4.1.0+By+BDFreak\AdvancedApkTool\apkto
ol1.5.2>apktool b systemui
I: Checking whether sources has changed...
I: Smaling...
[418,4] Error for input '.param': Invalid directive
[458,4] Error for input '.param': Invalid directive
[498,4] Error for input '.param': Invalid directive
[418,11] mismatched input 'p1' expecting END_METHOD_DIRECTIVE
[458,11] mismatched input 'p1' expecting END_METHOD_DIRECTIVE
[498,11] mismatched input 'p1' expecting END_METHOD_DIRECTIVE
Exception in thread "main" brut.androlib.AndrolibException: Could not smali file
: C:\Users\GDay\Downloads\Advanced+ApkTool+v4.1.0+By+BDFreak\AdvancedApkTool\apk
tool1.5.2\systemui\smali\com\android\systemui\SystemUIService.smali
at brut.androlib.src.DexFileBuilder.addSmaliFile(DexFileBuilder.java:45)
at brut.androlib.src.DexFileBuilder.addSmaliFile(DexFileBuilder.java:33)
at brut.androlib.src.SmaliBuilder.buildFile(SmaliBuilder.java:66)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:50)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:37)
at brut.androlib.Androlib.buildSourcesSmali(Androlib.java:257)
at brut.androlib.Androlib.buildSources(Androlib.java:214)
at brut.androlib.Androlib.build(Androlib.java:205)
at brut.androlib.Androlib.build(Androlib.java:176)
at brut.apktool.Main.cmdBuild(Main.java:228)
at brut.apktool.Main.main(Main.java:79)
C:\Users\GDay\Downloads\Advanced+ApkTool+v4.1.0+By+BDFreak\AdvancedApkTool\apkto
ol1.5.2>
how to fix it ?
GDay21 said:
i'm using apktool 1.5.2
got error message
Code:
C:\Users\GDay\Downloads\Advanced+ApkTool+v4.1.0+By+BDFreak\AdvancedApkTool\apkto
ol1.5.2>apktool b systemui
I: Checking whether sources has changed...
I: Smaling...
[418,4] Error for input '.param': Invalid directive
[458,4] Error for input '.param': Invalid directive
[498,4] Error for input '.param': Invalid directive
[418,11] mismatched input 'p1' expecting END_METHOD_DIRECTIVE
[458,11] mismatched input 'p1' expecting END_METHOD_DIRECTIVE
[498,11] mismatched input 'p1' expecting END_METHOD_DIRECTIVE
Exception in thread "main" brut.androlib.AndrolibException: Could not smali file
: C:\Users\GDay\Downloads\Advanced+ApkTool+v4.1.0+By+BDFreak\AdvancedApkTool\apk
tool1.5.2\systemui\smali\com\android\systemui\SystemUIService.smali
at brut.androlib.src.DexFileBuilder.addSmaliFile(DexFileBuilder.java:45)
at brut.androlib.src.DexFileBuilder.addSmaliFile(DexFileBuilder.java:33)
at brut.androlib.src.SmaliBuilder.buildFile(SmaliBuilder.java:66)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:50)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:37)
at brut.androlib.Androlib.buildSourcesSmali(Androlib.java:257)
at brut.androlib.Androlib.buildSources(Androlib.java:214)
at brut.androlib.Androlib.build(Androlib.java:205)
at brut.androlib.Androlib.build(Androlib.java:176)
at brut.apktool.Main.cmdBuild(Main.java:228)
at brut.apktool.Main.main(Main.java:79)
C:\Users\GDay\Downloads\Advanced+ApkTool+v4.1.0+By+BDFreak\AdvancedApkTool\apkto
ol1.5.2>
how to fix it ?
Click to expand...
Click to collapse
-_- restart the process right from decompiling using apktool 1.5.2 :v dont compile waste of apktool 2 with apktool 1.5.2 :v
Very hard...
to fix smali
( change = param p1 , "v" ) to parameter "v" and than
( change 0x10000000 ) to 0x1000
do to all in a guide resouece smali
it's working to me base kitkat
@Eboy Basit stop fooling people...
myrxda said:
@Eboy Basit stop fooling people...
Click to expand...
Click to collapse
Those who successfully made believe on it....

[Guide] How To Add Show Hide Screen Edge Effect

[Guide] How To Add Show Hide Screen Edge Effect (Tested Stock & Cm12.1 Lolipop)
PHP:
[N.B] I'm not responsible for any damages will be held! Do at your own risk!
Requirments:
1. Apktool 2.0/2.1.1
2. Basic Knowledge Of Decompile & Recompile.
3. Notepad++ Or Other Xml Editor.
4. Brain
Now, Go to work........
<<Decompile Settings.apk (Using ApkTOOl)>>​* Merge Files From Settings Folder (Download Link Is Given Below).
* Open res/xml/display_settings.xml.
* Add This Line Or Whenever You Want.
PHP:
<com.android.settings.mod.YusrilSwitchOnPreference android:title="Edge Effect Animations" android:key="alee_edge_effect" android:defaultValue="false" />
* Recompile, Sign & Push Your System...
<<Decomple SystemUI.apk (Using ApkTOOl)>>​
* Merge Files From SystemUI Folder (Download Link Is Given Below)
* Open res/layout/status_bar.xml
* Find This Line:
PHP:
schemas.android.com/apk/res/com.android.systemui">
*Add this Line Below:
PHP:
<include android:layout_width="fill_parent" android:layout_height="fill_parent" layout="@layout/alee_edge_effect" />
* Open res/layout/navigation_bar.xml
* Find Those Lines:
PHP:
<com.android.systemui.statusbar.phone.NavigationBarView android:background="@drawable/system_bar_background" android:layout_width="fill_parent" android:layout_height="fill_parent"
<FrameLayout android:layout_width="fill_parent" android:layout_height="fill_parent">
* Now, Add this Line Below:
PHP:
<include android:layout_width="fill_parent" android:layout_height="fill_parent" layout="@layout/alee_edge_effect" />
[N:B] If You Use Dynamic System Bar Then You Have To Paste This Line Below Dynamic Systen Bar Codes
<<Start Process On Smali>>​
* Open smali/com/android/systemui/statusbar/BaseStatusBar.smali
* Search This Method:
Code:
# instance fields
* Add This Line Method:
Code:
.field protected mAleeEdgeEffection:Landroid/widget/FrameLayout;
* Search This Line:
Code:
# virtual methods
* Add This Line below:
Code:
.method protected addAleeEdgeEffection()V
.locals 3
.prologue
.line 1809
iget-object v0, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mContext:Landroid/content/Context;
const v1, 0x7f047839
const/4 v2, 0x0
invoke-static {v0, v1, v2}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;
move-result-object v0
check-cast v0, Landroid/widget/FrameLayout;
iput-object v0, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mAleeEdgeEffection:Landroid/widget/FrameLayout;
.line 1811
iget-object v0, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mWindowManager:Landroid/view/WindowManager;
iget-object v1, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mAleeEdgeEffection:Landroid/widget/FrameLayout;
const/4 v2, 0x3
invoke-virtual {p0, v2}, Lcom/android/systemui/statusbar/BaseStatusBar;->getAleeEdgeEffectionLayoutParams(I)Landroid/view/WindowManager$LayoutParams;
move-result-object v2
invoke-interface {v0, v1, v2}, Landroid/view/WindowManager;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V
.line 1813
return-void
.end method
* Search This Method:
Code:
.method protected getNotificationLongClicker
* You See Some lines Like This:
Code:
.method protected getNotificationLongClicker()Lcom/android/systemui/SwipeHelper$LongPressListener;
.locals 1
.prologue
.line 911
new-instance v0, Lcom/android/systemui/statusbar/BaseStatusBar$10;
invoke-direct {v0, p0}, Lcom/android/systemui/statusbar/BaseStatusBar$10;-><init>(Lcom/android/systemui/statusbar/BaseStatusBar;)V
return-object v0
.end method
* Now, Add Those Line Below .end method:
Code:
.method protected getAleeEdgeEffectionLayoutParams(I)Landroid/view/WindowManager$LayoutParams;
.locals 6
.prologue
.line 1823
new-instance v0, Landroid/view/WindowManager$LayoutParams;
const/4 v1, -0x1
const/4 v2, -0x1
const/16 v3, 0x7d6
const v4, 0x840068
const/4 v5, -0x3
invoke-direct/range {v0 .. v5}, Landroid/view/WindowManager$LayoutParams;-><init>(IIIII)V
.line 1834
iget v1, v0, Landroid/view/WindowManager$LayoutParams;->privateFlags:I
or-int/lit8 v1, v1, 0x40
iput v1, v0, Landroid/view/WindowManager$LayoutParams;->privateFlags:I
.line 1836
const-string v1, "AleeEdgeEffection"
invoke-virtual {v0, v1}, Landroid/view/WindowManager$LayoutParams;->setTitle(Ljava/lang/CharSequence;)V
.line 1838
return-object v0
.end method
* Search This Line:
Code:
.method public start()V
Scroll down & You see a line like this
Code:
iput-object v0, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mBarService:Lcom/android/internal/statusbar/IStatusBarService;
* Now Add This Line Below:
Code:
invoke-virtual/range {p0 .. p0}, Lcom/android/systemui/statusbar/BaseStatusBar;->addAleeEdgeEffection()V
* Recompile & Decompile Again:
* Open res/values/public.xml
* And Also Open BaseStatusBar.smali [In SystemUI]
* In Public.xml Search This Id:
PHP:
<public type="layout" name="alee_edge_effect" id="0x7f......" />
* Replace this id with your BaseStatusBar.smali id
************************************
Replace This Id 0x7f047839 To Your Public Id...
const v1, 0x7f.....
Like This.
************************************
DONE...
* Recompile, Sign & Push You System...
*****************************************************************************************************************
***---Fix Installation Problem---***​
* Decompile PackageInstaller.apk [From Your Rom]
* Open res/layout/install_confirm.xml
* Search This android:id="@id/ok_button" In This Line Remove This Code = android:filterTouchesWhenObscured="true"
*****************************************************************************************************************
Download Link: Set&SysUI Files

			
				
can you explain what this mod does in detail and does it work for kitkat devices?

Categories

Resources