yashsingh1/xdaforums huggingface dataset:
[Android Themes] haplox:
What I have in xml is the 2nd trick posted in page 2. Respect to the guide, I have some doubts:

- What is posted in the line to changue in the status_bar is totally different to what is posted in the example: in the line to change there is not any id@battery, which appear in the example. Which is the correct one?

- What must I do with the line "id@circle_battery? I think it must be in the xml to support the circle battery

Thanks Ticklefish
[Android Themes] haplox:
I got it

finally I got it. I changed my ROM from 4.4.4 to 4.4.2 (I do not know if this is the reason, I will check 4.4.4 again).

The only way is using the trick in page 2 with a little change (I think that specific for my ROM).

Instead of using it as is, I have not changed all the line "BatteryMeterView", I only have added android:visibility="gone" to my original line, leaving the rest of it as in the original. This is my change in Status_bar.xml

If I use the guide I always get FCs. If I change all my @id/battery line with the one in the guide, I get FC. I think that it is becouse in the guide does not exist any @id/battery declared

If I use the example in page 1, I get FC too. In this case there is @id/battery declared, but I think that the Erhany must act as a child of the main process BatteryMeterView, not substituting it

Maybe I am wrong :eek: . I am a bit newbey in this but in that way it has worked for me. You can see it in the imaged attached
[Android Themes] haplox:
Well, I am going on trying it wit Carbon ROM kitkat 4.4.4 without result, I always get FCs. After a lot of trial and fail I have seen that in this ROM there are 2 files practically the same:

- status_bar.xml

-msim_status_bar.xml

these are the kines in them:

I have tried to change only one of the files, changing both files in the same way, etc... always FCs :eek:

Some idea, please... thanks
[Android Themes] Kamy:
Great to see somebody could have sorted this and opened this thread, xbattery themer is thirsty for such guild. Thumbs up...
[Android Themes] salbahengbf:
<public type="drawable" name="stat_sys_battery" id="0xYOURCODE1" />
<public type="drawable" name="stat_sys_battery_charge" id="0xYOURCODE2" />

!! You will do it manually so find your last drawable hex code and continue to it.. Then save & close..

how to manually find the last drawable hex code?
[Android Themes] oldman20:
yeah, that's my trouble too, and this:

i dont know whats mean of "change const v3, 0X.. with your public codes you created"? can you explain to me? thank you!
[Android Themes] haplox:
Hello,

To find the last HEX code may be a bit hard, but you have to do it by hand, searching and trying... There is a way you can try:

- look around the last HEX code in public.html around the section where are the "<public type="drawable" name="stat_sys_xxx"

- It will be something like 0x7f020xxx

- replace the "xxx" for your stat_sys_battery with a high hex number, for example "200". You wil have a HEX number like 0x7f020200

- Try to recompile the apk

- it will give you an error like:

the numbers in red will depend on the HEX code you put

Well, if you are using Notepad++, you can use the "Plugins-->converter-->conversion panel". In the conversinon panel use this:

- in "Decimal" box, try 512 and in the "Hexadecimal" box you will see the last 3 numbers of the HEX code you tried (this is only a test to check you go by the right way)

- Now, in "Decimal" box put 492 and in "Hexadecimal" box you will see the last 3 numbers (or letters, remember you are in hex) availables in public.htm

- In my case (in this example) when I put 492 I get in hex box "1EC". Well, I tried for "stats_sys_battery" something around that hex code, for example 0x7f020

1ea

. Normaly that will be enough, but you can go on trying again this methot untill you arrive the right hex code.

Now with Notepad++ open "KitKatBattery$1.smali". Scroll down and you will see this into the code (of the original file)

Now change "0xstat_sys_battery_charge!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" for the code you introduced for "stat_sys_battery_charge" in public.html (in the example above 0x7f0201ea). It will stay in this way in the code:

Scrool down a bit more to the next code in " .line 36" and make the same for the code of stats_sys_batery

I hope this help you :)
[Android Themes] oldman20:
Thanks you so much, very clearly! But in my case, I can't see file public.xml in folder systemUI decomplied! So I cant continue

And this guide :" copy erhany/ folder into decompiled .dex /com/ folder.. (long path: /com/erhany/KitKatBattery.smali & KitKatBattery$1.smali)"

So what's exactly folder decomplied.dex?
[Android Themes] haplox:
public.xml mus be in (It always is!!!):

"\Working directory" (your own)-->\SystemUI.apk (decompiled apk)-->\res-->\values-->public.xml

Folder \erhany must be copied in:

"\Working directory" (your own)-->\SystemUI.apk (decompiled apk)-->\smali-->\com-->here inside, together with other folder that may exist

Remenber that if you are going to use apktool 1.5, you must use erhany1 in the original zip file. If you are going to use apktool 2.x, use erhany2

:good:
[Android Themes] oldman20:
Sorry, but i dont understand mean of word "last HEX code". is this like below attachment file, right?
[Android Themes] haplox:
Yes, just under that line paste the lines for stats_sys_battery and stats_sys_charge_battery and make the trick for the hex code you have to insert
[Android Themes] oldman20:
many thanks, but can you help me?

"look around the last HEX code in public.html around the section where are the "<public type="drawable" name="stat_sys_xxx"

- It will be something like 0x7f020xxx

- replace the "xxx" for your stat_sys_battery with a high hex number, for example "200". You wil have a HEX number like 0x7f020200"

in my case, xxx is 191 right?

and what mean of "high hex number"?
[Android Themes] haplox:
Insert these 2 lines just under the line you have marked:

<public type="drawable" name="stat_sys_battery" id="0x7f020250"/>

<public type="drawable" name="stat_sys_battery_charge" id="0x7f020251"/>

and when you have made all the changes in the other archives, try to recompile to see the error I posted before. If you see it very difficult. maybe I can try it for you. I will need:

- Your mobile model

- Wich ROM are your using

- Your SystemUI.apk and framework-res.apk

- Where is located your SystemUI in your mobile (\system\app or \system\priv-app
[Android Themes] oldman20:
If that, i want to show deep gratitude with you! I still trying to follow guide to know why i cant complete this tip. Thanks you one more again. Sr my english bad, hope you can understand a little :o

My phone is Vega R3 - IM8850K (Sky Pantech-Inland from Korea, maybe very strange with you)

Im using Carbon rom 4.4.4, SystemUI inside system/app

My SystemUI

My framework-res.apk

one question for curious, why is 0x7f020250 and 0x7f020250? It's random?
[Android Themes] oldman20:
Hi, final i can compiling app, but can see change of batterry icon, cause after install SystemUI modified, no forclose, but my navibar and status bar is hidden

i think maybe that cause different of this code

This my code in status_bar.xml

if different with your code in example

but when i add systemui:batteryView="statusbar" into above code, recompile and trafer to my phone, still same error :(
[Android Themes] haplox:
Have you read the whole thread? I have tried CARBON with this trick a lot without result :( . I have wrote a PM to the developer, but he has not answered yet... I do not know wich is the problem with CARBON, but it is very frustating. I have tried, as you, changing different things, always with the same result.

I go on trying it on CARBON, but till now with very bad result :silly:
[Android Themes] oldman20:
yep, but when done nothing to change, also invisible status bar and navibar. i dont know why
[Android Themes] Ngocbach:
i am tried to do this but i can't because i don't understand much. english is difficult :D . I hope you help me. I upload my systemui and framwork in my samsung m110s rom remix. Thank you veryyy much !
[Android Themes] haplox:
If you use a Samsung, there is another file you must upload. Search for something like "tw-framework-res.apk". Be patient... it is christmas time :laugh:
[Android Themes] Ngocbach:
Thank you very much. This is my fil*e :laugh:
[Android Themes] oldman20:
[MENTION=5991959]haplox[/MENTION]: are you still here?
[Android Themes] haplox:
I am... I said it is christmas time :cowboy: :D Sorry for any inconvenence. I will try to make the changes for Ngocbach tomorrow
[Android Themes] oldman20:
and me, too?
[Android Themes] haplox:
Of course... :good: have you uploaded your files in this post? Now I am very busy with an old mobile from my father (Galaxy 5570i) trying to find the best in spanish, so... be a bit patient :fingers-crossed:
[Android Themes] oldman20:
of course, i uploaded it few day ago, but you not respon ;)
[Android Themes] haplox:
You uploaded 2 times the same file (framework). I need SystemUI too. As I said you, I am on Carbon too, an for me it has been impossible to make the trick (have you read my posts?) I always got the same than you.
[Android Themes] haplox:
Hello ngocbach- Here is your SystemUI.

https://www.dropbox.com/s/zutzltxxb9fkyse/SystemUI_or.apk?dl=0

https://www.dropbox.com/s/odi33cv94hk7maw/SystemUI_mod.apk?dl=0

You have to copy the

mod

one into your system/app or system/priv-app (you must use a root explorer like ES file Explorer). rename the file to SystemUI.apk and change the premissions to rw-r-r

If you get FC make the same with the

or

one to come back to the original. As I have not your ROM I can not make any test, so please put your feed back
[Android Themes] whychand:
THANK YOU VERY MUCH, BRO!?

Finally, i can change that boring battery image on cm12 (yes, Lollipop). Huge thanks for your hardwork!?
[Android Themes] whychand:
Thread that dedicated tou your work was created. Thanks, Bruh!? :D

http://xdaforums.com/android/themes/how-to-change-status-bar-icons-lollipop-t2997611/
[Android Themes] fastell:
Hello,

If that, i want to show deep gratitude with you! I still trying to follow guide to know why i cant complete this tip. Thanks you one more again. Sr my english bad, hope you can understand a little

My phone Huawei Honor 3C

My ROM KitKat 4.4.2 AOSP

View attachment Framework.zip

View attachment SystemUI.zip
[Android Themes] fastell:
Where is located your SystemUI in your mobile \system\priv-app
[Android Themes] Tech N You:
Awesome guide trying it now. I have a question in .line 3 and 36 there is this const v3, 0xstat_sys_battery_charge!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!11 and 0xstat_sys_battery !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! respectively.

Do I have to add the public.xml code replacing the whole stat_sys_battery_charge!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1 term with my public.xml code or just remove these exclamations and add public.xml code

Eg 0xstat_sys_battery_charge7xc0123 like this or 0x7xc0123 or like this?

PS Ignore the code it's just an exxample. Please help.
[Android Themes] Erhany:
It will be like e.g. 0x7f101111
[Android Themes] haplox:
you mus replace the hole line, included the exclamations, so:

const v3, 0xstat_sys_battery_charge!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!

Will be:

const v3, 0x71234567

being 0x71234567 your code in public.xml
[Android Themes] Tech N You:
Hi thanx for the quick response!

I am stuck at overlapped public.xml code thing. Please forgive me if I am talking too much noobish :(

What I thought by hex codes in public.xml you meant to find last line which contains word drawable

This line has last drawable term <public type="drawable" name="top_divider_glow" id="0x7f0201b6" />

So I added your codes like this

<public type="drawable" name="stat_sys_battery" id="0x7f0201b7" />

<public type="drawable" name="stat_sys_battery_charge" id="0x7f0201b8" />

but I am getting error as there is already another xml id defined under this.

Error is multiple names under blablabla found line 436

Can you please give a quick walkthrough for this public.xml thing would be great help!
[Android Themes] Tech N You:
[MENTION=4485836]Erhany[/MENTION] Haha LOL I lost my battery icon after trying your MOD :P

I'm using MTK 6592 running my own made Xperia ROM base is AOSP 4.4.2 Any help please

EDIT - WORKED! AWESOME1 Corrected error in smali and it worked! :D Thanx :D
[Android Themes] haplox:
You have the answer in page 4 and 5 of this post
[Android Themes] Tech N You:
[MENTION=5991959]haplox[/MENTION] Thanx I got my answer :)
[Android Themes] Erhany:
Its nice to hear it worked.. Please share a picture with your new battery icons ;)
[Android Themes] Tech N You:
Sure thing! :D

Xperia battery mod. 1% battery mod :D All credits to you :laugh::good::cowboy::cool:
[Android Themes] Tech N You:
You sir are awesome! :good:
[Android Themes] Ticklefish:
This mod is awesome. More people should know about it!

---------------------------------

Sent from Tapatalk

------------------------------
[Android Themes] Tech N You:
I agree! Remember little back when I said TMA couldn't change battery icons in my ROM and you said that KK can't change battery icons :silly:

Hehe well I succeeded XD But sir this line where it says it can give gravity box support too it didn't work out for me :( battery icon changed but can't get the gb working :rolleyes::confused:
[Android Themes] dondiordnadon:
Thanks! Working in MT6572 KK roms! :D
[Android Themes] Ticklefish:
Hmm...I don't know how gravity box works, sadly. It's possible it tries to change files with different filenames. Which isn't a problem, if that's the case, as it's fairly easy to change the filenames in this mod.
[Android Themes] Tech N You:
Well reason for it's not working is actually because my device is using a themed ROM and GB works rom nearly to AOSP mine is like MIUI or EMUI it's called HIVE new UI from my manufacturer so this is the reason.
[Android Themes] DoctorQMM:
[MENTION=4485836]Erhany[/MENTION]: thanks for taking the time to make this guide and [MENTION=4315551]Ticklefish[/MENTION]: thanks for your post#69 "how-to". Replying to report success on my SG Note2 running TW 4.4.2 (UCUCNJ1 ATT firmware w/AGNi 4.3.1r2 kernel). Both guides were spot on! I opted to use my own 1% animated battery mod files and it worked without a hitch. Attaching my 2 (1%) battery XMLs: "stat_sys_battery.xml" (which calls 101 images) and "stat_sys_battery_charge.xml" (which calls 102 images including "full"). The animated charge xml alternates between charge image (for 1500 milliseconds) and actual charge value (for 500 milliseconds). Also attaching battery screenshots and the battery images I created (large numeral inset, with color-coded battery frame (0-10%, red-frame, white background, red numbers; 11-24% is red frame, 25-49% is yellow frame, 50-74% is green frame, and 75-100% is blue frame). All: feel free to use or even modify to your individual preferences. Again, thanks for these guides... it worked to perfection!
[Android Themes] padhu1989:
Is this guide works on lollipop stock ROM? Or is there any guide to change the battery icon in lollipop roms?
[Android Themes] qromwel:
am using a themed stock based lollipop rom on my android 2.3.6.can i apply this mod?
[Android Themes] rahulm492:
* Copy stat_sys_battery.xml and stat_sys_battery_charge.xml files from downloaded pack and paste into your decompiled SystemUI/drawable folder.

i can't understand it please can u explain it to me?
[Android Themes] idid idamrep:
nice guide :good:

thanks to [MENTION=4485836]Erhany[/MENTION] n [MENTION=4315551]Ticklefish[/MENTION]
[Android Themes] Ticklefish:
Thanks! :good:

Are you still having trouble with this?
[Android Themes] rahulm492:
no i didn't understand this line

copy erhany/ folder into decompiled .dex /com/ folder.. (long path: /com/erhany/KitKatBattery.smali & KitKatBattery$1.smali)

and open KitKatBattery$1.smali file.

find .line 33 and .line 36 and change const v3, 0X.. with your public codes you created! Then save it.

is it working on stock lollipop 5.1?? plz help me i want to change battery icon of my lollipop 5.1
[Android Themes] Ticklefish:
Try using my guide here: http://xdaforums.com/showpost.php?p=58955234&postcount=69

It might work on 5.1...it might not. Try it and see! :good:
[Android Themes] andifa suryanto:
aw aw aw i got FC on my device [MENTION=4315551]Ticklefish[/MENTION] or [MENTION=4485836]Erhany[/MENTION] can help me for this? i was attach my systemUI here

I use a tickle my android with version apktool 2.0.0-357f978-SNAPSHOT

and I use KitkatBattery_Erhany_apktool2.

what happens I have followed the tutorial correctly?

btw, my device is lenovo a328 with 4.4.2 OS :confused:
[Android Themes] Ticklefish:
I won't be able to tell much from just your APK on its own. If you've used Tickle My Android, please share your history.txt.

That'll give me a better idea of what's happened.
[Android Themes] andifa suryanto:
this code history.txt for my tickle my work on _workarea1.

I wanted to try out how that is done by [MENTION=5122093]WhiteNeo[/MENTION]

but I can not find phonestatusbar.xml
[Android Themes] Ticklefish:
You've got an issue with the references you've used for stat_sys_battery.xml and stat_sys_battery_charge.xml...

C:\Android\apktool\jejemod\res\values\public.xml:3016: error: Public resource dr
awable/stat_sys_battery has conflicting type codes for its public identifiers (0
x2 vs 0x45).

C:\Android\apktool\jejemod\res\values\public.xml:3017: error: Public resource dr
awable/stat_sys_battery_charge has conflicting type codes for its public identif
iers (0x2 vs 0x45).
[Android Themes] OjelaMorp:
How to fix it sir?

I just added stas_sys_battery and charge and created both of their values.. and there aren't any values like that in public.xml so I thought it would work. :confused:

UPDATE!*

I fixed the public.xml error thingy...

But there's a new problem , some resources aren't found, I didn't do anything to styles.xml but it says here that:

Any help regarding this? :D
[Android Themes] Ticklefish:
What framework files did you install before you decompiled your APK?
[Android Themes] saeed114:
Lollipop version ?
[Android Themes] Ticklefish:
Tried it?
[Android Themes] BackToMyFuture:
can you share your status_bar.xml ?
[Android Themes] OjelaMorp:
Just extract this sir. :)
[Android Themes] MT27i:
deleted
[Android Themes] DualDark:
Very Thanks :D Works Perfect in LOLLIPOP (System_ICONS instead of Status_bar)
[Android Themes] Erhany:
Thats good news to hear.. Can u post a screenshot ? :)
[Android Themes] DualDark:
Sure.
[Android Themes] Erhany:
heyy thank you but i meant screenshot of mobile ;) for seeing battery
[Android Themes] Tahax09:
hey bro , if i do what like you did on CM 12 ? will work ?
[Android Themes] gvmiguez:
First of all, thanks for these amazing guide. I have the guide runnig perfectly on Samsung Lollipop rom, but the only one problem is that i cant get a battery 100 animation on charge. I modify the stat_sys_battery_charge.xml a lot of times, but it only show the first png of the charging animation om every charge step
[Android Themes] Yayan.F:
Can I use this method for my device galaxy core2 SM-G355H?
[Android Themes] error01671:
I need your help, I'm on CM12.1

My pubilc.xml opens like this:

<public type="drawable" name="stat_sys_battery_0" id="0x7f0203aa" />
<public type="drawable" name="stat_sys_battery_10" id="0x7f0203ab" />
<public type="drawable" name="stat_sys_battery_100" id="0x7f0203ac" />
<public type="drawable" name="stat_sys_battery_20" id="0x7f0203ad" />
<public type="drawable" name="stat_sys_battery_30" id="0x7f0203ae" />
<public type="drawable" name="stat_sys_battery_40" id="0x7f0203af" />
<public type="drawable" name="stat_sys_battery_50" id="0x7f0203b0" />
<public type="drawable" name="stat_sys_battery_60" id="0x7f0203b1" />
<public type="drawable" name="stat_sys_battery_70" id="0x7f0203b2" />
<public type="drawable" name="stat_sys_battery_80" id="0x7f0203b3" />
<public type="drawable" name="stat_sys_battery_90" id="0x7f0203b4" />
<public type="drawable" name="stat_sys_battery_charge_anim0" id="0x7f0203b6" />
<public type="drawable" name="stat_sys_battery_charge_anim1" id="0x7f0203b7" />
<public type="drawable" name="stat_sys_battery_charge_anim10" id="0x7f0203b8" />
<public type="drawable" name="stat_sys_battery_charge_anim2" id="0x7f0203b9" />
<public type="drawable" name="stat_sys_battery_charge_anim3" id="0x7f0203ba" />
<public type="drawable" name="stat_sys_battery_charge_anim4" id="0x7f0203bb" />
<public type="drawable" name="stat_sys_battery_charge_anim5" id="0x7f0203bc" />
<public type="drawable" name="stat_sys_battery_charge_anim6" id="0x7f0203bd" />
<public type="drawable" name="stat_sys_battery_charge_anim7" id="0x7f0203be" />
<public type="drawable" name="stat_sys_battery_charge_anim8" id="0x7f0203bf" />
<public type="drawable" name="stat_sys_battery_charge_anim9" id="0x7f0203c0" />

How do I find the exactly right drawable hex code to smali file? I recompiled and decompile with both the OP's attach and my own battery icons, their public.xml were act the same.
[Android Themes] Ticklefish:
A "drawable" file is, according to Android, either an image file or a type of XML file.

The lines you mentioned above are all for images. What you need is the line for the XML. Have a search for:

name="stat_sys_battery"

..and...

name="stat_sys_battery_charge_anim"
[Android Themes] error01671:
OK, I got it, but new problem again, I can't find the line in status_bar.xml.
[Android Themes] Ticklefish:
It might not be in your status_bar.xml if you're on a custom ROM like cyanogenmod. You'll need to find the XML file that contains the battery icon.
[Android Themes] Yayan.F:
This method not work for my samsung core 2 stock rom kitkat.

Any suggestion?
[Android Themes] faelzinhow:
Cool!
[Android Themes] copperge:
I'm not sure if this thread is still active but I'm struggling to get this working.

I'm using a bit of an obscure phone, an Ecoo Aurora E04 Plus running stock 4.4.4, which is an MTK6752 device.

In the SystemUI.apk I have three different xmls refering to the status bar which all contain the lines that need to be modified, these being "gemini_status_bar.xml", "status_bar.xml" and "status_bar_koobi.xml".

I've followed all the steps listed to the book, when modifying either "status_bar.xml" or "status_bar_koobi.xml" recompiles fine but theres no change to the icon on my phone.

When I modify the "gemini_status_bar.xml" (which I have a feeling is the crucial one) upon pushing to my phone I just get force closes.

If anyones still around do you have any ideas for this model? I've been attempting to work this out for about a month now!

Any help would be amazing, thanks!
[Android Themes] Ticklefish:
It'll be the Gemini file. That's what you'll find on a Mediatek device.

Can you share your original and modded gemini_status_bar.xml please?
[Android Themes] Kordius:
Any idea how add battery bar to CM11 ?