How to enable AOSP lockscreen for the S4
As always, for reasons of keeping things simple I use my Rom Control file to house all my MOD settings. Its easier to add and remove code and never changes with updates.
We will be working with three files:
SecSettings
framework-res
android.policy
We will begin with SecSettings
Navigate to res/values/strings and add the following:
Code:
<string name="lockscreen_title">Enable AOSP lockscreen</string>
<string name="lockscreen_summary">Choose AOSP or TW lockscreen</string>
Navigate to res/xml/rom_settings (or your xml of choice) and add the following:
Code:
<CheckBoxPreference android:title="@string/lockscreen_title" android:key="aosp_lock_enabled" android:summary="@string/lockscreen_summary" />
Navigate to smali/com/android/settings/didact/RomSettings.smali (or your settings smali of choice) and add the following:
The first lines just describe what method to add the code to. Dont copy them into the file.
Code:
.field mAospLock:Landroid/preference/CheckBoxPreference;
Code:
[B]In .method public onCreate(Landroid/os/Bundle;)V.....[/B]
:goto_4
invoke-virtual {v4, v1}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V
const-string v1, "aosp_lock_enabled"
invoke-virtual {p0, v1}, Lcom/android/settings/didact/RomSettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v1
check-cast v1, Landroid/preference/CheckBoxPreference;
iput-object v1, p0, Lcom/android/settings/didact/RomSettings;->mAospLock:Landroid/preference/CheckBoxPreference;
iget-object v4, p0, Lcom/android/settings/didact/RomSettings;->mAospLock:Landroid/preference/CheckBoxPreference;
invoke-virtual {p0}, Lcom/android/settings/didact/RomSettings;->getActivity()Landroid/app/Activity;
move-result-object v1
invoke-virtual {v1}, Landroid/app/Activity;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
const-string v5, "aosp_lock_enabled"
invoke-static {v1, v5, v3}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v1
if-ne v1, v2, :cond_5
move v1, v2
:goto_5
invoke-virtual {v4, v1}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V
Code:
[B]in .method public onPreferenceTreeClick(Landroid/preference/PreferenceScreen;Landroid/preference/Preference;)Z[/B]
:cond_9
invoke-static {v2, v3, v0}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
goto/16 :goto_0
:cond_a
iget-object v2, p0, Lcom/android/settings/didact/RomSettings;->mAospLock:Landroid/preference/CheckBoxPreference;
if-ne p2, v2, :cond_1
invoke-virtual {p0}, Lcom/android/settings/didact/RomSettings;->getActivity()Landroid/app/Activity;
move-result-object v2
invoke-virtual {v2}, Landroid/app/Activity;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v2
const-string v3, "aosp_lock_enabled"
check-cast p2, Landroid/preference/CheckBoxPreference;
invoke-virtual {p2}, Landroid/preference/CheckBoxPreference;->isChecked()Z
move-result v4
if-eqz v4, :cond_b
move v0, v1
:cond_b
invoke-static {v2, v3, v0}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
goto/16 :goto_0
.end method
Thats it for SecSettings. Again, you may wish to add these mods to lockscreen settings ot your own xml control. If you want to add them to lockscreen settings, have a look at my guide for the S3, it goes into how to do that. Now on to Framework-res in the next section......
AOSP Lockscreen with toggle, part 2.....framework-res
In this file we will be doing two things:
Centering the glowpad in your screen
adding lock targets with camera (stock only adds unlock).
Navigate to res/layout/keyguard_selector_view.xml and replace the whole file with the following:
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.internal.policy.impl.keyguard.KeyguardSelectorView android:orientation="vertical" android:id="@id/keyguard_selector_view" android:clipChildren="false" android:clipToPadding="false" android:layout_width="fill_parent" android:layout_height="fill_parent" android:contentDescription="@string/keyguard_accessibility_slide_unlock" android:layout_maxHeight="@dimen/keyguard_security_height" android:layout_maxWidth="420.0dip"
xmlns:prvandroid="http://schemas.android.com/apk/prv/res/android"
xmlns:android="http://schemas.android.com/apk/res/android">
<FrameLayout android:gravity="center" android:layout_gravity="center" android:clipChildren="false" android:clipToPadding="false" android:layout_width="fill_parent" android:layout_height="fill_parent">
<include android:layout_width="fill_parent" android:layout_height="wrap_content" layout="@layout/keyguard_message_area" />
<View android:id="@id/keyguard_selector_view_frame" android:background="@drawable/kg_bouncer_bg_white" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginLeft="16.0dip" android:layout_marginRight="16.0dip" />
<include layout="@layout/keyguard_glow_pad_container" />
<include android:layout_gravity="bottom|center" android:id="@id/keyguard_selector_fade_container" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="0.0dip" layout="@layout/keyguard_eca" />
</FrameLayout>
</com.android.internal.policy.impl.keyguard.KeyguardSelectorView>
Navigate to res/layout/keyguard_glow_pad_view.xml and replace the entire file with the following:
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.internal.widget.multiwaveview.GlowPadView android:gravity="center" android:layout_gravity="center" android:orientation="horizontal" android:id="@id/glow_pad_view" android:layout_width="wrap_content" android:layout_height="wrap_content" prvandroid:innerRadius="@dimen/glowpadview_inner_radius" android:contentDescription="@string/keyguard_accessibility_slide_area" prvandroid:targetDescriptions="@array/lockscreen_target_descriptions_with_camera" prvandroid:directionDescriptions="@array/lockscreen_direction_descriptions" prvandroid:outerRingDrawable="@drawable/ic_lockscreen_outerring" prvandroid:pointDrawable="@drawable/ic_lockscreen_glowdot" prvandroid:glowRadius="@dimen/glowpadview_glow_radius" prvandroid:firstItemOffset="@integer/kg_glowpad_rotation_offset" prvandroid:magneticTargets="true" prvandroid:allowScaling="true" prvandroid:targetDrawables="@array/lockscreen_targets_with_camera" prvandroid:handleDrawable="@drawable/ic_lockscreen_handle" prvandroid:outerRadius="@dimen/glowpadview_target_placement_radius" prvandroid:vibrationDuration="20" prvandroid:snapMargin="@dimen/glowpadview_snap_margin" prvandroid:feedbackCount="1"
xmlns:prvandroid="http://schemas.android.com/apk/prv/res/android"
xmlns:android="http://schemas.android.com/apk/res/android" />
Thats it for framework-res. The last section is for android.policy
AOSP Lockscreen with toggle part 3, android.policy
This last part will add the AOSP functionality with toggle.
Navigate to smali/com/android/internal/policy/impl/keyguard/KeyguardHostView.smali
Add the following:
Code:
.field private mAospLock:I
Find .method private getLayoutIdFor(Lcom/android/internal/policy/impl/keyguard/KeyguardSecurityModel$SecurityModeI
Replace from pswitch_0 to pswitch_1 with the following code:
Code:
:pswitch_0
iget-object v2, p0, Lcom/android/internal/policy/impl/keyguard/KeyguardHostView;->mContext:Landroid/content/Context;
invoke-virtual {v2}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v2
const-string v3, "aosp_lock_enabled"
invoke-static {v2, v3, v1}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v2
iput v2, p0, Lcom/android/internal/policy/impl/keyguard/KeyguardHostView;->mAospLock:I
iget v2, p0, Lcom/android/internal/policy/impl/keyguard/KeyguardHostView;->mAospLock:I
if-eqz v2, :cond_nocrt
const v1, 0x1090084
goto :goto_1
:cond_nocrt
const v1, 0x1090091
goto :goto_1
:pswitch_1
Thats it. Recompile and push the files to your phone. Enjoy AOSP Lockscreen.
I am currently working to add more functions such as weather and added shortcuts so stay tuned....
Thanks Button!!
Nice!! I assume we would need to add the rom control bits you talk about. Where are they? They are not already there are they?
hlxanthus said:
Nice!! I assume we would need to add the rom control bits you talk about. Where are they? They are not already there are they?
Click to expand...
Click to collapse
No, you don't have to. I just geared this tutorial around the idea that you would. You can add it to any XML you want, just have to follow the flow of the xml you add it to.
Looks cool! Can you post some screenshots?
awesome job like always thanks
xShockz said:
Looks cool! Can you post some screenshots?
Click to expand...
Click to collapse
I will tomorrow, in bed now. Unless someone else has it going and would like to post a pic.
Nice work as always my man.
In order to get the AOSP lock screen working I had to set "Screen lock" to "Swipe" and "Unlock effect" to "None" in Lock screen settings.
Is that how it works or did I screw something up?
upndwn4par said:
Nice work as always my man.
In order to get the AOSP lock screen working I had to set "Screen lock" to "Swipe" and "Unlock effect" to "None" in Lock screen settings.
Is that how it works or did I screw something up?
Click to expand...
Click to collapse
It works for me no matter how I have the unlock effect.
Is this the actual aosp lockscreen or just the similar one that has the fixed unlock shortcuts?
Sent from my SCH-I545 using Tapatalk 4 Beta
andybones said:
It works for me no matter how I have the unlock effect.
Click to expand...
Click to collapse
Hmmmm...maybe I need to go through this again....
Edit:
Works perfect. Just needed to clean up some code.
Is it possible to get this in a zip file?
Sent from my SCH-I545 using xda app-developers app
I am having a it of an issue. I can't find pswitch_0 nor pswitch_1
Can someone direct me? I'm in keyguardhostview.smali
Error I'm getting while recompiling android.policy
Code:
C:\AndroidApktool>android.policy\com\android\internal\policy\impl\keyguard\KeyguardHostView.smali[3630,7] Label "goto_1" is not defined.
android.policy\com\android\internal\policy\impl\keyguard\KeyguardHostView.smali[3635,10] Label "goto_1" is not defined.
android.policy\com\android\internal\policy\impl\keyguard\KeyguardHostView.smali[0,0] mismatched tree node: UP expecting I_CATCHES
android.policy\com\android\internal\policy\impl\keyguard\KeyguardHostView.smali[3648,4] mismatched tree node: I_STATEMENT_FORMAT21c_STRING expecting <UP>
And here's the code that I have ended.
.method private getLayoutIdFor(Lcom/android/internal/policy/impl/keyguard/KeyguardSecurityModel$SecurityModeI
.registers 6
const/4 v0, 0x1
const/4 v1, 0x0
iget-object v2, p0, Lcom/android/internal/policy/impl/keyguard/KeyguardHostView;->mContext:Landroid/content/Context;
invoke-virtual {v2}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v2
const-string v3, "onehand_pattern_enabled"
invoke-static {v2, v3, v1}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v2
if-ne v2, v0, :cond_1c
:goto_10
sget-object v2, Lcom/android/internal/policy/impl/keyguard/KeyguardHostView$21;->$SwitchMap$com$android$internal$policy$impl$keyguard$KeyguardSecurityModel$SecurityMode:[I
invoke-virtual {p1}, Lcom/android/internal/policy/impl/keyguard/KeyguardSecurityModel$SecurityMode;->ordinal()I
move-result v3
aget v2, v2, v3
packed-switch v2, switch_data_90
:goto_1b
return v1
:cond_1c
move v0, v1
goto :goto_10
switch_0
iget-object v2, p0, Lcom/android/internal/policy/impl/keyguard/KeyguardHostView;->mContext:Landroid/content/Context;
invoke-virtual {v2}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v2
const-string v3, "aosp_lock_enabled"
invoke-static {v2, v3, v1}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v2
iput v2, p0, Lcom/android/internal/policy/impl/keyguard/KeyguardHostView;->mAospLock:I
iget v2, p0, Lcom/android/internal/policy/impl/keyguard/KeyguardHostView;->mAospLock:I
if-eqz v2, :cond_nocrt
const v1, 0x1090084
goto :goto_1
:cond_nocrt
const v1, 0x1090091
goto :goto_1
switch_1
switch_1e << this is the first pswitch I see [/b]
Click to expand...
Click to collapse
dscblu said:
Is it possible to get this in a zip file?
Sent from my SCH-I545 using xda app-developers app
Click to expand...
Click to collapse
I second this.
Sent from my SCH-I545 using xda premium
Adrozz07 said:
Is this the actual aosp lockscreen or just the similar one that has the fixed unlock shortcuts?
Sent from my SCH-I545 using Tapatalk 4 Beta
Click to expand...
Click to collapse
Still wondering about this.
Sent from my SCH-I545 using Tapatalk 4 Beta
Hmm i'm on 4.2.2 TW
The outerring become smaller when i set gravity to center, but when i set it to left or right, it become normal.
any idea how to fix it?
Faye Reagan said:
Hmm i'm on 4.2.2 TW
The outerring become smaller when i set gravity to center, but when i set it to left or right, it become normal.
any idea how to fix it?
Click to expand...
Click to collapse
In keyguard_selector_view.xml you can change the size and position of the ring. You just need to play around a little.
upndwn4par said:
In keyguard_selector_view.xml you can change the size and position of the ring. You just need to play around a little.
Click to expand...
Click to collapse
Well i just play around, it's back to normal again after playing with android.policy since play with keyguard_selector_view.xml didn't works
mgbotoe said:
I am having a it of an issue. I can't find pswitch_0 nor pswitch_1
Can someone direct me? I'm in keyguardhostview.smali
Error I'm getting while recompiling android.policy
Code:
C:\AndroidApktool>android.policy\com\android\internal\policy\impl\keyguard\KeyguardHostView.smali[3630,7] Label "goto_1" is not defined.
android.policy\com\android\internal\policy\impl\keyguard\KeyguardHostView.smali[3635,10] Label "goto_1" is not defined.
android.policy\com\android\internal\policy\impl\keyguard\KeyguardHostView.smali[0,0] mismatched tree node: UP expecting I_CATCHES
android.policy\com\android\internal\policy\impl\keyguard\KeyguardHostView.smali[3648,4] mismatched tree node: I_STATEMENT_FORMAT21c_STRING expecting <UP>
And here's the code that I have ended.
Click to expand...
Click to collapse
Did you solve your issue yet? As i am facing exactly the same problem.. :/
Mr.Yawnie said:
Did you solve your issue yet? As i am facing exactly the same problem.. :/
Click to expand...
Click to collapse
naw, i gave up on this a while ago lol
mgbotoe said:
naw, i gave up on this a while ago lol
Click to expand...
Click to collapse
It's so frustrating!! haha. I know your comments were quite a long time ago but i decided to give it a try if you found the issue
Related
I am walking you through the steps I took to build extended power menu so maybe you could see where I've messed up or if I am going about it the wrong way. Any help would be appreciated as I've been going at it for 7 hours with no luck.
Here are the modded files:
http://dl.dropbox.com/u/20397021/android.policy.jar
http://dl.dropbox.com/u/20397021/framework-res.apk
Tools:
APKManager
Smali/Baksmali
Here is what i've done is decompiled framework-res.apk with APKManager then placed these in /framework-res.apk/res/drawable-hdpi:
"ic_lock_reboot.png" for reboot menu
"ic_lock_recovery.png" to enter recovery
"ic_lock_download.png" for download Mode
Click to expand...
Click to collapse
Edited res/values/strings.xml and added these lines at the end above </resources> and saved file.
<string name="reboot_recovery">Recovery</string>
<string name="reboot_download">Download</string>
<string name="reboot">Reboot</string>
Click to expand...
Click to collapse
Recomplied framework-res.apk with APKManager and hit yes, yes for both options during recompile. Also since I messed with .xml file I went to /keep folder and deleted resources.arsc.
Decompiled unsignedframework-res.apk then opened projects/res/values/public.xml and grabbed these lines from it:
<public type="string" name="reboot_recovery" id="0x01040514" />
<public type="string" name="reboot_download" id="0x01040515" />
<public type="string" name="reboot" id="0x01040516" />
<public type="drawable" name="ic_lock_download" id="0x0108044d" />
<public type="drawable" name="ic_lock_reboot" id="0x0108044e" />
<public type="drawable" name="ic_lock_recovery" id="0x0108044f" />
Click to expand...
Click to collapse
Extracted classes.dex from android.policy.jar then ran baksmali in cmd. A few lines below
.method private createDialog()Landroid/app/AlertDialog;
Click to expand...
Click to collapse
I found
const/4 v9, 0x1 and changed to const/4 v9, 0x4
Click to expand...
Click to collapse
the 0x4 reflects three new menus I'm trying to add.
Edited "out/com/android/internal/policy/impl/GlobalActions.smali." put these lines
const/4 v1, 0x4
new-instance v2, Lcom/android/internal/policy/impl/GlobalActions$7;
const v3, 0x108044e
const v4, 0x1040516
invoke-direct {v2, p0, v3, v4}, Lcom/android/internal/policy/impl/GlobalActions$7;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
aput-object v2, v0, v1
const/4 v1, 0x5
new-instance v2, Lcom/android/internal/policy/impl/GlobalActions$8;
const v3, 0x108044f
const v4, 0x1040514
invoke-direct {v2, p0, v3, v4}, Lcom/android/internal/policy/impl/GlobalActions$8;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
aput-object v2, v0, v1
const/4 v1, 0x6
new-instance v2, Lcom/android/internal/policy/impl/GlobalActions$9;
const v3, 0x108044d
const v4, 0x1040515
invoke-direct {v2, p0, v3, v4}, Lcom/android/internal/policy/impl/GlobalActions$9;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
aput-object v2, v0, v1
Click to expand...
Click to collapse
Above this code
invoke-static {v0}, Lcom/google/android/collect/Lists;->newArrayList([Ljava/lang/ObjectLjava/util/ArrayList;
Click to expand...
Click to collapse
Made a copy of "out/com/android/internal/policy/impl/GlobalActions$3.Smali" and replaced everything inside the file that had GlobalActions$3.Smali with GlobalActions$7.Smali
In the same file I replaced this code
const/4 v1, 0x1
invoke-static {v0, v1}, Lcom/android/internal/app/ShutdownThread;->shutdown(
Click to expand...
Click to collapse
With this code
const/4 v1, 0x1
const-string v2, "now"
invoke-static {v0, v2, v1}, Lcom/android/internal/app/ShutdownThread;->reboot(Landroid/content/Context;Ljava/lang/String;Z)V
Click to expand...
Click to collapse
From this point built GlobalActions$8.Smali & GlobalActions$9.Smali the same way except for $8 I changed const-string v2, "recovery" and for $9 const-string v2, "download" after this I compiled with smali then replaced stock classes.odex in android.policy.jar with the modded one. ADB pushed both framework-res.apk and android.policy.jar to phone reboot and I get no power menu now. Instead I feel the vibrate as if it were going to work then locks the home screen and resets to lockscreen.
**ah, nevermind, i am retarded**
You changed the wrong one...
const/4 v9, 0x1 and changed to const/4 v9, 0x4
There is one right below or above it that is 4 that needs to be 7
designgears said:
You changed the wrong one...
const/4 v9, 0x1 and changed to const/4 v9, 0x4
There is one right below or above it that is 4 that needs to be 7
Click to expand...
Click to collapse
Made the change and pushed. After reboot now when I hold power down I am getting the same vibrate and crash to lockscreen after though now I am getting "Billing is no supported in this version of android market" lol
i've been waiting for the this feature!... currently i'm using widgetsoid to reboot to recovery, etc... but reboot to downloader mode would be nice...
sorry i'm not much of any help since i'm new to all the smali stuff but can't you ask the developers of the original sgs2 advanced power menu for help?
http://forum.xda-developers.com/showthread.php?t=1183803&highlight=power+menu
http://forum.xda-developers.com/showthread.php?t=1112713
or look at how they did their mods?
Are you following this guide:
http://forum.xda-developers.com/showthread.php?t=811532
?
I was going to attempt the same thing...
camoto said:
Are you following this guide:
http://forum.xda-developers.com/showthread.php?t=811532
?
I was going to attempt the same thing...
Click to expand...
Click to collapse
hey thats a great guide!
Well,this new method is much much easier than the old method.Minimal smali editing is involved.So even newbies can follow it.
Click to expand...
Click to collapse
You are going to need
1.SystemUI.apk
2.Apk manager,virtuos ten studio or any apk compiling/decompiling tool
3.Notepad++
4.Patience and some time.
Click to expand...
Click to collapse
STEP 1Decompile your SystemUI.apk and go to status_bar_expanded.xml.Open the file and look for this (stock systemUI).
Code:
<com.android.systemui.statusbar.CarrierLabel android:textSize="17.659973dip" android:textColor="#ffffffff" android:layout_gravity="center_vertical" android:orientation="vertical" android:paddingBottom="1.0dip" android:layout_width="0.0dip" android:layout_height="wrap_content" android:layout_marginLeft="5.0dip" android:layout_marginTop="1.0dip" android:layout_weight="1.0" />
paste this code below that
Code:
<ImageView android:layout_gravity="center_vertical" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/ic_notify_quicksettings"[COLOR="Red"] android:onClick="settingsButton"[/COLOR] />
Now save the file.
Code:
[COLOR="Red"] android:onClick="settingsButton"[/COLOR]
is an xml attribute used to call a method when pressing something.Now the settingsButton is the name of the method.
Note;It doesnt matter where you put the code for settings button in statusbar expanded.The above steps are for sgy users.You can put that code anywhere you want.But think logical and use common sense.
STEP 2 Now we can add the method settingsButton to StatusBarService.smali.Open the file and look for the code
Code:
# virtual methods
Paste this method below
Code:
.method public settingsButton(Landroid/view/View;)V
.locals 3
.parameter "v"
.prologue
.line 1717
invoke-virtual {p1}, Landroid/view/View;->getContext()Landroid/content/Context;
move-result-object v0
new-instance v1, Landroid/content/Intent;
const-string v2, "android.settings.SETTINGS"
invoke-direct {v1, v2}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V
const/high16 v2, 0x1000
invoke-virtual {v1, v2}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;
move-result-object v1
invoke-virtual {v0, v1}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V
invoke-virtual {p0}, Lcom/android/systemui/statusbar/StatusBarService;->animateCollapse()V
.line 1720
return-void
.end method
Now save the file.
android.settings.SETTINGS is the intent for calling settings app activity.You can change the intent to call diffrent activities.For example
android.settings.WIRELESS_SETTINGS -wireless and network settings
android.settings.WIFI_SETTINGS -Wifi settings
android.intent.action.POWER_USAGE_SUMMARY -Battery usage summary
Click to expand...
Click to collapse
STEP 3Now download and extract this Settings_shortcut_drawables.zip.Put the ic_notify_quicksettings.xml inside your drawable folder and the the other two pngs inside drawable-ldpi folder.
STEP 4Now compile and push.
Before asking doubts think twice always.If there is any error in the codes,do let me know.Happy to help.
Click to expand...
Click to collapse
Old method
Actually this mod is not made by me.I've just ported it and found the way to implement this in other roms.I've studied the SystemUI.apk from the theme by C.O.D.<D.J> for creed's rom.So all credit goes to him
EDIT:There is a small correction in the code
Code:
invoke-direct {v0, p0}, Lcom/android/systemui/statusbar/StatusBarService$8;-><init>(Lcom/android/systemui/statusbar/StatusBarService;)V
.I've forgot to add <init> after 'StatusBarService$8;->' in the guide.Thanks to 'chevanlol360' for pointing out this error.
Click to expand...
Click to collapse
It's easy if you follow every step correctly
STEP 1: Decompile the SystemUI.apk.There are several threads around xda to show you how to decompile an apk.Navigate to res/layout/ and find status_bar_expanded.xml.Find the following code in the file
Code:
<com.android.systemui.statusbar.CarrierLabel android:textSize="17.659973dip" android:textColor="#ffffffff" android:layout_gravity="center_vertical" android:orientation="vertical" android:paddingBottom="1.0dip" android:layout_width="0.0dip" android:layout_height="wrap_content" android:layout_marginLeft="5.0dip" android:layout_marginTop="1.0dip" android:layout_weight="1.0" />
Paste this code just below it
Code:
<ImageView android:layout_gravity="center_vertical" android:id="@id/settings_button" android:paddingLeft="0.0dip" android:paddingTop="0.0dip" android:paddingRight="8.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/ic_notify_quicksettings" android:contentDescription="@string/accessibility_settings_button" />
Now save and close the file.
STEP 2.Open res/values/strings.xml.And add this line at the end
Code:
<string name="accessibility_settings_button">System settings.</string>
Save and close the file
STEP 3.Open res/values/ids.xml and paste this code at the end
Code:
<item type="id" name="settings_button">false</item>
Save and close the file.
STEP 4.Now extract the files from the attached zip.Take "ic_notify_quicksettings.xml' and put it in res/drawable/.Take 'ic_settings_normal.png' and 'ic_settings_pressed.png' and put it in res/drawable-ldpi/.
Now recompile the apk and push it to system/app to make sure the settings button is there and everything look right.Now decompile that systemUI.apk again.Navigate to res/values/ .We need to find an id from public.xml
STEP 5.Now open public.xml and find this line
Code:
<public type="id" name="settings_button" id="[COLOR="Red"]0x7f090027[/COLOR]" />
Remember the id highlighted in red above.We need to use it.
STEP 6.Open StatusBarService.smali and find this line of code
Code:
.field mScrollView:Landroid/widget/ScrollView;
Paste this code below it
Code:
.field mSettingsBut:Landroid/view/View;
.field private mSettingsButListener:Landroid/view/View$OnClickListener;
Now find this code
Code:
iput-object v0, p0, Lcom/android/systemui/statusbar/StatusBarService;->mStopTracing:Ljava/lang/Runnable;
Paste this code below
Code:
.line 1703
new-instance v0, Lcom/android/systemui/statusbar/StatusBarService$8;
invoke-direct {v0, p0}, Lcom/android/systemui/statusbar/StatusBarService$8;-><init>(Lcom/android/systemui/statusbar/StatusBarService;)V
iput-object v0, p0, Lcom/android/systemui/statusbar/StatusBarService;->mSettingsButListener:Landroid/view/View$OnClickListener;
return-void
Now again find this code
Code:
iput v7, p0, Lcom/android/systemui/statusbar/StatusBarService;->mEdgeBorder:I
And paste this code below
Code:
.line 333
const v7, [COLOR="Red"]0x7f090027[/COLOR]
invoke-virtual {v1, v7}, Lcom/android/systemui/statusbar/ExpandedView;->findViewById(I)Landroid/view/View;
move-result-object v7
iput-object v7, p0, Lcom/android/systemui/statusbar/StatusBarService;->mSettingsBut:Landroid/view/View;
.line 334
iget-object v7, p0, Lcom/android/systemui/statusbar/StatusBarService;->mSettingsBut:Landroid/view/View;
iget-object v8, p0, Lcom/android/systemui/statusbar/StatusBarService;->mSettingsButListener:Landroid/view/View$OnClickListener;
invoke-virtual {v7, v8}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V
The id highlighted in red must be the same as the id from public.xml.So make sure it's the same.Now save and close the file.
STEP 7.Take 'StatusBarService$8.smali' from the attached zip an put it in com/android/systemui/statusbar/.
STEP 8.Now recompile the apk and push it to system/app/ and put the permission rw--r--r--.
If you want to get the feel of it in your stock statusbar i've made one for you just in case. Download it from here:
DOWNLOAD
{
"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"
}
Flash it through recovery.If you are running an odexed rom,delete SystemUI.odex from system/app before you flash the zip.
Awesome tutorial....
Will impliment this in my upcoming custom rom....lol
great tutorial, but stuck on first step as i cant find those lines in my statusbarexpanded.xml , btw i have a galaxy gio but here is my systemui, can you take a look? :good:
alkspo said:
great tutorial, but stuck on first step as i cant find those lines in my statusbarexpanded.xml , btw i have a galaxy gio but here is my systemui, can you take a look? :good:
Click to expand...
Click to collapse
I'll look into it.I'm not near my pc.Actually step 1 puts the settings left to carrier text.You can add that code before the code for clear button.
sent while doin' some burnouts
alright, will tr, thanks
How to move 15toogle to down settings button
alkspo said:
great tutorial, but stuck on first step as i cant find those lines in my statusbarexpanded.xml , btw i have a galaxy gio but here is my systemui, can you take a look? :good:
Click to expand...
Click to collapse
if the Statusbar have this code :
Code:
.line 338
.local v4, qsv:Lcom/android/systemui/statusbar/quickpanel/QuickSettingsView;
const-string v8, "ro.csc.sales_code"
invoke-static {v8}, Landroid/os/SystemProperties;->get(Ljava/lang/String;)Ljava/lang/String;
move-result-object v1
.line 339
.local v1, code:Ljava/lang/String;
const-string v8, "XEC"
invoke-virtual {v8, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v8
if-eqz v8, :cond_1
you can delete it ,
If the statusbar have this :
Code:
.line 340
const v8, 0x7f030003
invoke-static {p1, v8, v10}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;
move-result-object v4
.end local v4 #qsv:Lcom/android/systemui/statusbar/quickpanel/QuickSettingsView;
check-cast v4, Lcom/android/systemui/statusbar/quickpanel/QuickSettingsView;
.line 348
.restart local v4 #qsv:Lcom/android/systemui/statusbar/quickpanel/QuickSettingsView;
:goto_0
iget-object v8, p0, Lcom/android/systemui/statusbar/StatusBarService;->mExpandedView:Lcom/android/systemui/statusbar/ExpandedView;
invoke-virtual {v8, v4, v13}, Lcom/android/systemui/statusbar/ExpandedView;->addView(Landroid/view/View;I)V
and delete this :
Code:
.line 344
:cond_1
const v8, 0x3030003
invoke-static {p1, v8, v10}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;
move-result-object v4
check-cast v4, Lcom/lidroid/systemui/quickpanel/PowerWidget;
.local v4, qsv:Lcom/lidroid/systemui/quickpanel/PowerWidget;
invoke-virtual {v4}, Lcom/lidroid/systemui/quickpanel/PowerWidget;->setupWidget()V
goto :goto_0
you can change into :
so the line like as :
Code:
.line 337
const/4 v4, 0x0
.line 344
const v8, 0x3030003
invoke-static {p1, v8, v10}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;
move-result-object v4
check-cast v4, Lcom/lidroid/systemui/quickpanel/PowerWidget;
.line 348
.local v4, qsv:Lcom/lidroid/systemui/quickpanel/PowerWidget;
const/4 v9, 0x1
invoke-virtual {v4}, Lcom/lidroid/systemui/quickpanel/PowerWidget;->setupWidget()V
iget-object v8, p0, Lcom/android/systemui/statusbar/StatusBarService;->mExpandedView:Lcom/android/systemui/statusbar/ExpandedView;
invoke-virtual {v8, v4, v9}, Lcom/android/systemui/statusbar/ExpandedView;->addView(Landroid/view/View;I)V
.line 352
new-instance v8, Landroid/widget/LinearLayout;
invoke-direct {v8, p1}, Landroid/widget/LinearLayout;-><init>(Landroid/content/Context;)V
iput-object v8, p0, Lcom/android/systemui/statusbar/StatusBarService;->mMiniCon:Landroid/widget/LinearLayout;
.line 353
iget-object v8, p0, Lcom/android/systemui/statusbar/StatusBarService;->mMiniCon:Landroid/widget/LinearLayout;
const/4 v9, 0x1
invoke-virtual {v8, v9}, Landroid/widget/LinearLayout;->setOrientation(I)V
.line 354
iget-object v8, p0, Lcom/android/systemui/statusbar/StatusBarService;->mExpandedView:Lcom/android/systemui/statusbar/ExpandedView;
invoke-virtual {v8, v12}, Lcom/android/systemui/statusbar/ExpandedView;->findViewById(I)Landroid/view/View;
move-result-object v8
check-cast v8, Landroid/widget/LinearLayout;
iget-object v9, p0, Lcom/android/systemui/statusbar/StatusBarService;->mMiniCon:Landroid/widget/LinearLayout;
invoke-virtual {v8, v9, v13}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;I)V
.line 358
const v8, 0x7f030005
invoke-static {p1, v8, v10}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;
move-result-object v8
check-cast v8, Lcom/android/systemui/statusbar/CallOnGoingView;
iput-object v8, p0, Lcom/android/systemui/statusbar/StatusBarService;->mCallOnGoingView:Lcom/android/systemui/statusbar/CallOnGoingView;
.line 359
iget-object v8, p0, Lcom/android/systemui/statusbar/StatusBarService;->mCallOnGoingView:Lcom/android/systemui/statusbar/CallOnGoingView;
iput-object p0, v8, Lcom/android/systemui/statusbar/CallOnGoingView;->mService:Lcom/android/systemui/statusbar/StatusBarService;
.line 361
return-void
.end method
Here you go , iam modify you systemui . view you new systemui . and Trying to Experiment xD . view my attatch
and i thinks the Guide not working on CM .
Thanks you, AWESOME Guide
Thanks for this tutorial mate! awesome as always will try this after i come back..
Boooom..! Pin! Thanks for this great tut bro... now i know.. i really mis the smalis.. haha i really hate smali...
____________________________________
Reserve for future use..
send thru postal codes supported with busybox command again
thanks for doing it for me, but my device is mdpi not hdpi, so will not work, can you make it again?
alkspo said:
thanks for doing it for me, but my device is mdpi not hdpi, so will not work, can you make it again?
Click to expand...
Click to collapse
If the resolution png (too small) with a resolution of handle you then I rename a ldpi, if png (fit) with a screen resolution of your handle then I rename a mdpi, if the png does not fit the screen resolution of your handle (too big) then I rename a hdpi .
thats trick to make png no zoom ( big or small icon ) . and make to past you screen resolution .
try my mods . push to system/app
sorry for bad english
oh i see what you mean, yes so it wont zoom in thanks, i tried it but it looks a bit messed up, can you put the date and the setting and x button under the toggles? or is that too much trouble ? o: i like have the toggle at the very top, and might fix overlap if do that thanks alot here is screenie
Thanks for the tut
Inviato dal mio GT-S5830i con Tapatalk 2
The codes in sgyd differ a little bit... failed on my first try... trying it again
hell_lock said:
The codes in sgyd differ a little bit... failed on my first try... trying it again
Click to expand...
Click to collapse
Try it in your sgy.It's easier to port if it works.
sent while doin' some burnouts
b16h22 said:
Try it in your sgy.It's easier to port if it works.
sent while doin' some burnouts
Click to expand...
Click to collapse
Yudhiez managed to make it fully working for me, but the date and settings and clear button is on top of toggles, while the one in your screenshot is below, how do i rearrange it? o:
Haha told it to samsoul16 bro he had this questions now u explain it good thanks pressed
Sent from my GT-S5360 using Xparent ICS Blue Tapatalk 2
Wow this tutorial is great. Thanks friend.
HYPOCRITES I'm gonna do it blind
HYPOCRITES your messiah was never mine!
beautiful. :good:
Galaxy Ace s5830i
Hey,I tried to add this is Galaxy Ace S5830i.
I don't have StatusBarService$7.smali,so I renamed StatusBarService$8.smali to StatusBarService$7.smali,and changed all the StatusBarService$8 lines to StatusBarService$7,the same in StatuBarService.smali,but it still not working,can you help me?
This work on stock deodex? Will try
Sent from my GT-S5360 using xda premium
Hi,
Well, I try to theme ICS systemui to Xperia JB style like Xperia Z.
But this so far the only I can do for now. I hope you guys like it.
More to come. Stay tuned.
Project Finished
Changelog
20/2: Initial release.
21/2: Fixed all statusbar background that cause FC on some user.
03/3: Style Z added. Change colour according to themes colour. (Special thanks to erorcun for the trick)
05/3: Style S added. Thanks to destroyy.
15/3: Special style added. Modified to look more like JB statusbar notification.
18/3: CM style added. Thanks to SpaceCaker.
Preview
{
"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"
}
Brand new statusbar background style.
Style 1
Style 2
Style 3 (Fullscreen)
Style 4
Style Z (Change Color According to Themes)
Style S (Change Color According to Themes)
Style ZN6 (Change Color According to Themes)
Style CM (Change Color According to Themes)
Note
1. Before installing this, please delete any quickpanel setting or systemuipreferences if you using tab systemui before.
2. My systemui support smallapp.
3. Please PM me asking for permission first, if you want to incorporate it into your ROMs.
4. Style 1-4 is known to work for some user only. You need a luck for these
Instruction
1. Flash Universal_part_1.zip and reboot. Did the statusbar appear?
If it doesnt, probably there have problem with your rom. Flash stock rom via flashtool first.
2. If the statusbar appeared, continue to flash Style_x.zip via recovery.
3. Reboot you phone.
Credits
Niaboc79 for original xperia t systemui.
serajr for helping me in smali editing.
leloiboi for some tip and help.
Ticklefish for his tutorial.
erorcun for his trick to change colour according to theme.
destroyy for Sammy style.
SpaceCaker for CM style.
I'm do this for free. Damn... this take huge amount of time especially the smali editing.
Dont just know how to download and flash. Try appreciate my work by hit
.
[Guide/Tutorial] Customize Your Own Statusbar!
[Guide/Tutorial] Customize Your Own Statusbar!
Hi, again.
Some user keep PM'ing me how to change that, that and etc.
So I decide to do a simple guide to customize your own statusbar.
Make sure you have a basic knowledge to compile/decompile apk.
Change Statusbar Background Color
Decompile systemui.apk and navigate to SystemUI/res/values/drawables.xml and edit this line:
Code:
<item type="drawable" name="status_bar_background">#[COLOR="Red"]ff1a1a1a[/COLOR]</item>
Change red content to what ever you line. For more hex color reference, go here
For black color, change it to ff000000.
Save and compile back.
(This method only applicable for Style_Z and later version)
For style 1-4, change status_bar_background.png in drawable-hdpi folder
Look for transparent statusbar? Go here..
Change Navigation Button Background Color
Decompile systemui.apk and navigate to SystemUI/res/layout/navigation_bar.xml and edit this line.
Code:
<com.android.systemui.statusbar.phone.NavigationBarView android:id="@id/nav_background" [COLOR="Red"]android:background="#ff000000"[/COLOR] android:layout_width="fill_parent" android:layout_height="fill_parent" android:directionality="none"
Change red content to what ever you line. For more hex color reference, go here
The original Xperia Z nav backgroud color is ff1a1a1a.
Save and compile back
Change Clock Colour on Statusbar
Decompile systemui.apk and navigate to SystemUI/res/layout/status_bar.xml and find this line:
Code:
<com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="left|center" android:id="@id/clock" android:paddingLeft="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
And change it to this
Code:
<com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:textColor="#[COLOR="Red"]ff09afed[/COLOR]" android:gravity="left|center" android:id="@id/clock" android:paddingLeft="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
Change the red content to what ever colour you like. For more hex color reference, go here
Remember! You can also change carrier label color, date, and etc. Just look respective line and xml.
Add Seconds To Statusbar Clock
Decompile systemui.apk and navigate to SystemUI/res/layout/status_bar.xml and find this line:
Code:
[COLOR="Blue"]<com.android.systemui.statusbar.policy.Clock[/COLOR] android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="left|center" android:id="@id/clock" android:paddingLeft="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
And replace blue line above with following red line:
Code:
<[COLOR="Red"]DigitalClock[/COLOR] android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="left|center" android:id="@id/clock" android:paddingLeft="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
Save change you have made and recompile back.
It easy, right?
Hide Clock,Battery Percentage and etc.
Hide clock.
Decompile systemui.apk and navigate to SystemUI/res/layout/status_bar.xml and find this line:
Code:
<com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="left|center" android:id="@id/clock" android:paddingLeft="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
and change to this:
Code:
<com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="left|center" android:id="@id/clock" android:paddingLeft="6.0dip" [COLOR="Red"]android:visibility="gone"[/COLOR] android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
Hide battery percentage
Find this line:
Code:
<TextView android:layout_gravity="left|center" android:id="@id/battery_text" android:paddingLeft="4.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/status_bar_settings_settings_button" android:singleLine="true" style="@style/StatusBarNotificationText" />
change to this:
Code:
<TextView android:layout_gravity="left|center" android:id="@id/battery_text" android:paddingLeft="4.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/status_bar_settings_settings_button" android:singleLine="true" style="@style/StatusBarNotificationText" [COLOR="Red"]android:visibility="gone"[/COLOR] />
Remember! Just added red word at the end of line you want to hide if you want to hide content on statusbar.
Add Battery Percentage On Statusbar.
Decompile systemui.apk and navigate to SystemUI/res/layout/status_bar.xml and find this line:
Code:
<LinearLayout android:gravity="center" android:orientation="horizontal" android:id="@id/signal_battery_cluster" android:paddingLeft="2.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent">
<include android:id="@id/signal_cluster" android:layout_width="wrap_content" android:layout_height="wrap_content" layout="@layout/signal_cluster_view" />
<ImageView android:id="@id/battery" android:paddingLeft="4.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" />
</LinearLayout>
And add red line below:
Code:
<LinearLayout android:gravity="center" android:orientation="horizontal" android:id="@id/signal_battery_cluster" android:paddingLeft="2.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent">
<include android:id="@id/signal_cluster" android:layout_width="wrap_content" android:layout_height="wrap_content" layout="@layout/signal_cluster_view" />
[COLOR="Red"]<TextView android:layout_gravity="left|center" android:id="@id/battery_text" android:paddingLeft="4.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/status_bar_settings_settings_button" android:singleLine="true" style="@style/StatusBarNotificationText" />[/COLOR]
<ImageView android:id="@id/battery" android:paddingLeft="4.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" />
</LinearLayout>
Save change you have made. After that, look for this smali file:
PhoneStatusBar.smali
Code:
.line 358
iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBatteryController:Lcom/android/systemui/statusbar/policy/BatteryController;
const v9, 0x7f0e0028
invoke-virtual {v4, v9}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;
move-result-object v9
check-cast v9, Landroid/widget/ImageView;
invoke-virtual {v10, v9}, Lcom/android/systemui/statusbar/policy/BatteryController;->addIconView(Landroid/widget/ImageView;)V
and add red lines below:
Code:
.line 358
iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBatteryController:Lcom/android/systemui/statusbar/policy/BatteryController;
const v9, 0x7f0e0028
invoke-virtual {v4, v9}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;
move-result-object v9
check-cast v9, Landroid/widget/ImageView;
invoke-virtual {v10, v9}, Lcom/android/systemui/statusbar/policy/BatteryController;->addIconView(Landroid/widget/ImageView;)V
[COLOR="Red"].line 13
iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBatteryController:Lcom/android/systemui/statusbar/policy/BatteryController;
const v9, 0x7f0e0061
invoke-virtual {v4, v9}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;
move-result-object v9
check-cast v9, Landroid/widget/TextView;
invoke-virtual {v10, v9}, Lcom/android/systemui/statusbar/policy/BatteryController;->addLabelView(Landroid/widget/TextView;)V[/COLOR]
also change the const v9, 0x7f0e0061 to your own value, look for it inside public.xml
Recompile back and flash.
Temporary Hide Statusbar When We Pull SystemUI/Fullscreen (For Advanced User Only)
Find this smali file:
PhoneStatusBar.smali:
Here when the expanded view is about to become visible, we hide the main status bar view (red):
Code:
[B].method private makeExpandedVisible()V[/B]
.line 1194
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpandedView:Lcom/android/systemui/statusbar/phone/ExpandedView;
const/4 v1, 0x2
invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/phone/ExpandedView;->requestFocus(I)Z
.line 1195
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mTrackingView:Lcom/android/systemui/statusbar/phone/TrackingView;
const/4 v1, 0x0
invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/phone/TrackingView;->setVisibility(I)V
[COLOR="red"].line 1900
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
const/4 v1, 0x4
invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->setVisibility(I)V[/COLOR]
goto :goto_0
.end method
Here when the expanded view is gone, we show the main status bar view again (red):
Code:
[B].method performCollapse()V[/B]
.line 1278
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpandedDialog:Landroid/app/Dialog;
invoke-virtual {v0}, Landroid/app/Dialog;->getWindow()Landroid/view/Window;
move-result-object v0
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpandedParams:Landroid/view/WindowManager$LayoutParams;
invoke-virtual {v0, v1}, Landroid/view/Window;->setAttributes(Landroid/view/WindowManager$LayoutParams;)V
.line 1279
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mTrackingView:Lcom/android/systemui/statusbar/phone/TrackingView;
const/16 v1, 0x8
invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/phone/TrackingView;->setVisibility(I)V
[COLOR="Red"].line 1900
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
const/4 v1, 0x0
invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->setVisibility(I)V[/COLOR]
.line 1281
iget v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mDisabled:I
const/high16 v1, 0x2
and-int/2addr v0, v1
if-nez v0, :cond_2
.line 1282
const/4 v0, 0x1
const/high16 v1, 0x10a
invoke-virtual {p0, v0, v1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setNotificationIconVisibility(ZI)V
.line 1285
:cond_2
iget-boolean v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpanded:Z
if-eqz v0, :cond_0
.line 1288
iput-boolean v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpanded:Z
.line 1289
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPostCollapseCleanup:Ljava/lang/Runnable;
if-eqz v0, :cond_0
.line 1290
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPostCollapseCleanup:Ljava/lang/Runnable;
invoke-interface {v0}, Ljava/lang/Runnable;->run()V
.line 1291
const/4 v0, 0x0
iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPostCollapseCleanup:Ljava/lang/Runnable;
goto :goto_0
.end method
Now look for:
Code:
Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->getHeight()I
You´ll get 6 matches/lines with something like:
Code:
invoke-virtual {v2}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->getHeight()I
move-result v2
Insert red line (respect line spaces) only within following methods:
Code:
.method doAnimation()V
.method doRevealAnimation()V
.method getExpandedHeight(I)I
.method prepareTracking(IZ)V
.method updateExpandedViewPos(I)V
DON´T INSERT INSIDE THIS METHOD:
Code:
.method interceptTouchEvent(Landroid/view/MotionEvent;)Z
Code:
invoke-virtual {v2}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->getHeight()I
move-result v2
[COLOR="red"]const/4 v2, 0x0[/COLOR]
(remember to change v2 to the same as "move-result v?")
Save and Compile. If you still got an error or force close on statusbar, just compare with style 3.
Change Color According to ThemeAccent Color (For Expert User Only)
Download the ThemeUtils.zip in attachment and extract it to smali/com/blah.../blah... You can put ThemeUtils.smali in any directory in smali folder. But when we want to run this file, we need to specific the directory where we put the file. For example,
I put in smali/com/sonymobile/systemui/statusbar/tools/
You will know what I mean
Something have to run this file and provide context object. For example, the main file which contain context object in systemui.apk is SystemUIService.smali. So look for this line:
Code:
.line 91
iget-object v6, p0, Lcom/android/systemui/SystemUIService;->mServices:[Lcom/android/systemui/SystemUI;
aget-object v6, v6, v4
iput-object p0, v6, Lcom/android/systemui/SystemUI;->mContext:Landroid/content/Context;
And added following red line:
Code:
.line 91
iget-object v6, p0, Lcom/android/systemui/SystemUIService;->mServices:[Lcom/android/systemui/SystemUI;
aget-object v6, v6, v4
iput-object p0, v6, Lcom/android/systemui/SystemUI;->mContext:Landroid/content/Context;
[COLOR="Red"]invoke-static {p0}, Lcom/sonymobile/systemui/statusbar/tools/ThemeUtils;->init(Landroid/content/Context;)V[/COLOR]
And save it.
If you want to change the clock color in expanded statusbar for example, find this line in com/android/systemui/statusbar/phone/PhoneStatusBar.smali
Code:
.field mExpanded:Z
.field mExpandedContents:Landroid/view/View;
.field mExpandedDialog:Landroid/app/Dialog;
And add red line:
Code:
.field mExpanded:Z
[COLOR="Red"].field mExpandedClock:Landroid/widget/TextView;[/COLOR]
.field mExpandedContents:Landroid/view/View;
.field mExpandedDialog:Landroid/app/Dialog;
Find this line:
Code:
.line 1227
const/16 v0, -0x2710
invoke-virtual {p0, v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->updateExpandedViewPos(I)V
And add red line below:
Code:
.line 1227
const/16 v0, -0x2710
invoke-virtual {p0, v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->updateExpandedViewPos(I)V
[COLOR="Red"]iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpandedClock:Landroid/widget/TextView;
invoke-static {}, Lcom/sonymobile/systemui/statusbar/tools/ThemeUtils;->getAccentColor()I
move-result v1
invoke-virtual {v0, v1}, Landroid/widget/TextView;->setTextColor(I)V
[/COLOR]
Find this line:
Code:
.line 343
const v9, 0x7f0e003e
invoke-virtual {v1, v9}, Lcom/android/systemui/statusbar/phone/ExpandedView;->findViewById(I)Landroid/view/View;
move-result-object v9
check-cast v9, Lcom/android/systemui/statusbar/policy/DateView;
iput-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mDateView:Lcom/android/systemui/statusbar/policy/DateView;
And add red line below:
Code:
.line 343
const v9, 0x7f0e003e
invoke-virtual {v1, v9}, Lcom/android/systemui/statusbar/phone/ExpandedView;->findViewById(I)Landroid/view/View;
move-result-object v9
check-cast v9, Lcom/android/systemui/statusbar/policy/DateView;
iput-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mDateView:Lcom/android/systemui/statusbar/policy/DateView;
[COLOR="Red"]const v9, 0x7f0e0095
invoke-virtual {v1, v9}, Lcom/android/systemui/statusbar/phone/ExpandedView;->findViewById(I)Landroid/view/View;
move-result-object v9
check-cast v9, Landroid/widget/TextView;
iput-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpandedClock:Landroid/widget/TextView;[/COLOR]
Now look for this line:
Code:
.line 1083
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
const v1, 0x7f0e002b
invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;
And add red line below:
Code:
.line 1083
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
const v1, 0x7f0e002b
invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;
[COLOR="Red"]move-result-object v1
.line 1084
if-eqz v1, :cond_0
.line 1085
if-eqz p1, :cond_1
const/4 v0, 0x0
:goto_0
invoke-virtual {v1, v0}, Landroid/view/View;->setVisibility(I)V
.line 1087
:cond_0
invoke-virtual {p0, p1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->showClockExp(Z)V
return-void
.line 1085
:cond_1
const/16 v0, 0x8
goto :goto_0
.end method
.method public showClockExp(Z)V
.locals 2
.parameter
.prologue
.line 1083
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpandedView:Lcom/android/systemui/statusbar/phone/ExpandedView;
const v1, 0x7f0e0095
invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/phone/ExpandedView;->findViewById(I)Landroid/view/View;[/COLOR]
And save change.
If you want to change the color for button toggle according to theme (colorizing button), look for ToolsButton.smali (com/sonymobile/systemui/statusbar/tools).
Fine this line:
Code:
.method private updateIcon()V
.locals 5
.prologue
.line 239
iget-object v3, p0, Lcom/sonymobile/systemui/statusbar/tools/ToolsButton;->mStateIcons:Ljava/util/HashMap;
iget v4, p0, Lcom/sonymobile/systemui/statusbar/tools/ToolsButton;->mState:I
invoke-static {v4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v4
invoke-virtual {v3, v4}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v2
check-cast v2, Ljava/lang/Integer;
And change to this:
Code:
.method private updateIcon()V
.locals [COLOR="Red"]6[/COLOR]
.prologue
[COLOR="Red"].line 239
const/4 v5, 0x0
.local v5, applyFilter:Z[/COLOR]
iget-object v3, p0, Lcom/sonymobile/systemui/statusbar/tools/ToolsButton;->mStateIcons:Ljava/util/HashMap;
iget v4, p0, Lcom/sonymobile/systemui/statusbar/tools/ToolsButton;->mState:I
[COLOR="Red"]const/4 v1, 0x1
if-eq v4, v1, :cond_0
const/4 v5, 0x1
:cond_0[/COLOR]
invoke-static {v4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v4
invoke-virtual {v3, v4}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v2
check-cast v2, Ljava/lang/Integer;
Now look for this line:
Code:
.line 241
.local v1, icon:Landroid/graphics/Bitmap;
if-eqz v2, :cond_0
And change the value to this
Code:
.line 241
.local v1, icon:Landroid/graphics/Bitmap;
if-eqz v2, :[COLOR="Red"]cond_1[/COLOR]
Look for following line:
Code:
.line 249
:cond_0
:goto_0
iget-object v3, p0, Lcom/sonymobile/systemui/statusbar/tools/ToolsButton;->mIcon:Lcom/sonymobile/systemui/uicomponents/Image;
invoke-virtual {v3, v1}, Lcom/sonymobile/systemui/uicomponents/Image;->setBitmap(Landroid/graphics/Bitmap;)V
And change to following red content:
Code:
.line 249
:[COLOR="Red"]cond_1[/COLOR]
:goto_0
iget-object v3, p0, Lcom/sonymobile/systemui/statusbar/tools/ToolsButton;->mIcon:Lcom/sonymobile/systemui/uicomponents/Image;
[COLOR="Red"]invoke-virtual {v3, v1, v5}[/COLOR], Lcom/sonymobile/systemui/uicomponents/Image;->setBitmap(Landroid/graphics/Bitmap;[COLOR="Red"]Z[/COLOR])V
Look for following line and delete red line:
Code:
.line 250
[COLOR="Red"]iget-object v3, p0, Lcom/sonymobile/systemui/statusbar/tools/ToolsButton;->mIcon:Lcom/sonymobile/systemui/uicomponents/Image;[/COLOR]
invoke-virtual {v3}, Lcom/sonymobile/systemui/uicomponents/Image;->invalidate()V
Find this line:
Code:
.line 251
return-void
And add red line below:
Code:
.line 251
[COLOR="Red"].end local v5 #applyFilter:Z[/COLOR]
return-void
Look for following line:
Code:
.line 244
:catch_0
move-exception v0
And like usual, add following line:
Code:
.line 244
[COLOR="Red"].restart local v5 #applyFilter:Z[/COLOR]
:catch_0
move-exception v0
And save change you have made.
Now the last part is change the image.smali (com/sonymobile/systemui/uicomponents/)
Look for following line and add red line:
Code:
# instance fields
[COLOR="Red"].field protected mApplyFilter:Z[/COLOR]
.field protected mBitmap:Landroid/graphics/Bitmap;
.field protected final mMatrix:Landroid/graphics/Matrix;
.field protected mScalingX:F
.field protected mScalingY:F
Look for following line:
Code:
.method public constructor <init>(Ljava/lang/String;Landroid/graphics/Bitmap;)V
.locals 1
.parameter "id"
.parameter "image"
.prologue
const/high16 v0, 0x3f80
And change to this:
Code:
.method public constructor <init>(Ljava/lang/String;Landroid/graphics/Bitmap;)V
[COLOR="Red"].locals 2[/COLOR]
.parameter "id"
.parameter "image"
.prologue
const/high16 v0, 0x3f80
[COLOR="Red"]const/4 v1, 0x0[/COLOR]
Look for this line:
Code:
.line 54
invoke-virtual {p0, p2}, Lcom/sonymobile/systemui/uicomponents/Image;->setBitmap(Landroid/graphics/Bitmap;)V
Change the entire line to this:
Code:
.line 54
[COLOR="red"]invoke-virtual {p0, p2, v1}, Lcom/sonymobile/systemui/uicomponents/Image;->setBitmap(Landroid/graphics/Bitmap;Z)V[/COLOR]
Find this line:
Code:
.method public onDraw(Landroid/graphics/Canvas;FF)V
.locals 3
.parameter "canvas"
.parameter "x"
.parameter "y"
.prologue
const/high16 v1, 0x3f80
And change to this:
Code:
.method public onDraw(Landroid/graphics/Canvas;FF)V
[COLOR="red"].locals 5[/COLOR]
.parameter "canvas"
.parameter "x"
.parameter "y"
.prologue
const/high16 v1, 0x3f80
Look for this line:
Code:
.line 181
iget-object v0, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mBitmap:Landroid/graphics/Bitmap;
if-eqz v0, :cond_1
...
Code:
.line 181
iget-object v0, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mBitmap:Landroid/graphics/Bitmap;
if-eqz v0, [COLOR="red"]:cond_2[/COLOR]
Look for this code:
Code:
.line 182
iget v0, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mScalingX:F
cmpl-float v0, v0, v1
if-nez v0, :cond_0
iget v0, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mScalingY:F
cmpl-float v0, v0, v1
if-eqz v0, :cond_2
Change to this:
Code:
.line 182
iget v0, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mScalingX:F
cmpl-float v0, v0, v1
if-nez v0, :cond_0
iget v0, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mScalingY:F
cmpl-float v0, v0, v1
if-eqz v0, [COLOR="Red"]:cond_3[/COLOR]
Look this line:
Code:
.line 185
iget-object v0, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mBitmap:Landroid/graphics/Bitmap;
iget-object v1, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mMatrix:Landroid/graphics/Matrix;
iget-object v2, p0, Lcom/sonymobile/systemui/uicomponents/Component;->mPaint:Landroid/graphics/Paint;
Add red line below:
Code:
.line 185
iget-object v0, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mBitmap:Landroid/graphics/Bitmap;
iget-object v1, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mMatrix:Landroid/graphics/Matrix;
iget-object v2, p0, Lcom/sonymobile/systemui/uicomponents/Component;->mPaint:Landroid/graphics/Paint;
[COLOR="red"]iget-boolean v4, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mApplyFilter:Z
const/4 v3, 0x0
if-eqz v4, :cond_1
invoke-static {}, Lcom/sonymobile/systemui/statusbar/tools/ThemeUtils;->getAccentColorFilter()Landroid/graphics/ColorFilter;
move-result-object v3
:cond_1
invoke-virtual {v2, v3}, Landroid/graphics/Paint;->setColorFilter(Landroid/graphics/ColorFilter;)Landroid/graphics/ColorFilter;[/COLOR]
invoke-virtual {p1, v0, v1, v2}, Landroid/graphics/Canvas;->drawBitmap(Landroid/graphics/Bitmap;Landroid/graphics/Matrix;Landroid/graphics/Paint;)V
Now look for this line:
Code:
.line 190
:cond_1
:goto_0
return-void
And change to this value:
Code:
.line 190
[COLOR="Red"]:cond_2[/COLOR]
:goto_0
return-void
Look for following line:
Code:
.line 187
:cond_2
iget-object v0, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mBitmap:Landroid/graphics/Bitmap;
iget-object v1, p0, Lcom/sonymobile/systemui/uicomponents/Component;->mPaint:Landroid/graphics/Paint;
invoke-virtual {p1, v0, p2, p3, v1}, Landroid/graphics/Canvas;->drawBitmap(Landroid/graphics/Bitmap;FFLandroid/graphics/Paint;)V
And change to this value/add red line:
Code:
.line 187
[COLOR="red"]:cond_3[/COLOR]
iget-object v0, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mBitmap:Landroid/graphics/Bitmap;
iget-object v1, p0, Lcom/sonymobile/systemui/uicomponents/Component;->mPaint:Landroid/graphics/Paint;
[COLOR="red"]iget-boolean v4, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mApplyFilter:Z
const/4 v3, 0x0
if-eqz v4, :cond_4
invoke-static {}, Lcom/sonymobile/systemui/statusbar/tools/ThemeUtils;->getAccentColorFilter()Landroid/graphics/ColorFilter;
move-result-object v3
:cond_4
invoke-virtual {v1, v3}, Landroid/graphics/Paint;->setColorFilter(Landroid/graphics/ColorFilter;)Landroid/graphics/ColorFilter;[/COLOR]
invoke-virtual {p1, v0, p2, p3, v1}, Landroid/graphics/Canvas;->drawBitmap(Landroid/graphics/Bitmap;FFLandroid/graphics/Paint;)V
Look this line:
Code:
.method public setBitmap(Landroid/graphics/Bitmap;Z)V
.locals 2
.parameter "bitmap"
.prologue
const/4 v1, 0x0
And ...
Code:
.method public setBitmap(Landroid/graphics/Bitmap;Z)V
.locals 2
.parameter "bitmap"
[COLOR="red"].parameter "filter"[/COLOR]
.prologue
const/4 v1, 0x0
And LAST one
Code:
.line 73
:cond_0
:goto_0
iput-object p1, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mBitmap:Landroid/graphics/Bitmap;
And... you know what I mean, right?
Code:
.line 73
:cond_0
:goto_0
iput-object p1, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mBitmap:Landroid/graphics/Bitmap;
[COLOR="red"]iput-boolean p2, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mApplyFilter:Z[/COLOR]
erorcun is here said:
You are missing 2 thing. In older versions statusbar clock and expanded clocks' ids are same, so it will not work on normal systemui and you should add 0 to setbitmap's last parameters in ninepatchimage.smali.
Click to expand...
Click to collapse
Remember!
The png you want to colorize must be in white color.
This may take more than two hour. So, patient is require for this.
Good luck
End for now. Will post again if I find something useful.
nice done bro, can you make style 2 also without percentage in statusbar and there is no clock in status bar is that right?
Pandemic said:
nice done bro, can you make style 2 also without percentage in statusbar and there is no clock in status bar is that right?
Click to expand...
Click to collapse
I know you will request something like this.
No clock, no percentage and black background on statusbar.
ZN6 said:
I know you will request something like this.
btw here. No clock and percentage on statusbar.
Click to expand...
Click to collapse
thanks bro
yes i pressed it
Re: [MOD] Xperia Jelly Bean Style SystemUI [20/2]
Plz can u send me step by step installation process??
As a beginer i need ur help..,it would b very thankfull:thumbup:
Sent from my ST25i using xda app-developers app
Re: [MOD] Xperia Jelly Bean Style SystemUI [20/2]
shourya jain said:
Plz can u send me step by step installation process??
As a beginer i need ur help..,it would b very thankfull:thumbup:
Sent from my ST25i using xda app-developers app
Click to expand...
Click to collapse
First, download any file that you like.
Put it in your sdcard. Reboot your phone into recovery. Select file you have put in your sdcard. Wait...and reboot your phone.
Feel free to hit
if this post help you anyway.
Sent from LT22i via Tapatalk.
screen shot?
support small apps?
Re: [MOD] Xperia Jelly Bean Style SystemUI [20/2]
Now what really happend is that all my status bar is gone n i m unable to set any wallpaper n my home button is also nt working
Sent from my ST25i using xda app-developers app
Re: [MOD] Xperia Jelly Bean Style SystemUI [20/2]
silverbios said:
screen shot?
Click to expand...
Click to collapse
You didnt see the screenshot on the first post?
shourya jain said:
Now what really happend is that all my status bar is gone n i m unable to set any wallpaper n my home button is also nt working
Sent from my ST25i using xda app-developers app
Click to expand...
Click to collapse
What syatemui mod that you are using before?
Feel free to hit
if this post help you anyway.
Sent from LT22i via Tapatalk.
not work on my sola!!
try to fix it
Re: [MOD] Xperia Jelly Bean Style SystemUI [20/2]
What to do plz help
Sent from my ST25i using xda app-developers app
shourya jain said:
What to do plz help
Sent from my ST25i using xda app-developers app
Click to expand...
Click to collapse
dude please read what he ask to you :/
Re: [MOD] Xperia Jelly Bean Style SystemUI [20/2]
No system mod..just stock ics rom
Sent from my ST25i using xda app-developers app
Re: [MOD] Xperia Jelly Bean Style SystemUI [20/2]
You post xperia 2011???
Gửi từ ST18i của tôi bằng cách sử dụng Tapatalk 2
Re: [MOD] Xperia Jelly Bean Style SystemUI [20/2]
There's a big chance to not working if you use tab systemui with preferences.
Here try this.
Delete systemui.apk and systemuipreferences.apk. After that reboot your phone. You will lost statusbar. Reboot you phone again and flash my systemui. If still doesnt work...flash on clean stock rom.
Feel free to hit
if this post help you anyway.
Sent from LT22i via Tapatalk.
support small apps?
Re: [MOD] Xperia Jelly Bean Style SystemUI [20/2]
anhmat122 said:
You post xperia 2011???
Gửi từ ST18i của tôi bằng cách sử dụng Tapatalk 2
Click to expand...
Click to collapse
And it not working on xperia 2011 phone.
Will try to make one if I have a time.
Feel free to hit
if this post help you anyway.
Sent from LT22i via Tapatalk.
anhmat122 said:
You post xperia 2011???
Gửi từ ST18i của tôi bằng cách sử dụng Tapatalk 2
Click to expand...
Click to collapse
dont i understand me you??
i dont get you thats why i talk like this and what thread is this no 2011, but 2012 !!
Re: [MOD] Xperia Jelly Bean Style SystemUI [20/2]
Delete systemui.apk and and systemuiprefernces.apk fom system/app?? If yes i'll delete it right now... And then rebot it again and install the zip u uploaded..right?
Sent from my ST25i using xda app-developers app
Hi To all
Me again...
This mod and how to is come from my Rom!
After many request...i decided share that to all but if anybody will use that just dont forget give me a credit:laugh:
What is this mod and how to?
this mod and how to have:
how to make custome settings in "secsettings.apk"
how to add make 23 toggle statusbar
how to add toggle between stock and 23 toggle statusbar in custome settings
and many things will come...
what you tools you need?
you need apktools or apk manger or apkmulti tools for decompile and Tools and Not pad++(i always use apkmulti tools this is better or you can use wanam Apk_Manager Repack.
lets Go to start
post 1 have system files download my Attachment "systemfiles.zip" put all of the in your device system\app folder to system\app and system\framework to system\framework
post 2 is "how to make custome settings in "secsettings.apk" and secsettings.apk files"
post 3 is "how to make custome settings in "systemui.apk""
screen shots:
will upload
thanks:
Wanam
lets go strat with Secsettings.apk
part1:
decompile "Secsettings.apk"
download my Attachment file "SecSettings.apk.rar" extract that and copy all things from that to your "secsettings.apk"
go to decompiled "secsettings.apk" go "res/xml open "settings_headers.xml" with not pad ++
Find this line:
Code:
<header android:id="@id/manufacturer_settings" android:fragment="com.android.settings.WirelessSettings">
<intent android:action="com.android.settings.MANUFACTURER_APPLICATION_SETTING" />
</header>
put this after that line:
Code:
<header android:title="Custom Settings" />
<header android:icon="@drawable/biftor_rom_control" android:title="Custom Settings" android:fragment="com.android.settings.Biftor.BiftorMain" />
save and compile "secsettings.apk" after you compile that decompile it again you need change id
part 2:
Decompile your modded "Secsettings.apk" Go to res/values and open "public.xml" with not pad
try to find this:
Code:
<public type="xml" name="biftor_customsettings" id="
copy id of "biftor_customsettings"
Go to smali/com/android/settings/Biftor open "BiftorMain.smali" and try to find this:
Code:
.locals 5
const/4 v1, 0x1
const/4 v2, 0x0
invoke-super {p0, p1}, Landroid/preference/PreferenceFragment;->onCreate(Landroid/os/Bundle;)V
const v0, [COLOR="Red"]0x7f07008d[/COLOR]
invoke-virtual {p0, v0}, Lcom/android/settings/Biftor/BiftorMain;->addPreferencesFromResource(I)V
const-string v0, "23toggle_statubar"
invoke-virtual {p0, v0}, Lcom/android/settings/Biftor/BiftorMain;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v0
check-cast v0, Landroid/preference/CheckBoxPreference;
see red line
Chang that to id of "biftor_customsettings" you copied that befor
save and compile
Secsettings.apk finish
Go to post 3 for Systemui.apk
lets go start with "Systemui.apk"
part1:
decompile your "Systemui.apk"
download my Attachment file "systemui.apk.rar" extract that and copy all things from that to your "Systemui.apk" decompiled
go to res/values open "ids.xml" with not pad++
add this line to that"
Code:
<item type="id" name="exp_power_stat">false</item>
after that compile and after compile,decompile that again!
part 2:
Go to smali\com\android\systemui\statusbar\phone and open "PhoneStatusBar.smali" with Not pad++
try to find this line:
Code:
.field mPostCollapseCleanup:Ljava/lang/Runnable;
and add this line after that:
Code:
.field mPowerWidget:Lcom/Biftor/systemui/quickpanel/PowerWidget;
try to find this method:
Code:
.method protected makeStatusBarView()Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
[COLOR="Blue"] .locals 13[/COLOR]
.prologue
.line 521
change the blue line to this:
Code:
.locals 15
try to find this on ".method protected makeStatusBarView()Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;"
Code:
sget-boolean v9, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->useTouchWizGUI:Z
if-eqz v9, :cond_9
.line 532
const v9, 0x7f03003e
const/4 v10, 0x0
invoke-static {v1, v9, v10}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;
move-result-object v9
check-cast v9, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
[COLOR="Blue"] iput-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;[/COLOR]
put this after blue line:
Code:
iget-object v12, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;
invoke-virtual {v12}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v12
const-string v13, "23toggle_statubar"
const/4 v14, 0x0
invoke-static {v12, v13, v14}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v12
if-eqz v12, :cond_Biftor
const v9, 0x7f030045
const/4 v10, 0x0
invoke-static {v1, v9, v10}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;
move-result-object v9
check-cast v9, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
iput-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
:cond_Biftor
exactly same this:
you can remove "##############" this is just for hint!
Code:
sget-boolean v9, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->useTouchWizGUI:Z
if-eqz v9, :cond_9
.line 532
const v9, 0x7f03003e
const/4 v10, 0x0
invoke-static {v1, v9, v10}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;
move-result-object v9
check-cast v9, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
iput-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
##############################
iget-object v12, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;
invoke-virtual {v12}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v12
const-string v13, "23toggle_statubar"
const/4 v14, 0x0
invoke-static {v12, v13, v14}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v12
if-eqz v12, :cond_Biftor
const v9, 0x7f030045 [COLOR="Red"]#biftor23_tw_super_status_bar[/COLOR]
const/4 v10, 0x0
invoke-static {v1, v9, v10}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;
move-result-object v9
check-cast v9, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
iput-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
:cond_Biftor
#################
try to find this on ".method protected makeStatusBarView()Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;":
Code:
iget-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
const v10, 0x7f0d004c
invoke-virtual {v9, v10}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;
move-result-object v9
check-cast v9, Landroid/widget/ScrollView;
iput-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mScrollView:Landroid/widget/ScrollView;
.line 700
iget-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mScrollView:Landroid/widget/ScrollView;
const/4 v10, 0x0
[COLOR="Blue"] invoke-virtual {v9, v10}, Landroid/widget/ScrollView;->setVerticalScrollBarEnabled(Z)V
[/COLOR]
put this lines after blue line:
Code:
iget-object v12, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;
invoke-virtual {v12}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v12
const-string v13, "23toggle_statubar"
const/4 v14, 0x0
invoke-static {v12, v13, v14}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v12
if-eqz v12, :cond_arm
move-object/from16 v0, p0
iget-object v9, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
const v10, 0x7f0d011b [COLOR="Red"]#exp_power_stat[/COLOR]
invoke-virtual {v9, v10}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;
move-result-object v9
check-cast v9, Lcom/Biftor/systemui/quickpanel/PowerWidget;
move-object/from16 v0, p0
iput-object v9, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/Biftor/systemui/quickpanel/PowerWidget;
.line 702
:cond_arm
exactly same this:
Code:
iget-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
const v10, 0x7f0d004c
invoke-virtual {v9, v10}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;
move-result-object v9
check-cast v9, Landroid/widget/ScrollView;
iput-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mScrollView:Landroid/widget/ScrollView;
.line 700
iget-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mScrollView:Landroid/widget/ScrollView;
const/4 v10, 0x0
invoke-virtual {v9, v10}, Landroid/widget/ScrollView;->setVerticalScrollBarEnabled(Z)V
#################
iget-object v12, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;
invoke-virtual {v12}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v12
const-string v13, "23toggle_statubar"
const/4 v14, 0x0
invoke-static {v12, v13, v14}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v12
if-eqz v12, :cond_arm
move-object/from16 v0, p0
iget-object v9, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
const v10, 0x7f0d011b [COLOR="Red"]#exp_power_stat[/COLOR]
invoke-virtual {v9, v10}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;
move-result-object v9
check-cast v9, Lcom/Biftor/systemui/quickpanel/PowerWidget;
move-object/from16 v0, p0
iput-object v9, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/Biftor/systemui/quickpanel/PowerWidget;
.line 702
:cond_arm
#################
try to find this on ".method protected makeStatusBarView()Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;":
Code:
sget-boolean v9, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->useAttPlmnDisplay:Z
const/4 v10, 0x1
if-ne v9, v10, :cond_7
.line 857
const-string v9, "android.intent.action.SCREEN_ON"
invoke-virtual {v2, v9}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V
.line 860
:cond_7
iget-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBroadcastReceiver:Landroid/content/BroadcastReceiver;
[COLOR="Blue"] invoke-virtual {v1, v9, v2}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;[/COLOR]
put this after blue line:
Code:
iget-object v12, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;
invoke-virtual {v12}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v12
const-string v13, "23toggle_statubar"
const/4 v14, 0x0
invoke-static {v12, v13, v14}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v12
if-eqz v12, :cond_ar
move-object/from16 v0, p0
iget-object v9, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/Biftor/systemui/quickpanel/PowerWidget;
invoke-virtual {v9}, Lcom/Biftor/systemui/quickpanel/PowerWidget;->setupWidget()V
.line 863
:cond_ar
exactly same this:
Code:
sget-boolean v9, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->useAttPlmnDisplay:Z
const/4 v10, 0x1
if-ne v9, v10, :cond_7
.line 857
const-string v9, "android.intent.action.SCREEN_ON"
invoke-virtual {v2, v9}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V
.line 860
:cond_7
iget-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBroadcastReceiver:Landroid/content/BroadcastReceiver;
invoke-virtual {v1, v9, v2}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
#################
iget-object v12, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;
invoke-virtual {v12}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v12
const-string v13, "23toggle_statubar"
const/4 v14, 0x0
invoke-static {v12, v13, v14}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v12
if-eqz v12, :cond_ar
move-object/from16 v0, p0
iget-object v9, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/Biftor/systemui/quickpanel/PowerWidget;
invoke-virtual {v9}, Lcom/Biftor/systemui/quickpanel/PowerWidget;->setupWidget()V
.line 863
:cond_ar
#################
Important Note 1 Red lines:
Go to res/values open "public.xml" with Not pad++
Find new id of "exp_power_stat" and "biftor23_tw_super_status_bar"
after that replace new id to red lines.
i attached my modded "PhoneStatusBar.smali" you can use that maybe you need that!
final part:
go to decompiled SystemUI.apk open "AndroidManifest.xml"
try to find this:
Code:
<uses-permission android:name="android.permission.NFC" />
<uses-permission android:name="com.sprint.permission.SPRINT4G" />
<uses-permission android:name="android.permission.WRITE_APN_SETTINGS" />
[COLOR="Blue"] <uses-permission android:name="android.permission.CHANGE_CONFIGURATION" />
[/COLOR]
put this after blue line:
Code:
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.REBOOT" />
compile Systemui.apk and Signe that (dont forget do signe)
and put it in your device!
important Note 2:
you need do This [HOW TO][20Mar][How to Disable Signature Checker For System App[Sammy JB]
because you Changed "AndroidManifest.xml" and you singed SystemUi.apk
Dont Forget do this!
i attached my Modded Systemui.apk if you want you can use that!
Enjoy.
res3
res4
res5 maybe will need...
I'd like to know what makes this mod.
please post the screenshoot.
thanks
remuntada78 said:
I'd like to know what makes this mod.
please post the screenshoot.
thanks
Click to expand...
Click to collapse
This mod is your statusbar toggle
With this mod
You can make lidroid 23toggle statusbar
And make toggle for switch from stock toggle to lidroid 23 toggle or lidroid to stock toggle....
I haven't screen Shot from that
Goodluck
Armin.
Sent from my GT-I9100 using xda premium
offtopic but apktool is stuck in compiling secsettings.apk ,,, i increased the heap size to 1024mb and still getting stuck ,,,whats wrong ?
rrgrrg said:
offtopic but apktool is stuck in compiling secsettings.apk ,,, i increased the heap size to 1024mb and still getting stuck ,,,whats wrong ?
Click to expand...
Click to collapse
You just gotta wait. It can take aaagggeeesss
Sent from my GT-I9305 using Tapatalk 4 Beta
Goldieking said:
You just gotta wait. It can take aaagggeeesss
Sent from my GT-I9305 using Tapatalk 4 Beta
Click to expand...
Click to collapse
ok ,,thats why not every rom has this future :silly:
edit : i see that aapt.exe is taking more memory by the passage of time ,,but its a slight increase so its working yea
rrgrrg said:
offtopic but apktool is stuck in compiling secsettings.apk ,,, i increased the heap size to 1024mb and still getting stuck ,,,whats wrong ?
Click to expand...
Click to collapse
rrgrrg said:
ok ,,thats why not every rom has this future :silly:
edit : i see that aapt.exe is taking more memory by the passage of time ,,but its a slight increase so its working yea
Click to expand...
Click to collapse
Hi
I suggest use apk multi tools that's much better than apktools for noob peoples...
Goodluck
Armin.
Sent from my GT-I9100 using xda premium
Biftor said:
Hi
I suggest use apk multi tools that's much better than apktools for noob peoples...
Goodluck
Armin.
Sent from my GT-I9100 using xda premium
Click to expand...
Click to collapse
Or apk manager
Sent from my GT-I9100 using Tapatalk 2
Just a question please, I was looking for a guide almost like this one but from what I have read both stock and 23 toggle mods would look the same. My question is what would it take to have 2 different themes? eg-a full stock theme and a aosp 23 toggle theme, so I can add transparent pulldown, blue % battery ect.
Sent from my GT-I9100 using xda premium
bombaybadboy said:
Just a question please, I was looking for a guide almost like this one but from what I have read both stock and 23 toggle mods would look the same. My question is what would it take to have 2 different themes? eg-a full stock theme and a aosp 23 toggle theme, so I can add transparent pulldown, blue % battery ect.
Sent from my GT-I9100 using xda premium
Click to expand...
Click to collapse
Should ask Goldie for this mate, but he is taking a break right now.
Namoi said:
Should ask Goldie for this mate, but he is taking a break right now.
Click to expand...
Click to collapse
Im just a seeker of knowledge and see parts of this guide could be useful to me mate
Sent from my GT-I9100 using xda premium
bombaybadboy said:
Just a question please, I was looking for a guide almost like this one but from what I have read both stock and 23 toggle mods would look the same. My question is what would it take to have 2 different themes? eg-a full stock theme and a aosp 23 toggle theme, so I can add transparent pulldown, blue % battery ect.
Sent from my GT-I9100 using xda premium
Click to expand...
Click to collapse
Hi
You can do it same me!
You can change lidorid stock to aosp theme that's easy just change layout xml for lidroid in systemui.apk
Just look again you have one tw_super_statusbar.xml for 23 toggle!!!
Change layouts to aosp style!
Goodluck
Armin.
Sent from my GT-I9100 using xda premium
Biftor said:
Hi
You can do it same me!
You can change lidorid stock to aosp theme that's easy just change layout xml for lidroid in systemui.apk
Just look again you have one tw_super_statusbar.xml for 23 toggle!!!
Change layouts to aosp style!
Goodluck
Armin.
Sent from my GT-I9100 using xda premium
Click to expand...
Click to collapse
Thankyou for the reply but how do you separate 2 tw_statusbar.xml and stat_battery_charge.xml and expandable_header ect can I ask. I will have a proper look when I next get back on my pc
Sent from my GT-I9100 using xda premium
bombaybadboy said:
Thankyou for the reply but how do you separate 2 tw_statusbar.xml and stat_battery_charge.xml and expandable_header ect can I ask. I will have a proper look when I next get back on my pc
Sent from my GT-I9100 using xda premium
Click to expand...
Click to collapse
For battery you should add your new xml to batterycontroller.smali with your lidroid toggle switch string I will check that!!
After that lock in Tw_super_statusbar.xml
You can add new Tw_statusbar.xml and new new expanded.xml and in tw_statusbar_expanded.xml
You have tw_statusbar_expanded_header.xml
You can make your aosp layouts and added to new Tw_super_statusbar.xml
Tw_super_statusbar.xml is same controller
Look into the Tw_super_statusbar.xml
I can't access to my pc now!
Goodluck
Armin.
Sent from my GT-I9100 using xda premium
Biftor said:
For battery you should add your new xml to batterycontroller.smali with your lidroid toggle switch string I will check that!!
After that lock in Tw_super_statusbar.xml
You can add new Tw_statusbar.xml and new new expanded.xml and in tw_statusbar_expanded.xml
You have tw_statusbar_expanded_header.xml
You can make your aosp layouts and added to new Tw_super_statusbar.xml
Tw_super_statusbar.xml is same controller
Look into the Tw_super_statusbar.xml
I can't access to my pc now!
Goodluck
Armin.
Sent from my GT-I9100 using xda premium
Click to expand...
Click to collapse
Thankyou for your time and will give me something to look into I only have a hour or 2 pc time a day and its hard for me to hunt blind. Thanks again
Sent from my GT-I9100 using xda premium
Finally tracked this one down, and just have to share this...
This Mod was found by @EMSpilot and @Gunthermic.. emspilot found the routine, and from there we figured the rest.. Give him a big kudos..
This is a MOD for Dev's to incorperate, this is NOT an End User MOD.
I have broken this down to each part of the inversion for those that want complete control over the Full Screen KeyBoard Layout.
1. Text Color
2. Cusor Color
3. BackGround Color
4. HighLight Color
What:
Framework.jar
framework-res.apk
Decompile Framework.jar file
Add/Change
Subtract/Delete
Go to:
smali\android\inputmethodservice\InputMethodService.smali
Search for:
.method startExtractingText(Z)V
Look for this code:
1. Text Color:
Code:
iget-object v8, v2, Landroid/view/inputmethod/EditorInfo;->hintText:Ljava/lang/CharSequence;
invoke-virtual {v1, v8}, Landroid/inputmethodservice/ExtractEditText;->setHint(Ljava/lang/CharSequence;)V
Right under that is:
Code:
const/4 v8, 0x0
const/4 v9, 0x0
const/4 v10, 0x0
invoke-static {v8, v9, v10}, Landroid/graphics/Color;->rgb(III)I
move-result v8
invoke-static {v8}, Landroid/content/res/ColorStateList;->valueOf(I)Landroid/content/res/ColorStateList;
The above code controls the text coloring on the Text Box. You have two options:
You can change the v8, v9, v10 which is the RGB value (0x0) is Black in this case and change them to -0x1 for each one to make text color white.
The second option you can do if you want a special color without having to figure out RGB color coding is to add:
const v8, smali colorcode (for example -0xCC9934(DarkHorse Blue)) below move-result v8.. like so...
invoke-static {v8, v9, v10}, Landroid/graphics/Color;->rgb(III)I
Code:
move-result v8
[COLOR="Blue"]const v8, -0xCC9934[/COLOR]
invoke-static {v8}, Landroid/content/res/ColorStateList;->valueOf(I)Landroid/content/res/ColorStateList;
Okay the next three items are much easier:
Right under the code for Text Coloring is the rest of the Inversion and other Changes
Code:
invoke-virtual {v1, v8}, Landroid/inputmethodservice/ExtractEditText;->setTextColor(Landroid/content/res/ColorStateList;)V
const/high16 v8, -0x100 # Cusor Color
invoke-virtual {v1, v8}, Landroid/inputmethodservice/ExtractEditText;->setCursorColor(I)V
.line 3261
const/4 v8, -0x1 #Background Color
invoke-virtual {v1, v8}, Landroid/inputmethodservice/ExtractEditText;->setBackgroundColor(I)V
.line 3265
const v8, -0x86350e #HighLight Cusor Color
invoke-virtual {v1, v8}, Landroid/inputmethodservice/ExtractEditText;->setHighlightColor(I)V
Code Changes: An Example of my changes
Code:
invoke-virtual {v1, v8}, Landroid/inputmethodservice/ExtractEditText;->setTextColor(Landroid/content/res/ColorStateList;)V
[COLOR="Blue"]const v8, -0x100 [/COLOR]#Cusor Color(Yellow)
invoke-virtual {v1, v8}, Landroid/inputmethodservice/ExtractEditText;->setCursorColor(I)V
[COLOR="Blue"]const v8, -0x1000000 [/COLOR]#BackGround(Black)
invoke-virtual {v1, v8}, Landroid/inputmethodservice/ExtractEditText;->setBackgroundColor(I)V
[COLOR="Blue"]const v8, -0xCC9934[/COLOR] #HighLight Cusor Color.(DarkHorse Blue)
invoke-virtual {v1, v8}, Landroid/inputmethodservice/ExtractEditText;->setHighlightColor(I)V
Okay Save that. One more Item that needs to be done complete the Inversion!!!
framework/res/layout/input_method_extract_view.xml
Line 5 needs to be changed to complete the inversion(makes the black appear around the Send button)
Code:
<FrameLayout android:id="@id/inputExtractAccessories" [COLOR="Blue"]android:background="#ff000000"[/COLOR] android:layout_width="wrap_content" android:layout_height="fill_parent" android:paddingStart="8.0dip" android:paddingEnd="8.0dip">
<android.inputmethodservice.ExtractButton android:layout_gravity="center" android:id="@id/inputExtractAction" android:layout_width="wrap_content" android:layout_height="wrap_content" />
<android.inputmethodservice.ExtractButton android:layout_gravity="center" android:id="@id/inputExtractEditButton" android:visibility="invisible" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/extract_edit_menu_button" />
</FrameLayout>
Save and Compile framework.jar and framework-res.apk..
Score!!!!