[MOD] Battery percentage MOD Tool for Android 4.3

Search This thread

rfkd

Senior Member
Hi mate, just flashed the BM_Circle_Percentage zip but noticed that the circle disappears at 71% (reverts to stock battery indicator). Could you please shed some light on this for a fix?

Hrm, on my devices I just noticed that only 100% is shown with the stock icon, at 99% it switches to "Full_Circle" (in my case). But 71% seems strange, as you can see on the screenshot I was testing the "Circle_Percent" zip at 78%. Can you open the zip file and check that there are 204 images in \vrtheme\system\app\SystemUI.apk\res\drawable-xhdpi\ - you might also extract the file and verify the content of those images.

Is anybody else having the 100% "bug"? I also built the battery mod for my Nexus 10 and there it also works except for 100%.

Edit: brainmaster, you're always talking about 214 images but there are only 204 images in Battery_Mod_Tool_for_Android_4.2.1.zip\Image Resources\*\ ?!
 
Last edited:

sidhaarthm

Senior Member
Mar 1, 2009
444
144
London, U.K.
Hrm, on my devices I just noticed that only 100% is shown with the stock icon, at 99% it switches to "Full_Circle" (in my case). But 71% seems strange, as you can see on the screenshot I was testing the "Circle_Percent" zip at 78%. Can you open the zip file and check that there are 204 images in \vrtheme\system\app\SystemUI.apk\res\drawable-xhdpi\ - you might also extract the file and verify the content of those images.

Is anybody else having the 100% "bug"? I also built the battery mod for my Nexus 10 and there it also works except for 100%.

Edit: brainmaster, you're always talking about 214 images but there are only 204 images in Battery_Mod_Tool_for_Android_4.2.1.zip\Image Resources\*\ ?!

Yep, just checked and I have 204 images at that location. Quick verification reveals I've got an image for all the percentages (1-100). I also saw the circle revert to stock at 57% last night. Confused as to why this is happening?


You will need to put back the stock file before you try and update, otherwise the update will fail.


Sent from my Nexus 4 using Tapatalk 2

Thanks, understood. It seems now I will have to find a stock battery indicator for JOP40D as I don't want to restore the entire nandroid when the next OTA is available. Any idea where I can find this? Also, do you know if a custom Kernel (Franco's in this case) will cause any issues with flashing an OTA?

Thanks to you both.
 

rfkd

Senior Member
I also saw the circle revert to stock at 57% last night. Confused as to why this is happening?

There seems to be a bug indeed. While configuring my Nexus 4 today I recognized the stock battery icon at 100%, 57%, 43%, 28% and 15% so far. There might be other percentages which I have missed. If we're the only ones with the problem the zip may be broken (not sure why though).
 
Last edited:

efrant

Retired Senior Moderator & Developers Relations
Feb 12, 2009
11,469
10,985
Montreal
Samsung Galaxy S20
Thanks, understood. It seems now I will have to find a stock battery indicator for JOP40D as I don't want to restore the entire nandroid when the next OTA is available. Any idea where I can find this?
Did someone not already post it in this thread? If not, you could always just extract the files from the factory image.

Also, do you know if a custom Kernel (Franco's in this case) will cause any issues with flashing an OTA?
Yes it will.


Sent from my Nexus 4 using Tapatalk 2
 
  • Like
Reactions: sidhaarthm

rfkd

Senior Member
Did someone not already post it in this thread?

jak3z uploaded the stock SystemUI.apk here (at least I hope it is the stock apk ;)). Anybody willing to upload the stock framework-res.apk, too?

If not, you could always just extract the files from the factory image.
Is the mako factory image for 4.2.1 available somewhere? Couldn't find it on the images site. I'd need the 4.2.1 factory image for the Nexus 10 (manta), too.
 

ygvuhb

Senior Member
Jul 13, 2010
454
38
may be the more easy way is using 7zip direct oepn framework-res.apk (framework-res.apk\res\drawable-xhdpi\) & SystemUI.apk (SystemUI.apk\res\drawable-xhdpi\) to replace the battery icon

may be have to edit

stat_sys_battery_charge.xml & stat_sys_battery.xml (SystemUI.apk\res\drawable\)

in \framework-res.apk\res\drawable-xhdpi\

i can find
stat_sys_battery_0.png
stat_sys_battery_15.png
stat_sys_battery_28.png
stat_sys_battery_43.png
stat_sys_battery_57.png
stat_sys_battery_71.png
stat_sys_battery_85.png
stat_sys_battery_100.png
stat_sys_battery_charge_anim0.png
stat_sys_battery_charge_anim15.png
stat_sys_battery_charge_anim28.png
stat_sys_battery_charge_anim43.png
stat_sys_battery_charge_anim57.png
stat_sys_battery_charge_anim71.png
stat_sys_battery_charge_anim85.png
stat_sys_battery_charge_anim100.png
stat_sys_battery_unknown.png

but it have not stat_sys_battery_charge_animfull.png

SystemUI.apk\res\drawable-xhdpi\

i can find

stat_sys_battery_0.png
stat_sys_battery_15.png
stat_sys_battery_28.png
stat_sys_battery_43.png
stat_sys_battery_57.png
stat_sys_battery_71.png
stat_sys_battery_85.png
stat_sys_battery_100.png
stat_sys_battery_charge_anim0.png
stat_sys_battery_charge_anim15.png
stat_sys_battery_charge_anim28.png
stat_sys_battery_charge_anim43.png
stat_sys_battery_charge_anim57.png
stat_sys_battery_charge_anim71.png
stat_sys_battery_charge_anim85.png
stat_sys_battery_charge_anim100.png

but it have not
stat_sys_battery_charge_animfull.png
stat_sys_battery_unknown.png

where is the stat_sys_battery_charge_animfull.png icon location?

and i find some battery icon name in SystemUI.apk\res\drawable-xhdpi\

ic_qs_battery_0.png
ic_qs_battery_15.png
ic_qs_battery_28.png
ic_qs_battery_43.png
ic_qs_battery_57.png
ic_qs_battery_71.png
ic_qs_battery_85.png
ic_qs_battery_100.png
ic_qs_battery_bang_orange.png
ic_qs_battery_bang_red.png
ic_qs_battery_bang_white.png
ic_qs_battery_bolt.png
ic_qs_battery_charge_0.png
ic_qs_battery_charge_15.png
ic_qs_battery_charge_28.png
ic_qs_battery_charge_43.png
ic_qs_battery_charge_57.png
ic_qs_battery_charge_71.png
ic_qs_battery_charge_85.png
ic_qs_battery_charge_100.png
ic_qs_battery_unknown.png
 
Last edited:

ygvuhb

Senior Member
Jul 13, 2010
454
38
trying how to put the battery icon in the apk

copy \system\app\ copy "SystemUI.apk" and \system\framework\ copy "framework-res.apk"

download apktool
http://xdaforums.com/showthread.php?t=1755243

how to use apktool
http://xdaforums.com/showthread.php?t=1891686

use apktool decompiling SystemUI.apk
edit stat_sys_battery.xml & stat_sys_battery_charge.xml in SystemUI.apk\res\drawable

and place the new battery icon in SystemUI.apk\res\drawable-xhdpi

after try this
I discover OP's tool to will fail in place some battery icon because the name are already exist in the apk, so the new battery cannot replace them
 
Last edited:

oyching88

Member
Oct 22, 2011
33
4
hi, does this work with galaxy s2?
sorry just asking, was on a custom rom but the percentage is not shown. 4.2.1
 

floepie

Senior Member
Feb 28, 2006
1,990
455
Amsterdam
Would anyone know why the resultant systemui.apk is about 20% smaller in size? If anything, I would have expected it to be larger.
 

sidhaarthm

Senior Member
Mar 1, 2009
444
144
London, U.K.
Help!

Hi guys,

My request does not come strictly off topic, but it is surely related.

I flashed a Nexus 7 Battery Mod on my Nexus 4 by mistake... Yes, I know I'm an idiot.

But now my Nexus 4 is buggered and I have lost all my Navigation buttons and Notification bar. The screen has expanded to cover this area, affecting the resolution of widgets and the number of icon rows in the App Drawer. But furthermore, I keep getting the System UI has stopped error message, and it pops up every other second - making the device unuasble. I don't have any Nav buttons and on top of that this error message. I can't navigate anywhere! Luckily I made a backup of my old SystemUI.apk before I flashed the Nexus 7 zip, but not sure how to restore it?

Could someone be so kind to guide me out of this predicament? I have tried to flash Stock 4.2.1 SystemUI.apk but it didn't seem to make any difference. I am running a stock build of Android 4.2.1 with Franco's Kernel.

Any assistance will be much appreciated.

EDIT: Gave up and flashed Stock ROM. Had everything backed up in Titanium.

Cheers,
SAM
 
Last edited:

floepie

Senior Member
Feb 28, 2006
1,990
455
Amsterdam
OK, I found the solution as to why not all the .pngs are copied over to the new SystemUI.apk. The reason is that the 7za.exe will not update a newer file with an older file without a special -u switch. Because the SystemUI.apk is so new and that the battery mod PNGs are a bit older, the existing PNGs are not overwritten.

In order to correct this, navigate to the Working_Dir folder in the Tool, once extracted. Find the file, Mod_Battery.bat and exchange the following line 81:

Code:
7za.exe u SystemUI.zip res\drawable-xhdpi\*.png > nul

with this one:

Code:
7za.exe u SystemUI.zip res\drawable-xhdpi\*.png -ur2x2y2 > nul
 

jvbferrer

Senior Member
Dec 12, 2011
203
62
Valencia, Spain
I successfully flashed the zip with no error but the numbers are the same I had before, not the ones I chose.

EDIT: done, I flashed the one you previously created.
 
Last edited:

DarkShoko

Senior Member
Dec 14, 2012
50
18
i really didnt understand how to do that..
as an example
===== Copy "SystemUI.apk" to the "Input_APKs" folder ======
You can grab this from either; the ZIP archive for your ROM which is located in; \system\app\ of the ROMs zip file or you can copy it off your phone. (Personally, I think it's easier to grab it from your current ROMs flashable ZIP archive)

should i find the SystemUI.apk and move it to the zip and then flash it using CWM?
or should i find the SystemUI.apk and then press mod my battery(via my phone or my pc?)
sorry for all the questions
 

Top Liked Posts

  • There are no posts matching your filters.
  • 53
    So, since there wore many requests for the battery percentage mods, I've ported this MOD Tool so that its now working with Android 4.3.

    Download the zip file, read the instructions.txt file, follow the instructions and be happy.

    Included are 18 different battery styles. Some can be found here.

    When the new Android build gets released, I'll update the tool.

    If you can't flash it using the MOD Tools own flash zip, then take the SystemUI.apk from the Output Files/Modded Apk folder and drop it in the attached Battery MOD Flasher zip in the system/app folder. Flash it in the recovery.

    EDIT: Added the Battery.percentage.modifier. Once you have modded the SystemUI with the mod tool and you want easily to change the battery icons, just drop the 204 png's in the BM.Battery.percentage.modifier.zip\vrtheme\system\app\SystemUI.apk\res\drawable-xhdpi folder and flash the zip in the recovery.

    Download Battery MOD Tool for Android 4.3
    25
    Here we go, attached are again 4 flashable zip's for the Nexus 4 unmodified Stock ROM 4.2.2 (JDQ39). If anybody wants other images from the image resources just tell me.

    Always keep a backup of SystemUI.apk (and SystemUI.odex; located in /system/app/), you might need those for future OTA updates and of course in case something goes wrong.
    14
    don't know they are the correct steps or not, but it seem works

    Works perfectly, thanks. I made the following 4 flashable zip's for the Nexus 4 unmodified Stock ROM 4.2.1 (JOP40D) for the lazy ones.

    Edit 2:
    The zip's are perfectly working now, thanks to floepie!
    7
    Just tested, using OP's tools, follow ygvuhb's step and floepie's adjustment

    This method works on 4.2.2 too

    GREAT;)

    STEP

    1. Download Battery MOD Tool for Android 4.2.1, unzip it and choose which battery icons your like (in "Image Resources" folder)
    2. Copy battery icons into "Input_Images"
    3. Using root file explorer go to your nexus 4's \system\app\ copy "SystemUI.apk" and \system\framework\ copy "framework-res.apk"
    4. Paste "SystemUI.apk" & "framework-res.apk" in folder "Battery_Mod_Tool_for_Android_4.2.1\Input_APKs "

    5. Edit "Battery_Mod_Tool_for_Android_4.2.1\Working_Dir\Mod_Battery.bat and exchange line 81---> http://xdaforums.com/showpost.php?p=36893421&postcount=95

    6. Double-click "Battery_Mod_Tool_for_Android_4.2.1\Working_Dir\Mod_Battery.bat" and sit back and wait
    7. Download Brainmasters.Battery.Mod.Flasher.Nexus.4.zip
    8. Copy the updated SystemUI.apk (in "Battery_Mod_Tool_for_Android_4.2.1\Output\Modded_ APK") and use 7zip paste it in Brainmasters.Battery.Mod.Flasher.Nexus.4.zip\system\app\ (don't unzip it)
    9. Brainmasters.Battery.Mod.Flasher.Nexus.4.zip is updated, copy it in your nexus 4 and boot to recovery , flash it
    10. Reboot your nexus 4, then your will get the updated battery icons
    6
    Hi there,
    Here is the flashable zip i created with the help of brainmasters great tool and Hung0702s generated PNGs.
    I flashed it with RomManager -> "Flash Rom from SDcard" and it worked just fine - no bootloops or anything.

    As you can see in the screenshot, the size matches the other icons and looks great.
    I used the SystemUI.apk and framework-res.apk from my device, which has the stock JellyBean 4.2.1 JOP40D Build installed.
    Have fun with it!

    The Icons in the "Quick-Settings-Menu" (swipe down with two fingers) are not altered!