[MOD] no am/pm on ics status bar for the devs - T-Mobile Samsung Galaxy S II SGH-T989

The rom devs will know what this is ....
did this for skyrocket devs but works for your ics ports as well.
made this thread over here so i can stop getting pms from this side on howtos...
info http://forum.xda-developers.com/showthread.php?t=1591030
Remove AM/PM
1. Decompile SystemUI.apk
2. Goto: /systemui.apk /smali/com/android/systemui/statusbar/policy
3. edit Clock.smali
4. the line you want is typically 36 (its the static constructor)
5. change "const/4 v0, 0x0" to "const/4 v0, 0x2"
6. yup thats right, 1 character edit!
7. save and recompile
Color for Clock (if you havnt already)
1. Decompile SystemUI.apk
2. Goto: /res/values/
3. edit styles.xml
4. the style you want is "<style name="TextAppearance.StatusBar.Clock" parent="@android:style/TextAppearance.StatusBar.Icon">"
5. change "<item name="android:textColor">#ff33b5e5</item>" under this style (this is android blue, change at will)
6. save and recompile
enjoy!!

Will be put to use. Thanks.

theHOTNESS said:
The rom devs will know what this is ....
did this for skyrocket devs but works for your ics ports as well.
made this thread over here so i can stop getting pms from this side on howtos...
info http://forum.xda-developers.com/showthread.php?t=1591030
Remove AM/PM
1. Decompile SystemUI.apk
2. Goto: /systemui.apk /smali/com/android/systemui/statusbar/policy
3. edit Clock.smali
4. the line you want is typically 36 (its the static constructor)
5. change "const/4 v0, 0x0" to "const/4 v0, 0x2"
6. yup thats right, 1 character edit!
7. save and recompile
Color for Clock (if you havnt already)
1. Decompile SystemUI.apk
2. Goto: /res/values/
3. edit styles.xml
4. the style you want is "<style name="TextAppearance.StatusBar.Clock" parent="@android:style/TextAppearance.StatusBar.Icon">"
5. change "<item name="android:textColor">#ff33b5e5</item>" under this style (this is android blue, change at will)
6. save and recompile
enjoy!!
Click to expand...
Click to collapse
Tried it on stock FD10 ICS4.0.3 build for E4GT.
Didn't work unfortunately.
I found 3 instances of const/4 v0, 0x0 and changing any of them or any combination of 2 of them didn't remove AM/PM from status bar clock.
Any ideas or suggestions?

I also am trying this mod and would like to know what are the lines before or after the mod. Just to make sure I am making the changes to the right one since I also see 3 of them... Thanks in Advance

agat63 said:
Tried it on stock FD10 ICS4.0.3 build for E4GT.
Didn't work unfortunately.
I found 3 instances of const/4 v0, 0x0 and changing any of them or any combination of 2 of them didn't remove AM/PM from status bar clock.
Any ideas or suggestions?
Click to expand...
Click to collapse
Use notepad++ and go to line 36 and change the value
Sent from my SGH-T989 using Tapatalk 2

`SBR` said:
Use notepad++ and go to line 36 and change the value
Sent from my SGH-T989 using Tapatalk 2
Click to expand...
Click to collapse
actually I do not see static constructor but public constructor and lines 34-41 show this
Code:
# direct methods
.method public constructor <init>(Landroid/content/Context;)V
.locals 1
.parameter "context"
.prologue
.line 72
const/4 v0, 0x0

`SBR` said:
Use notepad++ and go to line 36 and change the value
Sent from my SGH-T989 using Tapatalk 2
Click to expand...
Click to collapse
I'm using notepad++.
There is no instance/value on line 36 in ICS file for E4GT.
First instance is on line 39.
Did try it. No dice.
And as mentioned above did try any combination of 3 instances of that value thru the file. No go.
May be ICS for E4GT is different and we should look somewhere else.

playya said:
actually I do not see static constructor but public constructor and lines 34-41 show this
Code:
# direct methods
.method public constructor <init>(Landroid/content/Context;)V
.locals 1
.parameter "context"
.prologue
.line 72
const/4 v0, 0x0
Click to expand...
Click to collapse
agat63 said:
I'm using notepad++.
There is no instance/value on line 36 in ICS file for E4GT.
First instance is on line 39.
Did try it. No dice.
And as mentioned above did try any combination of 3 instances of that value thru the file. No go.
May be ICS for E4GT is different and we should look somewhere else.
Click to expand...
Click to collapse
Hope you're looking into the file in the below path.
SystemUI\smali\com\android\systemui\statusbar\policy\Clock.smali
and search for the below line
Code:
sput v0, Lcom/android/systemui/statusbar/policy/Clock;->AM_PM_STYLE:I
above the line
Code:
const/4 v0, 0x0
change the 0 to 2 like below, it will be like this .
Code:
const/4 v0, 0x2
Save it and decompile the systemui.apk

`SBR` said:
Hope you're looking into the file in the below path.
SystemUI\smali\com\android\systemui\statusbar\policy\Clock.smali
and search for the below line
Code:
sput v0, Lcom/android/systemui/statusbar/policy/Clock;->AM_PM_STYLE:I
above the line
Code:
const/4 v0, 0x0
change the 0 to 2 like below, it will be like this .
Code:
const/4 v0, 0x2
Save it and decompile the systemui.apk
Click to expand...
Click to collapse
yea been there and its a no go apparently my Clock.smali is dfferent

playya said:
yea been there and its a no go apparently my Clock.smali is dfferent
Click to expand...
Click to collapse
I confirm that.
There is no such line in Clock.smali in E4GT ICS SystemUI.apk smali file.
There has been a lot of changes in apk, dex and jar files from GB to ICS.

agat63 said:
I confirm that.
There is no such line in Clock.smali in E4GT ICS SystemUI.apk smali file.
There has been a lot of changes in apk, dex and jar files from GB to ICS.
Click to expand...
Click to collapse
shhhhhhoooot I am trying to do it on GB but I looked in ICS as well and did not see it. I looked in services.jar and did not see it.. Believe me I know it should be out there somewhere but other than TSM mods I can not seem to find any tutorials on how to just remove am/pm... If anyone knows how to do this on GB or ICS which may be similiar please let me know. Its for the E4GT
Thx

Related

[DEV] [MOD] [HOW-TO] Remove AM/PM on LG8 Based Sprint ROMS [MOD]

Hey everyone! In response to sudden events i am deciding to make tutorials for all my MODS for interested DEVS. Here is removing AM/PM from clock on status bar MOD.
First you're going to need to decompile the Smali in SystemUI.apk
Now edit the following code in the following smali:
/systemui.apk /smali/com/android/systemui/statusbar/policy/Clock.smali
Edit the following code:
Code:
# direct methods
.method static constructor <clinit>()V
.registers 1
[COLOR="Red"] --const/4 v0, 0x0
[/COLOR][COLOR="Green"] ++const/4 v0, 0x2[/COLOR]
sput v0, Lcom/android/systemui/statusbar/policy/Clock;->AM_PM_STYLE:I
return-void
.end method
.method public constructor <init>(Landroid/content/Context;)V
.registers 3
That's all. Recompile and the AM/PM in the status bar should have disappeared
Have Fun!
clark44 said:
Hey everyone! In response to sudden events i am deciding to make tutorials for all my MODS for interested DEVS. Here is removing AM/PM from clock on status bar MOD.
First you're going to need to decompile the Smali in SystemUI.apk
Now edit the following code in the following smali:
/systemui.apk /smali/com/android/systemui/statusbar/policy/Clock.smali
Edit the following code:
Code:
# direct methods
.method static constructor <clinit>()V
.registers 1
[COLOR="Red"] --const/4 v0, 0x0
[/COLOR][COLOR="Green"] ++const/4 v0, 0x2[/COLOR]
sput v0, Lcom/android/systemui/statusbar/policy/Clock;->AM_PM_STYLE:I
return-void
.end method
.method public constructor <init>(Landroid/content/Context;)V
.registers 3
That's all. Recompile and the AM/PM in the status bar should have disappeared
Have Fun!
Click to expand...
Click to collapse
Thanks for sharing!
Sent from my SPH-L710 using xda premium
Thanks Clark!
I will post the updated clock MODS in your ROM thread.
I am trying to make some changes in the framework-res.apk but I am having issues recompiling. All other APKs recompile fine for me except framework-res. Even if I make no changes at all it will not recompile. Decompile is fine, just wont recompile. Do I need to install different framework when working withing framework-res?
The command "apktool if framework-res.apk" should work for de/recompiling framework-res correct?
Didact74 said:
I am trying to make some changes in the framework-res.apk but I am having issues recompiling. All other APKs recompile fine for me except framework-res. Even if I make no changes at all it will not recompile. Decompile is fine, just wont recompile. Do I need to install different framework when working withing framework-res?
The command "apktool if framework-res.apk" should work for de/recompiling framework-res correct?
Click to expand...
Click to collapse
Use twframework-res.apk instead. So...
apktool if twframework-res.apk
clark44 said:
Use twframework-res.apk instead. So...
apktool if twframework-res.apk
Click to expand...
Click to collapse
Bingo! Thank you sir! :good:
---------- Post added at 11:46 PM ---------- Previous post was at 11:11 PM ----------
So framework-res had information to change the lockscreen information but twframework-res does not. Which TW APK hold the lockscreen info?
Didact74 said:
Bingo! Thank you sir! :good:
---------- Post added at 11:46 PM ---------- Previous post was at 11:11 PM ----------
So framework-res had information to change the lockscreen information but twframework-res does not. Which TW APK hold the lockscreen info?
Click to expand...
Click to collapse
Not sure. Would probably be systemui.
I'm going to bet that you are having the plurals error. Try recompiling again and read the errors, if you see the world plurals, do the following.
in res\values\plurals.xml
look for
Code:
<item quantity="other">%d of %d</item>
make it
Code:
<item quantity="other">%d of %%d</item>
res\values-en-rUS\plurals.xml
look for:
Code:
<item quantity="other">%d of %d</item>
make it
Code:
<item quantity="other">%d of %%d</item>
res\values-es\plurals.xml
look for:
Code:
<item quantity="other">%d de %d</item>
make it
Code:
<item quantity="other">%d de %%d</item>
It should compile just fine after that. I had the same errors.
Didact74 said:
I am trying to make some changes in the framework-res.apk but I am having issues recompiling. All other APKs recompile fine for me except framework-res. Even if I make no changes at all it will not recompile. Decompile is fine, just wont recompile. Do I need to install different framework when working withing framework-res?
The command "apktool if framework-res.apk" should work for de/recompiling framework-res correct?
Click to expand...
Click to collapse
Good call on the plurals Jimie, that fixed my errors but when it compiles I get a bunch of warnings but it does compile. Wheni try to push it to Framework via TWRP flash it causes a bootloop. Even when no changes are made. Were you able to successfully modify framework-res and not bootloop? Here are my warnings....
From my experience, the warnings are nothing to worry about. Are you using root explorer to set the appropriate file permissions?
Didact74 said:
Good call on the plurals Jimie, that fixed my errors but when it compiles I get a bunch of warnings but it does compile. Wheni try to push it to Framework via TWRP flash it causes a bootloop. Even when no changes are made. Were you able to successfully modify framework-res and not bootloop? Here are my warnings....
Click to expand...
Click to collapse
Tsudeily said:
From my experience, the warnings are nothing to worry about. Are you using root explorer to set the appropriate file permissions?
Click to expand...
Click to collapse
It was due to my updater script. I forgot to changethe directories/permissions within the script. It loaded fine this time but the change did not take. I am trying to manipulate the date, time, and "wipe screen to unlock" on the lockscreen but I can not find out where the XML is to do it. I thought i had found it in framework-res/res/values/strings.xml but it did not work.
Thanks for reminding me about the permissions or I probably would have never checked the updater script .
Please Donate--for even more development
All, not that I am a beggar by any means, but please donate to Clark, he needs it..trust me when I say this...Behind the scenes, he is buying equipment to continue his development. The donation go towards this. Thanks (and I too have donated)...:highfive::highfive::highfive:
Click Here > http://forum.xda-developers.com/donatetome.php?u=3885544
Happy to help. Strange about it not taking. Did you wipe your caches?
Didact74 said:
It was due to my updater script. I forgot to changethe directories/permissions within the script. It loaded fine this time but the change did not take. I am trying to manipulate the date, time, and "wipe screen to unlock" on the lockscreen but I can not find out where the XML is to do it. I thought i had found it in framework-res/res/values/strings.xml but it did not work.
Thanks for reminding me about the permissions or I probably would have never checked the updater script .
Click to expand...
Click to collapse
I was reading this link (yes, I know it is for the SGS2): http://forum.xda-developers.com/showpost.php?p=24853926&postcount=1
I was successfully able to get the "easy" part complete, the SecSettings.apk part of adding the toggles to Settings - Date and Time (see attached). They toggle correctly meaning the checkboxes work, but nothing happens as I cannot get the edits described to work with clock.smali (compiling errors with apktool). Again I know it is a guide for the SGS2, but the smali code is very close, so I think that if someone with smali experience (I have next to none) looked at it, this would be do-able.
I am using the SGS3 on US Cellular's network. It seems that I am close to getting this, but does anyone have any thoughts/suggestions?
pretty cool idea. Did you have to change the identifier to get it to compile?
When I use "0x7f0b0923" it errors out because that identifier is already being used. However, if I change it to something like 0xf0d0af2 it will compile but i can not get into settings at all once I reboot.
Didact74 said:
pretty cool idea. Did you have to change the identifier to get it to compile?
When I use "0x7f0b0923" it errors out because that identifier is already being used. However, if I change it to something like 0xf0d0af2 it will compile but i can not get into settings at all once I reboot.
Click to expand...
Click to collapse
Here's what I changed mine to, since apktool was complaining of the same thing.
<public type="string" name="disable_ampm" id="0x7f0d0b2f" />
<public type="string" name="disable_ampm_text" id="0x7f0d0b30" />
<public type="string" name="disable_time" id="0x7f0d0b31" />
<public type="string" name="disable_time_text" id="0x7f0d0b32" />
I was then able to recompile SecSettings.apk, it did give me warnings but it worked and I wasn't getting the identifier already used error. I feel like I'm really close I just need to figure out the smali part for Clock.smali and PhoneStatusBar.smali yet. Hopefully I can get help or pointed in the right direction soon.
RMarkwald said:
Here's what I changed mine to, since apktool was complaining of the same thing.
<public type="string" name="disable_ampm" id="0x7f0d0b2f" />
<public type="string" name="disable_ampm_text" id="0x7f0d0b30" />
<public type="string" name="disable_time" id="0x7f0d0b31" />
<public type="string" name="disable_time_text" id="0x7f0d0b32" />
I was then able to recompile SecSettings.apk, it did give me warnings but it worked and I wasn't getting the identifier already used error. I feel like I'm really close I just need to figure out the smali part for Clock.smali and PhoneStatusBar.smali yet. Hopefully I can get help or pointed in the right direction soon.
Click to expand...
Click to collapse
I will see if I can get it to work. Nice find.
clark44 said:
I will see if I can get it to work. Nice find.
Click to expand...
Click to collapse
It was random... Kinda. I used from what I could tell wasn't in use to the point where apktool didn't complain. Whether or not that's good/bad I'm not sure yet...
- Sent from my US Cellular SGS3
RMarkwald said:
It was random... Kinda. I used from what I could tell wasn't in use to the point where apktool didn't complain. Whether or not that's good/bad I'm not sure yet...
- Sent from my US Cellular SGS3
Click to expand...
Click to collapse
Your hex did not work for me either. I had to use 0x7f0d0af2 - 0x7f0d0af5 to get it to compile.
It seems that the first code made in the clock.smali is what is causing the recompile issues:
Code:
invoke-virtual {v3}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v2
const-string v7, "hide_time"
const/4 v0, 0x0
invoke-static {v2, v7, v0}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v7
const/4 v0, 0x0
if-eqz v7, :cond_nohide
const/16 v0, 0x8
:cond_nohide
const v1, 0x7f0e0027
invoke-virtual {p0, v1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;
move-result-object v1
invoke-virtual {v1, v0}, Landroid/view/View;->setVisibility(I)V
If I make all changes except that one I can get it to compile. However, I have random isues where settings will not open at all. I am sure Clark can make sense of it as my smali skills are subpar as well.
I figured it may be different for you. I did notice that too with the code, but then I also did notice that the other code would let it compile (2nd part of code for Clock.smali), and the PhoneStatusBar.smali stuff just FC'd SystemUI. Clark PM'd me last night, so hopefully something will come of this soon. If the smali stuff gets worked out to work with the SGS3, then the XML stuff will fall in line pretty easy, just need to find hex to work probably for each model, as I'm sure it's all a little different.

[GUIDE][GB] how to add ScreenShot EPM

hi guys. i'll tell you how to add Screenshot EPM. for screenies, check attach
first, download this file
https://www.dropbox.com/s/z0owyuwxmjm59dx/bahan.zip
note: DO BACKUP FIRST.
Stuff:
1. android.policy.jar
2. Framework-res.apk
3. Tools to decompile and compile .apk files like apk multitool or baksmali manager for .jar files . you can search it to google
4. brain
5. patient
+FIRST STEP:
1. decompile framework-res.apk
2. extract the files we have downloaded
3. put the ic_clock_screenshoot.png to the drawable-ldpi
4. open strings.xml
5. add this
Code:
<string name="screenshoot">Capture Image</string>
before line
Code:
</resources>
6. save and compile. make sure you don't get any errors when compiling
7. after all finished, decompile again the result was
8. go to public.xml
9. then see the hex code from the image and the strings that we created earlier like this
Code:
<public type="string" name="screenshoot" id="0x0[B]10404d6[/B]" />
<public type="drawable" name="ic_lock_screenshot" id="0x0[B]10804b4[/B]" />
10. the bold text is what we need for next step
+LAST STEP:
1. decompile android.policy.jar
2. put the GlobalActions$12.smali and GlobalActions$12$1.smali to the com\android\internal\policy\impl\here
3. then, open GlobalActions.smali
4. search this line
Code:
new-array v0, v0, [Lcom/android/internal/policy/impl/GlobalActions$Action;
5. above it, there is const /4 v0, 0x3, change to const /4 v0, 0x4
6. then, look at the pict
7. add this line below it
Code:
const/4 v1, 0x3
new-instance v2, Lcom/android/internal/policy/impl/GlobalActions$12;
const v3, 0x108xxxx -> ic__lock_screenshoot.png
const v4, 0x104xxxx -> screencapture string
invoke-direct {v2, p0, v3, v4}, Lcom/android/internal/policy/impl/GlobalActions$12;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
aput-object v2, v0, v1
8. see on this
9. change const/4 v1, 0x3 to const/4 v1, 0x4
10. save and compile
11. after all steps completed, flash it via CWM
NB:
-i made this guide from original based stockrom DXLF, it will different if you have EPM (data mode, reboot mode, recovery mode, download mode) first. for who have epm first and will add this features, go to HERE
-if you don't understand / get error, report here and i'll help you
Will this work with other devices?
nolinuxnoparty said:
Will this work with other devices?
Click to expand...
Click to collapse
If you focus and understand, it will probably work on other devices
Nice guide, thanks pressed.
For who have epm
this is for you who have EPM (Sound mode, Data mode, Airplane mode, Reboot mode, Recovery mode, Download mode, Power Off). little modification on smali
Tuts:
1. for editing Framework-res.apk, it same as like first post
2. decompile android.policy.jar
3. search
Code:
new-array v0, v0, [Lcom/android/internal/policy/impl/GlobalActions$Action;
4. look above it, if showing const/4 v0, 0x7 ignore it. if not, if showing anything else like const/4 v0, 0x6, change 0x6 to 0x7
5. on this step, you need to editing the download mode line (i think download mode is useless, the features like reboot/restart and doesn't lead to download mode)
6. change the bold to
Code:
const/4 v1, 0x3
new-instance v2, Lcom/android/internal/policy/impl/GlobalActions$12;
const v3, 0x108xxxx -> ic_lock_screenshoot.png
const v4, 0x104xxxx -> screenshoot string
invoke-direct {v2, p0, v3, v4}, Lcom/android/internal/policy/impl/GlobalActions$12;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
aput-object v2, v0, v1
7. save and compile. make sure you don't get errors
8. flash it via cwm
CharsiBabu said:
Nice guide, thanks pressed.
Click to expand...
Click to collapse
thankyou
Will try it now
Reserved.
jpdesuasido said:
Will try it now
Reserved.
Click to expand...
Click to collapse
good luck bro
ocoot said:
good luck bro
Click to expand...
Click to collapse
Thanks :angel: (2 times pressed )
up
doesnt understand
i have an epm but your smali and my smali differrent?
Just 1 word required to define this Guide. AWESOME
Sent from my GT-S6102 using Xparent BlueTapatalk 2
NgamTeroxx said:
i have an epm but your smali and my smali differrent?
Click to expand...
Click to collapse
i think you need a little bit more experience to learning smali bro
samsoul16 said:
Just 1 word required to define this Guide. AWESOME
Sent from my GT-S6102 using Xparent BlueTapatalk 2
Click to expand...
Click to collapse
thanks sirrrrr
I can not find it or anything like it, you can help me put it in another location not
Code:
new-array v0, v0, [Lcom/android/internal/policy/impl/GlobalActions$Action;
zangge34 said:
I can not find it or anything like it, you can help me put it in another location not
Code:
new-array v0, v0, [Lcom/android/internal/policy/impl/GlobalActions$Action;
Click to expand...
Click to collapse
you can see on the screenies sir. may on other phone/rom it's little bit different http://forum.xda-developers.com/showpost.php?p=43256383&postcount=2
I want you to help me review my file GlobalActions.smali.
If you help me I will be very happy and thank you.
mediafire.com/download/3wzk47a10w93cv9/GlobalActions.smali[/url]
thanks for the info
Good Job Broo
Great Guide .
I have successfully done step 1 but not able to do step 2 .
Can you help me ?? plz

[MOD][GUIDE]Enable and change color of %battery digits in 4.4 KitKat

So as you probably know by now, Android 4.4 came with a hidden feature in SystemUI to enable %battery within the battery icon when it's not charging. This can be accomplished by an app (credit to @kroegerama), an adb command, or a manual SystemUI smali edit (a quite easy one explained in this walkthrough). The problem is this text is the same color as the battery fill (white), making it useless until the battery is about 50% or less. I played around with the smali for a while and couldn't properly get the text to change colors (smali is certainly not my native tongue...), so I did it the old fashioned way. I changed it in source, built, and compared the results. With that, I'll show you how you can change the text color of the digits when %battery is enabled.
This tutorial will assume you have know how to use APKTool to decompile/recompile APKs while keeping their signatures in tact. There are walkthroughs that will show you how to accomplish this readily available. Method 1 will show you an easy way to change the color to black, and method 2 will show you how you can change things so you can set the text color to whatever you want, without having to figure out the java hex -> smali const equation (though if someone knows it I'm always loving to learn new things). This tutorial is for users on a DEODEXED ROM. If your ROM is odexed, it's probably easiest to deodex SystemUI, make the changes, then reodex ALWAYS HAVE A BACKUP READILY AVAILABLE IN CASE SOMETHING GOES WRONG!
Things you'll need:
APKTool
Notepad++
SystemUI.apk from your 4.4 ROM
Method 1 - an easy way to make the digits black.
{
"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"
}
1. Using APKTool, decompile SystemUI.apk
2. Open \smali\com\android\systemui\BatteryMeterView.smali in Notepad++
3. If you don't already have the white %battery enabled, enable it now. Find:
Code:
const-string v7, "status_bar_show_battery_percent"
const/4 v8, 0x0
and change 0x0 to 0x1
4. Now find:
Code:
iget-object v6, p0, Lcom/android/systemui/BatteryMeterView;->mTextPaint:Landroid/graphics/Paint;
const/4 v7, -0x1
and change "const/4 v7, -0x1" to "const/high16 v7, -0x100" (this is changing white (-0x1) to black (-0x100))
(Note: if you get an error regarding this line when recompiling, try "const/16 v7, -0x100" (without the "high". I know, where's the fun in that?))
4b. - Optional: If you'd like to change the font family, or make it bold, etc, you can do it here as well.
Search for:
Code:
const-string v6, "sans-serif-condensed"
const/4 v7, 0x0
"sans-serif-condensed" can be changed to "sans-serif" (or other families), and the result is slightly larger digits. The 0x0 is indicating it's normal style. Change this to 0x1 for Bold.
5. Save the changes and recompile the APK making sure to retain the original signature. Push back to /system/priv-app/ and set with RW/R/R permissions. Voila, now you have black text for your %battery
Method 2 - a few extra steps and a little more involved smali change, but will make it much easier to change the color to whatever you want once it's complete:
1. Using APKTool, decompile SystemUI.apk
2. Open \res\values\colors.xml
3. Under
Code:
<color name="batterymeter_bolt_color">#b2000000</color>
make a new line that reads
Code:
<color name="batterymeter_percent_color">#xxxxxxxx</color>
(where xxxxxxxx is an 8 digit hex color value - first 2 alpha, last 6 color):
4. Recompile the apk with the changes, preserving the signature
5. Decompile the new SystemUI that was just created
6. Open \res\values\public.xml and find:
Code:
<public type="color" name="batterymeter_percent_color" id="0x########" />
and write down/copy/take note of the 10 digit id number (0x########)
7. Open \smali\com\android\systemui\BatteryMeterView.smali in Notepad++
8. If you don't already have the white %battery enabled, enable it now. Find:
Code:
const-string v7, "status_bar_show_battery_percent"
const/4 v8, 0x0
and change 0x0 to 0x1
9. Now find:
Code:
iget-object v6, p0, Lcom/android/systemui/BatteryMeterView;->mTextPaint:Landroid/graphics/Paint;
const/4 v7, -0x1
invoke-virtual {v6, v7}, Landroid/graphics/Paint;->setColor(I)V
and replace it with the following, changing the id (0x########) with the one you previously made a note of:
Code:
iget-object v6, p0, Lcom/android/systemui/BatteryMeterView;->mTextPaint:Landroid/graphics/Paint;
const v7, 0x########
invoke-virtual {v5, v7}, Landroid/content/res/Resources;->getColor(I)I
move-result v7
invoke-virtual {v6, v7}, Landroid/graphics/Paint;->setColor(I)V
9b - Optional: If you'd like to change the font family, or make it bold, etc, you can do it here as well.
Directly under the code you just pasted, you'll see
Code:
const-string v6, "sans-serif-condensed"
const/4 v7, 0x0
"sans-serif-condensed" can be changed to "sans-serif" (or other families), and the result is slightly larger digits. The 0x0 is indicating it's normal style. Change this to 0x1 for Bold.
10. Save the changes and recompile the APK making sure to retain the original signature. Push back to /system/priv-app/ and set with RW/R/R permissions
Now if you want to change the color, just change the HEX value in \res\values\colors.xml and recompile
Building from source?
Method 1 when building from source:
-Open \frameworks\base\packages\SystemUI\src\com\android\systemui\BatteryMeterView.java.
-On line 191 you can turn the %battery on and off
-On line 208 you can set the %color.
Method 2 from source:
-Open \frameworks\base\packages\SystemUI\src\com\android\systemui\BatteryMeterView.java.
-On line 191 you can turn the %battery on and off, and on line 208 change (0xFF000000) to (res.getColor(R.color.batterymeter_percent_color)).
-Now open \frameworks\base\packages\SystemUI\res\values\colors.xml and add a line under "#B2000000" that reads "#XXXXXXXX" (where XXXXXXXX is your hex color value).
Happy Modding! :good:
homeslice976 said:
So as you probably know by now, Android 4.4 came with a hidden feature in SystemUI to enable %battery within the battery icon when it's not charging...
Happy Modding! :good:
Click to expand...
Click to collapse
Great guide :good:
As I'm running 4.4 odexed, I don't have access to the smali when decompiling SystemUI.apk so I went in a different direction and changed the colour of the battery icon (and a lot of other stuff too).
Spannaa said:
Great guide :good:
As I'm running 4.4 odexed, I don't have access to the smali when decompiling SystemUI.apk so I went in a different direction and changed the colour of the battery icon (and a lot of other stuff too).
Click to expand...
Click to collapse
Ah that's a good point. Odexed roms are going to be a little different, as you'll be working with Systemui.odex rather than Systemui.apk. I'll add that to the guide..
homeslice976 said:
So as you probably know by now, Android 4.4 came with a hidden feature in SystemUI to enable %battery within the battery icon when it's not charging. This can be accomplished by an app (credit to @kroegerama), an adb command, or a manual SystemUI smali edit (a quite easy one explained in this walkthrough). The problem is this text is the same color as the battery fill (white), making it useless until the battery is about 50% or less. I played around with the smali for a while and couldn't properly get the text to change colors (smali is certainly not my native tongue...), so I did it the old fashioned way. I changed it in source, built, and compared the results. With that, I'll show you how you can change the text color of the digits when %battery is enabled.
This tutorial will assume you have know how to use APKTool to decompile/recompile APKs while keeping their signatures in tact. There are walkthroughs that will show you how to accomplish this readily available. Method 1 will show you an easy way to change the color to black, and method 2 will show you how you can change things so you can set the text color to whatever you want, without having to figure out the java hex -> smali const equation (though if someone knows it I'm always loving to learn new things). This tutorial is for users on a DEODEXED ROM. If your ROM is odexed, it's the same idea, but you'll need to be working with SystemUI.odex and SystemUIapk, and decompliling/recompiling/pushing the odex file. Or deodex SystemUI before starting. ALWAYS HAVE A BACKUP READILY AVAILABLE IN CASE SOMETHING GOES WRONG!
Things you'll need:
APKTool
Notepad++
SystemUI.apk from your 4.4 ROM
Method 1 - an easy way to make the digits black.
1. Using APKTool, decompile SystemUI.apk
2. Open \smali\com\android\systemui\BatteryMeterView.smali in Notepad++
3. If you don't already have the white %battery enabled, enable it now. Find:
Code:
const-string v7, "status_bar_show_battery_percent"
const/4 v8, 0x0
and change 0x0 to 0x1
4. Now find:
Code:
iget-object v6, p0, Lcom/android/systemui/BatteryMeterView;->mTextPaint:Landroid/graphics/Paint;
const/4 v7, -0x1
and change "const/4 v7, -0x1" to "const/high16 v7, -0x100"
5. Save the changes and recompile the APK making sure to retain the original signature. Push back to /system/priv-app/ and set with RW/R/R permissions. Voila, now you have black text for your %battery
Method 2 - a few extra steps and a little more involved smali change, but will make it much easier to change the color to whatever you want once it's complete:
1. Using APKTool, decompile SystemUI.apk
2. Open \res\values\colors.xml
3. Under "#B2000000", make a new line that reads (where xxxxxxxx is an 8 digit hex color value - first 2 alpha, last 6 color):
Code:
#xxxxxxxx
4. Recompile the apk with the changes, preserving the signature
5. Decompile the new SystemUI that was just created
6. Open \res\values\public.xml and find:
Code:
and write down/copy/take note of the 10 digit id number
7. Open \smali\com\android\systemui\BatteryMeterView.smali in Notepad++
8. If you don't already have the white %battery enabled, enable it now. Find:
Code:
const-string v7, "status_bar_show_battery_percent"
const/4 v8, 0x0
and change 0x0 to 0x1
9. Now find:
Code:
iget-object v6, p0, Lcom/android/systemui/BatteryMeterView;->mTextPaint:Landroid/graphics/Paint;
const/4 v7, -0x1
invoke-virtual {v6, v7}, Landroid/graphics/Paint;->setColor(I)V
and replace it with the following, changing the id (0x########) with the one you previously made a note of:
Code:
iget-object v6, p0, Lcom/android/systemui/BatteryMeterView;->mTextPaint:Landroid/graphics/Paint;
const v7, 0x########
invoke-virtual {v5, v7}, Landroid/content/res/Resources;->getColor(I)I
move-result v7
invoke-virtual {v6, v7}, Landroid/graphics/Paint;->setColor(I)V
10. Save the changes and recompile the APK making sure to retain the original signature. Push back to /system/priv-app/ and set with RW/R/R permissions
Now if you want to change the color, just change the HEX value in \res\values\colors.xml and recompile
Building from source?
Method 1 when building from source:
-Open \frameworks\base\packages\SystemUI\src\com\android\systemui\BatteryMeterView.java.
-On line 191 you can turn the %battery on and off
-On line 208 you can set the %color.
Method 2 from source:
-Open \frameworks\base\packages\SystemUI\src\com\android\systemui\BatteryMeterView.java.
-On line 191 you can turn the %battery on and off, and on line 208 change (0xFF000000) to (res.getColor(R.color.batterymeter_percent_color)).
-Now open \frameworks\base\packages\SystemUI\res\values\colors.xml and add a line under "#B2000000" that reads "#XXXXXXXX" (where XXXXXXXX is your hex color value).
Happy Modding! :good:
Click to expand...
Click to collapse
This is a great tutorial for changing battery text color. In particular, I like your method 2. I can change color with success.
Sorry on offtopic.. Is there any solution to disable double press home button on cm11? Because home button has delay when I press it.. It is some kind of laggy ..
Sent from my One using Tapatalk
I wanna thank you.... Worked like a charm on Nexus 7 2013
Sent from my Nexus 7 using XDA Premium 4 mobile app
vrda08 said:
Sorry on offtopic.. Is there any solution to disable double press home button on cm11? Because home button has delay when I press it.. It is some kind of laggy ..
Sent from my One using Tapatalk
Click to expand...
Click to collapse
Yes. See this ( http://forum.xda-developers.com/showthread.php?p=47660002) post. You'll want to set double tap to 0 for no action
mrjaydee82 said:
I wanna thank you.... Worked like a charm on Nexus 7 2013
Sent from my Nexus 7 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
Glad its working!
Sent from my One using Tapatalk 4
homeslice976 said:
Yes. See this ( http://forum.xda-developers.com/showthread.php?p=47660002) post. You'll want to set double tap to 0 for no action
Glad its working!
Sent from my One using Tapatalk 4
Click to expand...
Click to collapse
Anyway to make the writing bigger or bolder Lol?
Sent from my Nexus 7 using XDA Premium 4 mobile app
mrjaydee82 said:
Anyway to make the writing bigger or bolder Lol?
Sent from my Nexus 7 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
Sure is. That was my next venture. Should be simple enough though and when I've got it bI'll add to the walkthrough
Sent from my One using Tapatalk 4
homeslice976 said:
Sure is. That was my next venture. Should be simple enough though and when I've got it bI'll add to the walkthrough
Sent from my One using Tapatalk 4
Click to expand...
Click to collapse
Awesome ? can't wait
Sent from my Nexus 7 using XDA Premium 4 mobile app
@homeslice976 I try method 1 & 2 but not sucsess, would you mind to share your SystemUI.apk in method 1? Thanks
Device: Nexus 4
Rom: Stock KRT16S
Also interested on put this baby on my nexus 5 but to stupid to do it myself,any help will be much aprecieted.
mrjaydee82 said:
Anyway to make the writing bigger or bolder Lol?
Sent from my Nexus 7 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
Added notes in method 2 for making the digits slightly larger and/or bold..will keep playing to see if I can make them even larger
PigFire said:
@homeslice976 I try method 1 & 2 but not sucsess, would you mind to share your SystemUI.apk in method 1? Thanks
Device: Nexus 4
Rom: Stock KRT16S
Click to expand...
Click to collapse
Cruzfire said:
Also interested on put this baby on my nexus 5 but to stupid to do it myself,any help will be much aprecieted.
Click to expand...
Click to collapse
If you guys can upload your SystemUI I can probably do it for you
homeslice976 said:
If you guys can upload your SystemUI I can probably do it for you
Click to expand...
Click to collapse
Attached, thanks
PigFire said:
Attached, thanks
Click to expand...
Click to collapse
Here ya go. No reason anything should break, but for peace of mind please make a backup first. This is flashable in recovery. It will be black text, but I used method 2, so if you want to change the font color, all you need to do is decompile, open \res\values\colors.xml, change the hex value of <color name="batterymeter_percent_color">#ff000000</color>, and recompile.
i'm also having errors on compiling it..il just upload OMNI systemui instead.. TIA
View attachment SystemUI.apk
homeslice976 said:
Added notes in method 2 for making the digits slightly larger and/or bold..will keep playing to see if I can make them even larger
If you guys can upload your SystemUI I can probably do it for you
Click to expand...
Click to collapse
Thanks man try it later after work
Sent from my HTC One using XDA Premium 4 mobile app
---------- Post added at 09:23 PM ---------- Previous post was at 09:06 PM ----------
I can't compile the 2nd method and want the bold... https://docs.google.com/file/d/0B6ptKjzTSh3SUHJYZWNkeXhMTHM/edit?usp=docslist_api here's my systemui.apk if you could do it...I'd be very greatful..thank you for your awesome work..this is for a nexus 7.2
Sent from my HTC One using XDA Premium 4 mobile app
jefbuan said:
i'm also having errors on compiling it..il just upload OMNI systemui instead.. TIA
View attachment 2406866
Click to expand...
Click to collapse
Here ya go. No reason anything should break, but for peace of mind please make a backup first. This is flashable in recovery. It will be black text, but I used method 2, so if you want to change the font color, all you need to do is decompile, open \res\values\colors.xml, change the hex value of <color name="batterymeter_percent_color">#ff000000</color>, and recompile.
mrjaydee82 said:
Thanks man try it later after work
Sent from my HTC One using XDA Premium 4 mobile app
---------- Post added at 09:23 PM ---------- Previous post was at 09:06 PM ----------
I can't compile the 2nd method and want the bold... https://docs.google.com/file/d/0B6ptKjzTSh3SUHJYZWNkeXhMTHM/edit?usp=docslist_api here's my systemui.apk if you could do it...I'd be very greatful..thank you for your awesome work..this is for a nexus 7.2
Sent from my HTC One using XDA Premium 4 mobile app
Click to expand...
Click to collapse
Here ya go. No reason anything should break, but for peace of mind please make a backup first. This is flashable in recovery. It will be black text, but I used method 2, so if you want to change the font color, all you need to do is decompile, open \res\values\colors.xml, change the hex value of <color name="batterymeter_percent_color">#ff000000</color>, and recompile. I also changed the font from sans-serif-condensed to sans-serif, bold
homeslice976 said:
Here ya go. No reason anything should break, but for peace of mind please make a backup first. This is flashable in recovery. It will be black text, but I used method 2, so if you want to change the font color, all you need to do is decompile, open \res\values\colors.xml, change the hex value of <color name="batterymeter_percent_color">#ff000000</color>, and recompile. I also changed the font from sans-serif-condensed to sans-serif, bold
Click to expand...
Click to collapse
Awesome...ty so much
Sent from my HTC One using XDA Premium 4 mobile app

[MOD][GUIDE]Porting PlatLogo Activity from S5 resources

Hi to all! In this guide I explain how to port the kitkat platlogo activity from S5 resource to S2.
Requirements:
- use apktool, backsmali and smali tool;
- notepad++;
- framework-res.apk;
- framework.jar and framework2.jar;
- patience and brain.
1)First decompile framework-res.apk with apktool and download attach file.
Extract the drawable-nodpi folder from the archive and insert and replace the platlogo.png in the res/drawable-nodpi folder of the framework-res.
Recompile and sign the framework-res.
For sign the framework insert in the build/apk folder the original meta-inf folder and AndroidManifest.xml from the original framework-res.apk.
2)Then, decompile framework.jar with backsmali tool (1.bat)
Extract the smali folder from the archive and insert the file in com/android/internal/app.
After insert the file, open the PlatlogoActivity and search this:
Code:
const v0, [COLOR="Red"]0x10805b8[/COLOR]
Open the public.xml from res/values folder of the framework-res and search:
Code:
type="drawable" name="platlogo"
Now replace the red line with the public id of platlogo image.
At the end recompile the framework.jar with smali tool (2.bat)
3)Decompile framework2.jar with backsmali tool (1.bat)
Go to android/widget/ and open FrameLayout$LayoutParams.smali
Insert this method at the end of the file.
Code:
.method public constructor <init>(Landroid/widget/FrameLayout$LayoutParams;)V
.locals 1
.parameter "source"
.prologue
.line 667
invoke-direct {p0, p1}, Landroid/view/ViewGroup$MarginLayoutParams;-><init>(Landroid/view/ViewGroup$MarginLayoutParams;)V
.line 609
const/4 v0, -0x1
iput v0, p0, Landroid/widget/FrameLayout$LayoutParams;->gravity:I
.line 669
iget v0, p1, Landroid/widget/FrameLayout$LayoutParams;->gravity:I
iput v0, p0, Landroid/widget/FrameLayout$LayoutParams;->gravity:I
.line 670
return-void
.end method
Now recompile with smali tool (2.bat).
Insert the framework-res.apk, framework.jar and framework2.jar in the installer that I attached. Insert in system/framework folder.
That is all
Thanks for this guide and for all the other.
Awesome Guide.
THANKS AND RATED 5*
Thanks for this guide
@gerryS2,
Hey mate, thanks to your guide I finally got what I wanted. But could you please tell me how to replace replace the "J" with a "K".. thanks in advance
Sami Kabir said:
@gerryS2,
Hey mate, thanks to your guide I finally got what I wanted. But could you please tell me how to replace replace the "J" with a "K".. thanks in advance
Click to expand...
Click to collapse
maybe this thread can help you
http://forum.xda-developers.com/showthread.php?t=2580249
thanks
Troubadour666 said:
maybe this thread can help you
http://forum.xda-developers.com/showthread.php?t=2580249
thanks
Click to expand...
Click to collapse
Thanks mate, but I am already aware of that thread. I would have continued with that thread but instead I went with this one because it didn't require any additional app to be installed
I will go through the smali codes once more to find this "J" and replace it with a "K"...
Sami Kabir said:
Thanks mate, but I am already aware of that thread. I would have continued with that thread but instead I went with this one because it didn't require any additional app to be installed
I will go through the smali codes once more to find this "J" and replace it with a "K"...
Click to expand...
Click to collapse
post 2 of the thread :
const-string v0, "K"
Troubadour666 said:
post 2 of the thread :
const-string v0, "K"
Click to expand...
Click to collapse
My PlatLogoActivity.smali doesn't contain any const-string v0, "K".. the closest thing I found is const-string v1, "Android "
in AICP rom, all things are in framework2.jar .
gerryS2 said:
Hi to all! In this guide I explain how to port the kitkat platlogo activity from S5 resource to S2.
Requirements:
- use apktool, backsmali and smali tool;
- notepad++;
- framework-res.apk;
- framework.jar and framework2.jar;
- patience and brain.
1)First decompile framework-res.apk with apktool and download attach file.
Extract the drawable-nodpi folder from the archive and insert and replace the platlogo.png in the res/drawable-nodpi folder of the framework-res.
Recompile and sign the framework-res.
For sign the framework insert in the build/apk folder the original meta-inf folder and AndroidManifest.xml from the original framework-res.apk.
2)Then, decompile framework.jar with backsmali tool (1.bat)
Extract the smali folder from the archive and insert the file in com/android/internal/app.
After insert the file, open the PlatlogoActivity and search this:
Code:
const v0, [COLOR="Red"]0x10805b8[/COLOR]
Open the public.xml from res/values folder of the framework-res and search:
Code:
type="drawable" name="platlogo"
Now replace the red line with the public id of platlogo image.
At the end recompile the framework.jar with smali tool (2.bat)
3)Decompile framework2.jar with backsmali tool (1.bat)
Go to android/widget/ and open FrameLayout$LayoutParams.smali
Insert this method at the end of the file.
Code:
.method public constructor <init>(Landroid/widget/FrameLayout$LayoutParams;)V
.locals 1
.parameter "source"
.prologue
.line 667
invoke-direct {p0, p1}, Landroid/view/ViewGroup$MarginLayoutParams;-><init>(Landroid/view/ViewGroup$MarginLayoutParams;)V
.line 609
const/4 v0, -0x1
iput v0, p0, Landroid/widget/FrameLayout$LayoutParams;->gravity:I
.line 669
iget v0, p1, Landroid/widget/FrameLayout$LayoutParams;->gravity:I
iput v0, p0, Landroid/widget/FrameLayout$LayoutParams;->gravity:I
.line 670
return-void
.end method
Now recompile with smali tool (2.bat).
Insert the framework-res.apk, framework.jar and framework2.jar in the installer that I attached. Insert in system/framework folder.
That is all
Click to expand...
Click to collapse
will it work on galaxy s advance with stock 4.1.2
psycho_boy52 said:
will it work on galaxy s advance with stock 4.1.2
Click to expand...
Click to collapse
Yes it will. I did it
gerryS2 said:
Hi to all! In this guide I explain how to port the kitkat platlogo activity from S5 resource to S2.
Requirements:
- use apktool, backsmali and smali tool;
- notepad++;
- framework-res.apk;
- framework.jar and framework2.jar;
- patience and brain.
1)First decompile framework-res.apk with apktool and download attach file.
Extract the drawable-nodpi folder from the archive and insert and replace the platlogo.png in the res/drawable-nodpi folder of the framework-res.
Recompile and sign the framework-res.
For sign the framework insert in the build/apk folder the original meta-inf folder and AndroidManifest.xml from the original framework-res.apk.
2)Then, decompile framework.jar with backsmali tool (1.bat)
Extract the smali folder from the archive and insert the file in com/android/internal/app.
After insert the file, open the PlatlogoActivity and search this:
Code:
const v0, [COLOR="Red"]0x10805b8[/COLOR]
Open the public.xml from res/values folder of the framework-res and search:
Code:
type="drawable" name="platlogo"
Now replace the red line with the public id of platlogo image.
At the end recompile the framework.jar with smali tool (2.bat)
3)Decompile framework2.jar with backsmali tool (1.bat)
Go to android/widget/ and open FrameLayout$LayoutParams.smali
Insert this method at the end of the file.
Code:
.method public constructor <init>(Landroid/widget/FrameLayout$LayoutParams;)V
.locals 1
.parameter "source"
.prologue
.line 667
invoke-direct {p0, p1}, Landroid/view/ViewGroup$MarginLayoutParams;-><init>(Landroid/view/ViewGroup$MarginLayoutParams;)V
.line 609
const/4 v0, -0x1
iput v0, p0, Landroid/widget/FrameLayout$LayoutParams;->gravity:I
.line 669
iget v0, p1, Landroid/widget/FrameLayout$LayoutParams;->gravity:I
iput v0, p0, Landroid/widget/FrameLayout$LayoutParams;->gravity:I
.line 670
return-void
.end method
Now recompile with smali tool (2.bat).
Insert the framework-res.apk, framework.jar and framework2.jar in the installer that I attached. Insert in system/framework folder.
That is all
Click to expand...
Click to collapse
Sami Kabir said:
Yes it will. I did it
Click to expand...
Click to collapse
bro can u plz upload those framework.jar n freamework2.jar cz those baksmali n smali tool r not workin on my pc....
psycho_boy52 said:
bro can u plz upload those framework.jar n framework2.jar cz those baksmali n smali tool r not workin on my pc....
Click to expand...
Click to collapse
Okay. But it might contain some other mods because they are from my ROM.. The zip is not flashable, extract it and place the files to their respective location.
Link: https://www.mediafire.com/?q5e9jnfvuapu73j
PS: I have a feeling that this might not work for you, if it doesn't then please tell me asap
Sami Kabir said:
Okay. But it might contain some other mods because they are from my ROM.. The zip is not flashable, extract it and place the files to their respective location.
Link: https://www.mediafire.com/?q5e9jnfvuapu73j
PS: I have a feeling that this might not work for you, if it doesn't then please tell me asap
Click to expand...
Click to collapse
thnx bro lets try!!!... btw dont u use stock jb on ur i9070???
psycho_boy52 said:
thnx bro lets try!!!... btw dont u use stock jb on ur i9070???
Click to expand...
Click to collapse
I use my ROM. Which is based on stock firmware
Sami Kabir said:
Okay. But it might contain some other mods because they are from my ROM.. The zip is not flashable, extract it and place the files to their respective location.
Link: https://www.mediafire.com/?q5e9jnfvuapu73j
PS: I have a feeling that this might not work for you, if it doesn't then please tell me asap
Click to expand...
Click to collapse
wow!!!.... its working bt cnt we write jb instade of j
psycho_boy52 said:
wow!!!.... its working bt cnt we write jb instade of j
Click to expand...
Click to collapse
You should ask that to the creator of this thread, not me (because even I don't know how to change this letter to some other letter)
Sami Kabir said:
You should ask that to the creator of this thread, not me (because even I don't know how to change this letter to some other letter)
Click to expand...
Click to collapse
anyways !!! thnx a lot bro for helping me
bt buddy dere is a problm wid dis mod... its not cumming lyk d 2nd scrnsht.... how to fix it

[Guide][TUT][MM] Dynamic StatusBar (lib based) [DSB] Official [All Devices MM]

Hello guys
After a long time here is a new Guide
Thanks to @kingdj and dedy (my friends)
a ParaS.H.I.T team
We worked for months spent sleepless nights on this mod
This mod got extinct on 4.4 seems lol
Now we successfully done till MM
This works for all variety of devices (samsung/sony/ all devices running MM )
Sony theme works so no worries
Check the Video on how it look like
Requirements:-
1. Make sure you had SuperUserMod
2. SystemUI.apk (deodexed)
3. Settings.apk (deodexed)
4. TickleMyAndroid by @Ticklefish or Advanced APK Tool
Start:- (also included with 3 Dot Menu)
1. Download this View attachment SystemUI.apk.zip
2. Decompile SystemUI.apk
3. Merge the complete files to your SystemUI.apk (no worries)
4. Open systemui.apk/res/values/colors.xml
add these
Code:
<color name="status_bar_background_opaque">@color/system_bar_background_opaque</color>
<color name="status_bar_background_semi_transparent">@color/system_bar_background_semi_transparent</color>
<color name="status_bar_background_transparent">@color/system_bar_background_transparent</color>
<color name="navigation_bar_background_opaque">@color/system_bar_background_opaque</color>
<color name="navigation_bar_background_semi_transparent">@color/system_bar_background_semi_transparent</color>
<color name="navigation_bar_background_transparent">@color/system_bar_background_transparent</color>
<color name="keyguard_default_primary_text_color">#ffffffff</color>
<color name="keyguard_default_secondary_text_color">#b3ffffff</color>
<color name="keyguard_default_icon_color">#ffffffff</color>
5. Compile and decompile
6. Compare Public ids and replace or Use this Amazing tool Public ID Converter by @loserskater as this tool replaces IDS
The Remain part continued in next post
SystemUI part 2
Continuation
1. Open SystemUI.apk/smali/com/android/systemui/statusbar/phone/PhoneStatusBar.smali
look for this code
Code:
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/android/systemui/statusbar/phone/PhoneStatusBar$DozeServiceHost;,
After this line
Code:
Lcom/android/systemui/statusbar/phone/PhoneStatusBar$DozeServiceHost;,
Add this Annotation
Code:
Lcom/android/systemui/statusbar/phone/PhoneStatusBar$100000023;,
Find this
Code:
# static fields
Below that add this
Code:
.field public static mExpandedVisible:Z
Find this line and Delete
Code:
.field mExpandedVisible:Z
Find this
Code:
# instance fields
Below add these lines
Code:
.field private mOverrideIconColor:I
.field private mPreviousOverrideIconColor:I
1.2. Now Find this method
Code:
.method public constructor <init>()V
find this line (v3 may vary)
Code:
iput v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNaturalBarHeight:I
Below add these lines
Code:
iput v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPreviousOverrideIconColor:I
iput v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mOverrideIconColor:I
1.3 Find this method
Code:
.method private addNavigationBar()V
Before that method add these methods
Code:
.method static synthetic access$L1000016(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)I
.locals 1
iget v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPreviousOverrideIconColor:I
return v0
.end method
.method static synthetic access$L1000017(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)I
.locals 1
iget v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mOverrideIconColor:I
return v0
.end method
.method static synthetic access$S1000016(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;I)V
.locals 0
iput p1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPreviousOverrideIconColor:I
return-void
.end method
.method static synthetic access$S1000017(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;I)V
.locals 0
iput p1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mOverrideIconColor:I
return-void
.end method
1.4 now you need to change Instance to Static
Using Notepad++ find this mExpandedVisible:Z
so you get similar lines like this
Code:
[COLOR="red"]i[/COLOR]get-boolean v0, [COLOR="Blue"]p0,[/COLOR] Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->[COLOR="red"]mExpandedVisible:Z[/COLOR]
In the above line do changes
Replace iget-boolean to sget-boolean and delete blue p0,
and it look like this after Edit
Code:
[COLOR="Red"]s[/COLOR]get-boolean v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;-[COLOR="red"]>mExpandedVisible:Z[/COLOR]
So like this you need to change them (Around 8 need to be changed )
Comparing files are available below
1.5 Find this method
Code:
.method protected makeStatusBarView()Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
at the end of that method find this line
Code:
invoke-static {v4, v5}, Landroid/view/ThreadedRenderer;->overrideProperty(Ljava/lang/String;Ljava/lang/String;)V
After that line add these lines
Code:
const/4 v2, 0x1
new-array v2, v2, [Lcom/android/systemui/statusbar/phone/BarBackgroundUpdater$UpdateListener;
const/4 v3, 0x0
new-instance v4, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$100000023;
move-object/from16 v0, p0
move-object/from16 v1, p0
invoke-direct {v4, v0, v1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$100000023;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;Ljava/lang/Object;)V
aput-object v4, v2, v3
invoke-static {v2}, Lcom/android/systemui/statusbar/phone/BarBackgroundUpdater;->addListener([Lcom/android/systemui/statusbar/phone/BarBackgroundUpdater$UpdateListener;)V
Now find this method
Code:
.method public setSystemUiVisibility(II)V
in that find this lines
Code:
move-object/from16 v0, p0
iget-object v5, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mIconController:Lcom/android/systemui/statusbar/phone/StatusBarIconController;
above move-object/from16 v0, p0
Add this line
Code:
sget-boolean v5, Lcom/android/systemui/statusbar/phone/BarBackgroundUpdater;->mStatusEnabled:Z
save and close PhoneStatusBar.smali
2. Search for this mExpandedVisible:Z in child files of PhoneStatusBar$xx.smali
in Sony i found in PhoneStatusBar$11.smali
so same
from
Code:
[COLOR="Red"]i[/COLOR]get-boolean v0, [COLOR="Blue"]v0,[/COLOR] Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->[COLOR="red"]mExpandedVisible:Z[/COLOR]
to
Code:
[COLOR="red"]s[/COLOR]get-boolean v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->[COLOR="red"]mExpandedVisible:Z[/COLOR]
3. Now open SystemUI.apk/smali/com/android/systemui/statusbar/phone/StatusBarIconController.smali
find this line
Code:
.field private final mHandler:Landroid/os/Handler;
Replace that line to this
Code:
.field public final mHandler:Landroid/os/Handler;
Now save and Close all
Complie and replace
For compare Download this files View attachment dsb_compare_statusbar.zip
Now you need to place the Lib to you SystemUI.apk
Merge this lib to system/priv-app ( use any root explorer )
For 64 bit devices :- View attachment 64bit_lib_systemui_dsb.zip
For ARM / 32 bit devices :- View attachment arm_32bit_lib_systemui_dsb.zip
For x86_x64 devices :- View attachment 3940776
After Placing lib replace systemUI.apk and reboot tada
Video soon available
For settings Look for next post
settings.apk final part and Video
Settings Final part:-
1. Decompile Settings.apk
2. Download this View attachment settings.apk.zip
3. Extract and Merge it
4. Open Settings.apk/res/values/strings.xml
add these lines
Code:
<string name="dynamic_system_bars_category_title">Dynamic system bars</string>
<string name="dynamic_status_bar_title">Dynamic status bar</string>
<string name="dynamic_status_bar_summary">Automatically update the background of the status bar</string>
<string name="dynamic_navigation_bar_title">Dynamic navigation bar</string>
<string name="dynamic_navigation_bar_summary">Automatically update the background of the navigation bar</string>
<string name="dynamic_system_bars_gradient_title">System bar gradient</string>
<string name="dynamic_system_bars_gradient_summary">Overlay a gradient on the system bars</string>
<string name="dynamic_status_bar_filter_title">Darker status bar</string>
<string name="dynamic_status_bar_filter_summary">Overlay a darkening filter on the status bar</string>
5. Add this any where to your settings (display_settings.xml or your wish)
Code:
<PreferenceScreen android:icon="@drawable/kryp_dsb" android:id="@+id/dsb" android:title="Dinamic Engine" android:summary="Amaze Your view of Status and Navigation Bar" android:fragment="com.android.settings.kryp.Dsb" />
6. As this mod also contain 3 Dot mod to add settings Follow this post
7. Compile and Decomopile the Settings.apk
Compare ids (provided my public.xml) and replace the Ids
Recompile and replace
reboot and test
This is Part of My Rom Kryptonian
Dont Forget to mention me if you use My work
That feels me Happy
does this framework running just like as flat style colored bar module on xposed?
Intriguing. I'll have to keep an eye on this thread..
SystemUI.apk.zip not failed extrack?
ryandxter said:
does this framework running just like as flat style colored bar module on xposed?
Click to expand...
Click to collapse
Check video below bro
Ticklefish said:
Intriguing. I'll have to keep an eye on this thread..
Click to expand...
Click to collapse
Sure i can seen your Blink eye
vandiaz_sairavinz said:
SystemUI.apk.zip not failed extrack?
Click to expand...
Click to collapse
download again and try bro
Here is the Video On how the mod works
@venkat kamesh as always , your done best
DSB to lolipop bro...
Do you Have tutorial....
Nice, great work Sir VK
and thanks you.
excuse me,,could you please help me,.. im in step 1,after this one :
3. Merge the complete files to your SystemUI.apk (no worries)
4. Open systemui.apk/res/values/colors.xml
add these
5. Compile and decompile
6. Compare Public ids and replace or Use this Amazing tool Public ID Converter by @loserskater as this tool replaces IDS
I have read the tool,and we need Source smail file for compare IDs,,but could you please tell me which smail file in this file 1. Download this SystemUI.apk.zip is Source smail
Nice nice
Does this require UB? also, can I install on X system UI on a z3c? The framework res is from z3c
panzerox123 said:
Does this require UB? also, can I install on X system UI on a z3c? The framework res is from z3c
Click to expand...
Click to collapse
You don't need UB and it will work on that framework and systemUI
DavidMKD said:
You don't need UB and it will work on that framework and systemUI
Click to expand...
Click to collapse
Thanks!
Will it work if I used zervices.Jar SuperUserMod by Rajeev?
panzerox123 said:
Thanks!
Will it work if I used zervices.Jar SuperUserMod by Rajeev?
Click to expand...
Click to collapse
It should, just backup in case
DavidMKD said:
It should, just backup in case
Click to expand...
Click to collapse
Ok. Thanks!
And will it work with Xperia X SystemUI on z3c?
panzerox123 said:
Ok. Thanks!
And will it work with Xperia X SystemUI on z3c?
Click to expand...
Click to collapse
It should work on any SystemUI as long it is MM and it has those lines
DavidMKD said:
It should work on any SystemUI as long it is MM and it has those lines
Click to expand...
Click to collapse
Ok thanks!
Question: HOW DO I REPLACE PUBLIC IDS!! omg im hyperventilating..... sorry/// But how do I replace public ids?

Categories

Resources