[MOD][ICS][9'Jun] * Battery Mod Tool * ALL CM9/Samsung ROMs *

Search This thread

GeyerA

Senior Member
Apr 6, 2009
979
1,586
Germany, Gerolzhofen
Hello, I know but does it do exactly the same than the SystemUI.apk or doesn't if have the small ladybug....:) if exactly the same, I keep it as it is.

UPDATE - rolled back on the thread and found the answer. ZIP is better. Will try....
 
Last edited:

semdoc

Recognized Contributor

GeyerA

Senior Member
Apr 6, 2009
979
1,586
Germany, Gerolzhofen
Hi, I can offer to help/try when I am home. Still at work......give me two hours.
BTW, flashing the zip was not successful. CWM complained about a mounting error. I will keep it as it is....
 

shayne77

Senior Member
Mar 31, 2011
1,869
757
Gold Coast
ASUS ZenFone 8
OK..


Here is SystemUI: https://www.dropbox.com/s/kyf1f1xc2wyx40p/SystemUI.apk

Here is framework-res: https://www.dropbox.com/s/eegbw4tywsfkgk6/framework-res.apk...

It would be nice to make a 1% Battery - Gauge by he_stheone64 :)

Thanx in advance :)


Im not quite sure what caused your error but the mod tool worked fine for me.
Try the attached ZIP and then make sure you select "Default" or something similar in your Battery Settings. It looks like there are quite a few batteries available in your SystemUI anyway.
 

Attachments

  • Battery_Mod.zip
    2.1 MB · Views: 13
  • Like
Reactions: semdoc

semdoc

Recognized Contributor
Working like a charm...

Screenshot_2012-04-24-15-20-35.png



Thank you :))

Awesome work !!!
 

claude96

Senior Member
Mar 18, 2010
1,454
2,460
OK..


Here is SystemUI: https://www.dropbox.com/s/kyf1f1xc2wyx40p/SystemUI.apk

Here is framework-res: https://www.dropbox.com/s/eegbw4tywsfkgk6/framework-res.apk...

It would be nice to make a 1% Battery - Gauge by he_stheone64 :)

Thanx in advance :)

@semdoc maybe I know why, about making a java path ( sorry I was very busy ), but here goes : in windows (64bit) go to control panel, system at the top right press Advanced system settings, a window will pop out, in that window press Environment Variables, another window will pop out, now in that window in System variables , look for Path and press on it once, then press the edit button, at the end of Variable value, copy&paste this : ;C:\Program Files\Java\jdk1.7.0_03\bin\java.exe ( PS : first change jdk1.7.0_03 to the java version on your PC, just go to : C:\Program Files\Java\ , also C: should be changed to where you OS is installed ), check the pics, hope this helps.
 

Attachments

  • Path_1.PNG
    Path_1.PNG
    43.5 KB · Views: 139
  • Path_2.PNG
    Path_2.PNG
    23.9 KB · Views: 135
  • Path_3.PNG
    Path_3.PNG
    30.4 KB · Views: 135
  • Path_4.PNG
    Path_4.PNG
    11.4 KB · Views: 125
  • Like
Reactions: semdoc

shayne77

Senior Member
Mar 31, 2011
1,869
757
Gold Coast
ASUS ZenFone 8
@semdoc maybe I know why, about making a java path ( sorry I was very busy ), but here goes : in windows (64bit) go to control panel, system at the top right press Advanced system settings, a window will pop out, in that window press Environment Variables, another window will pop out, now in that window in System variables , look for Path and press on it once, then press the edit button, at the end of Variable value, copy&paste this : ;C:\Program Files\Java\jdk1.7.0_03\bin\java.exe ( PS : first change jdk1.7.0_03 to the java version on your PC, just go to : C:\Program Files\Java\ , also C: should be changed to where you OS is installed ), check the pics, hope this helps.

As i have already stated, i check for java on the users system so the mod tool will tell you if its not installed.
The problem is not java.

sent from my XOOM using XDA Premium HD
 

semdoc

Recognized Contributor
@semdoc maybe I know why, about making a java path ( sorry I was very busy ), but here goes : in windows (64bit) go to control panel, system at the top right press Advanced system settings, a window will pop out, in that window press Environment Variables, another window will pop out, now in that window in System variables , look for Path and press on it once, then press the edit button, at the end of Variable value, copy&paste this : ;C:\Program Files\Java\jdk1.7.0_03\bin\java.exe ( PS : first change jdk1.7.0_03 to the java version on your PC, just go to : C:\Program Files\Java\ , also C: should be changed to where you OS is installed ), check the pics, hope this helps.

Thank you for your help claude96, All stated settings are DONE.

Same Error :(
 

claude96

Senior Member
Mar 18, 2010
1,454
2,460
Thank you for your help claude96, All stated settings are DONE.

Same Error :(

ok, then do the same steps, and copy/paste this ( without the quotes ) at the end of Path ( ;C:program Files (x86)\Android\android-sdk\platform-tools\ ) , press OK to all, reboot , pu the battery tool file in your username folder, and try it, hope this helps.
PS : you have installed android sdk !, right ?
 
  • Like
Reactions: semdoc

semdoc

Recognized Contributor
ok, then do the same steps, and copy/paste this ( without the quotes ) at the end of Path ( ;C:program Files (x86)\Android\android-sdk\platform-tools\ ) , press OK to all, reboot , pu the battery tool file in your username folder, and try it, hope this helps.
PS : you have installed android sdk !, right ?

:p....

Please don't shoot me ... Nope, but it doesn't said that I have to... Ok... Will install nd will try again.... Sorry!

Sent from my TF201 using XDA Pre HD app
 

claude96

Senior Member
Mar 18, 2010
1,454
2,460
:p....

Please don't shoot me ... Nope, but it doesn't said that I have to... Ok... Will install nd will try again.... Sorry!

Sent from my TF201 using XDA Pre HD app

No problem, just remove the sdk tools path b4 you install the sdk, then download the sdk tools, then re-ad the path reboot & good luck.
PS: b4 that, just move the batt_tool to your user folder, and try it, also right click the bat file & run as admin, see if this works.
PPS : did you change the java version to the one on your PC !
 
Last edited:

shayne77

Senior Member
Mar 31, 2011
1,869
757
Gold Coast
ASUS ZenFone 8
I think there is a bug in this. I dont think its a bug in your script but more maybe an issue with 7za.exe -u command that is being run.

I noticed in the output folder that the SystemUI.apk is not fully updating all the battery images. So I extracted that newly built apk with 7zip. Then looked at the drawable-hdpi folder and noticed all the original icons are still there like "stat_sys_battery_15.png" but the other ones were added. So it seems like it added all 204 PNGs but failed to overwrite the existing ones.

I see in your batch file you are calling this cmd to update the PNGs:

7za.exe u SystemUI.zip res\drawable-hdpi\*.png > nul

Now if I manually run that by say calling:
7za.exe u SystemUI.zip res\drawable-hdpi\stat_sys_battery_15.png > nul
It still doesnt update that _15.png. So for some reason the cmd line "-u" is not actually overwriting existing files. If you use the filemanager gui portion of 7zip then it works fine.

So.... you might want to look into that for folks that might be using the APK directly instead of using the flashable zip. I couldnt find any particular switch to force the overwrite.

Dixit

Hello shayne77, I can't stop looking at my circle and noticed today that it went back to the "stock" CM battery. So I re-copied (overwrote) the file SystemsUI.apk in the app folder and circle returned. Later, while browsing and using internet connection (IM), I saw again the CM stock battery coming back. I ignored it, and out of the blue, the circle returned. Is there some other place the system gets the battery pic from? Is there any mistake I could have made? Should I wike Dalvik and flash the .zip...? I will try on my Thunderbolt and Nexus One tonight (on CM beta:)

I checked this out and it seems fine on my system. [See screenshot attached]
For some reason, I reckon the APK is being set to read-only while I import the images on your systems. Try right-clicking the Battery Mod folder and unchecking read-only (apply to sub-directories as well) and see how you go.

EDIT: If you look at files 15 and 28 in the screenshot, you will see they've been updated. Also, check my directory is the same as well.
 

Attachments

  • Battery_mod_Check.jpg
    Battery_mod_Check.jpg
    250.1 KB · Views: 135
Last edited:

dixit

Senior Member
Apr 26, 2006
229
66
ATL
I checked this out and it seems fine on my system. [See screenshot attached]
For some reason, I reckon the APK is being set to read-only while I import the images on your systems. Try right-clicking the Battery Mod folder and unchecking read-only (apply to sub-directories as well) and see how you go.

EDIT: If you look at files 15 and 28 in the screenshot, you will see they've been updated. Also, check my directory is the same as well.

For sure yours works as your screenshot proves that. I checked my readonly and made sure its off, tried it again, still the stock files like 15, 28, 43, etc are still not being updated.

Also just went to Command Prompt as Admin then manually called your BAT file and it ran fine as Admin thinking maybe its permissions, but it still created an APK without the original stock ones updated like 15, 28, 43, etc.

What I cant get is why when you actually manually run the 7zip command manually from the command line using the -u it still doesnt update it, acts like the command ran fine, but inside it didnt update the file at all.

Now its going to bug me to find out why on my system it dont work when on yours it does. Time to do more digging, try another system if i can and maybe then try to find out why this fails to update the stock images that exist.

Dixit

---------- Post added at 08:34 PM ---------- Previous post was at 08:17 PM ----------

Alright well I think I narrowed it down some more. I used a different Framework-res.apk and SystemUI.apk and it worked fine, one from a different rom (actually from a GB rom). Original one I kept trying was from an ICS based Rom.

So then tried a different ICS's ROM set of Framework-res.apk and SystemUI.apk. Still failed on the same 15, 28, 43, etc stock files not being over written.

So then tried a 3rd different ICS ROM using its Framework-res.apk and SystemUI.apk and what you know, it flipping WORKED! So not sure what these other two have done in the SystemUI.apk but clearly the 7zip cmd line using -u cant seem to overwrite the existing stock images and leaves them in place but just adds all the other new ones.

Dixit
 
Last edited:

shayne77

Senior Member
Mar 31, 2011
1,869
757
Gold Coast
ASUS ZenFone 8
For sure yours works as your screenshot proves that. I checked my readonly and made sure its off, tried it again, still the stock files like 15, 28, 43, etc are still not being updated.

Also just went to Command Prompt as Admin then manually called your BAT file and it ran fine as Admin thinking maybe its permissions, but it still created an APK without the original stock ones updated like 15, 28, 43, etc.

What I cant get is why when you actually manually run the 7zip command manually from the command line using the -u it still doesnt update it, acts like the command ran fine, but inside it didnt update the file at all.

Now its going to bug me to find out why on my system it dont work when on yours it does. Time to do more digging, try another system if i can and maybe then try to find out why this fails to update the stock images that exist.

Dixit

---------- Post added at 08:34 PM ---------- Previous post was at 08:17 PM ----------

Alright well I think I narrowed it down some more. I used a different Framework-res.apk and SystemUI.apk and it worked fine, one from a different rom (actually from a GB rom). Original one I kept trying was from an ICS based Rom.

So then tried a different ICS's ROM set of Framework-res.apk and SystemUI.apk. Still failed on the same 15, 28, 43, etc stock files not being over written.

So then tried a 3rd different ICS ROM using its Framework-res.apk and SystemUI.apk and what you know, it flipping WORKED! So not sure what these other two have done in the SystemUI.apk but clearly the 7zip cmd line using -u cant seem to overwrite the existing stock images and leaves them in place but just adds all the other new ones.

Dixit

Ah. It's gotta be how they're creating (or modding) those APKs then. They must be compressed differently and/or the files inside the ZIP have different attributes.
 

dixit

Senior Member
Apr 26, 2006
229
66
ATL
Ah. It's gotta be how they're creating (or modding) those APKs then. They must be compressed differently and/or the files inside the ZIP have different attributes.

If it helps any, I think/wonder it might have to do with actually the "Host OS" and Version. Notice in the screenshot I highlighted the stock file that didnt get updated, you notice how its HostOS is Unix and Version number is higher (20) then the ones you added which are 10. I wonder if the cmd lind 7zip -u command wont update it if the version is lower then whats going in or if it fails cause the HostOS is wrong. Thats something that caught my eye on why two of the ROM set files I used failed, but the 3rd one worked, that 3rd one, all stock files are in the APK itself are FAT on HostOS and 10 on Version.

Dixit
 

Attachments

  • PossibleReason.JPG
    PossibleReason.JPG
    123.2 KB · Views: 118

Top Liked Posts

  • There are no posts matching your filters.
  • 268
    Hey guys,

    This tool allows you to compile your own "Battery Mod" using your own PNG Battery Images of your choice. For your convenience, I have compiled a list of Battery Images below for you to choose.
    This tool works with Ice Cream Sandwich 4.0.3/4.0.4 for both CyanogenMod and Samsung type ROMs

    I take no credit what so ever for the creation and design of the battery images however, I will pin a medal on my chest for the many hours I've spent perfecting them to suite your needs.
    They were designed by their respective authors shown below. (so please show them THANKS in their original thread(s))
    I have taken the files from this source by mrvirginia.

    Compatible with: Official CM9 (Ice Cream Sandwich 4.0.3/4.0.4)
    Compatible with: "Stock" Samsung Deodexed ROMs (Ice Cream Sandwich 4.0.3/4.0.4)

    The usual disclaimer: I accept no responsibility if your phone blows up or it screws with your system giving you a boot loop or something. I can't reproduce every single users installation type. In saying that, I'm pretty certain they all should install ok on your device.


    INSTRUCTIONS: (for "experienced users")

    1a) Download: Battery Mod Tool v1.2 for Windows (Mirror1) (Mirror2) (Mirror3) (Mirror4)
    1b) Download: Battery Mod Tool v1.2 for Linux (Mirror1) (Mirror2) (Mirror3) (Mirror4)
    2) Download: The battery images of your choice (Mirror1) (Mirror2) (Mirror3) (Mirror4) (or use your own images)
    3) Copy the 204 x Battery PNG images to the "Input_Images" folder
    4) Copy "SystemUI.apk" to the "Input_APKs" folder
    5) Copy "framework-res.apk" to the "Input_APKs" folder
    6a) Double-click "Mod_my_battery!.bat" and sit back and wait for Windows version
    6b) Check inside the tarball package for instructions on how to use the Linux version
    7) Check the "Output" folder for your newly modded SystemUI


    INSTRUCTIONS: To RESTORE the backup.

    A flashable ZIP file is created during flashing of the battery mod. This is a backup of your original SystemUI.apk file. Each ZIP is timestamped with the date and time in GMT/UTC. All you have to do, is flash this ZIP as you would any other flashable CWM zip file. The files are located in \SDCard\UniversalFlasher\


    FAQ:

    Q. I can't see my new battery mod? (using CM9)
    A. Check the battery display setting. (Settings - Interface - System - Status Bar - Battery status style -> Icon (default))

    Q. I had an error during the modding process... something about "airplane_mode" not present.
    A. You can safely ignore this. It's more of a warning and not an error.


    THANKS:

    For their work; without them, this thread wouldn't be possible
    - mrvirginia, sonnysekhon, he_stheone64, Hooolm, reverepats, Zaphod-Beeblebrox, evilkal, Pendo, ktmbikerman, nbeebe24, Gyufus, D79_ and azpilot.

    For CM9; without them, we wouldn't have an early release of Ice Cream Sandwich
    - AdamG-, atinm, codeworkx, coolya, guiper, nebkat, Unhelpful, xplodwild, yjwong, teamhacksung and the cyanogenmod-team.

    For Universal Flashing Tool and VRTheme.
    - VillainROM team, doctercrete, JRsoft and Intronauta.

    For apktool; without this, we wouldn't be able to reverse engineer ICS apk files.
    - Brut.alll


    Battery Images:

    Lucid Battery by sonnysekhon
    Lucid_Battery.png

    Download: Battery Images (Mirror1) (Mirror2)

    1% Battery - Stock by he_stheone64
    1_Percent_Stock.png

    Download: Battery Images (Mirror1) (Mirror2)

    1% Battery - Circle by he_stheone64
    1_Percent_Circle.png

    Download: Battery Images (Mirror1) (Mirror2)

    1% Battery - Gauge by he_stheone64
    Gauge.png

    Download: Battery Images (Mirror1) (Mirror2)

    1% Battery - Gauge by he_stheone64 modded by
    dave_p_b

    1%25_gauge-by_dave_p_b.png

    Download: Battery Images (Mirror1) (Mirror2)

    CirclesMod by Hooolm
    CirclesMod.png

    Download: Battery Images (Mirror1) (Mirror2)

    Circle Battery by currently unknown
    CircleBattery.png

    Download: Battery Images (Mirror1) (Mirror2)

    Axiom Battery - Blue Box by reverepats
    Axiom_Blue_Box.png

    Download: Battery Images (Mirror1) (Mirror2)

    Axiom Battery - Dotted Circle by reverepats
    Axiom_Dotted_Circle.png

    Download: Battery Images (Mirror1) (Mirror2)

    Axiom Battery - HoneyComb by reverepats
    Axiom_HoneyComb.png

    Download: Battery Images (Mirror1) (Mirror2)

    Axiom Battery - Left % by reverepats
    Axiom_Left_Percent.png

    Download: Battery Images (Mirror1) (Mirror2)

    Axiom Battery - Little Android by reverepats
    Axiom_Little_Android.png

    Download: Battery Images (Mirror1) (Mirror2)

    Axiom Battery - Big Android by reverepats
    BigAndroid.png

    Download: Battery Images (Mirror1) (Mirror2)

    Axiom Battery - Sphere by reverepats
    Axiom_Sphere.png

    Download: Battery Images (Mirror1) (Mirror2)

    Axiom Battery - Stock Horizontal by reverepats
    Axiom_Stock_Horizontal.png

    Download: Battery Images (Mirror1) (Mirror2)

    Axiom Battery - Stock Vertical by reverepats
    Axiom_Stock_Vertical.png

    Download: Battery Images (Mirror1) (Mirror2)

    Off Center Battery by mrvirginia
    Off_Center.png

    Download: Battery Images (Mirror1) (Mirror2)

    Circle Battery - No Numbers by mrvirginia
    Circle_NoNumbers.png

    Download: Battery Images (Mirror1) (Mirror2)

    Circle Battery - Normal by mrvirginia
    Circle_Normal.png

    Download: Battery Images (Mirror1) (Mirror2)

    Numbers by Gyufus
    Numbers.png

    Download: Battery Images (Mirror1) (Mirror2)

    Digital Numbers by Zaphod-Beeblebrox
    Digital_numbers.png

    Download: Battery Images (Mirror1) (Mirror2)

    Full Circle - Blue by evilkal
    FullCircle_Blue.png

    Download: Battery Images (Mirror1) (Mirror2)

    Full Circle - White by evilkal
    FullCircle_White.png

    Download: Battery Images (Mirror1) (Mirror2)

    Full Circle by Pendo
    FullCircle_Pendo.png

    Download: Battery Images (Mirror1) (Mirror2)

    GingerBlu by ktmbikerman
    GingerBlu.png

    Download: Battery Images (Mirror1) (Mirror2)

    ICS Circle by nbeebe24
    ICS_Circle.png

    Download: Battery Images (Mirror1) (Mirror2)

    4 Bars by D79_
    4bars.png

    Download: Battery Images (Mirror1) (Mirror2)

    CyanogenMod by D79_
    Circle_Cyanogen.png

    Download: Battery Images (Mirror1) (Mirror2)

    CyanogenMod with Numbers by D79_
    Blue_Cyanogen_Numbers.png

    Download: Battery Images (Mirror1) (Mirror2)

    B&W CyanogenMod with Numbers by D79_
    B%2526W_Cyanogen_Numbers.png

    Download: Battery Images (Mirror1) (Mirror2)

    ICS Domination - Percentage by Vertumus
    ICS_Domination_Percentage.png

    Download: Battery Images (Mirror1) (Mirror2)

    ICS Domination - Original by Vertumus
    ICS_Domination_Original.png

    Download: Battery Images (Mirror1) (Mirror2)

    ICS Domination - CM by Vertumus
    ICS_Domination_CM.png

    Download: Battery Images (Mirror1) (Mirror2)

    ICS Domination - Circle by Vertumus
    ICS_Domination_Circle.png

    Download: Battery Images (Mirror1) (Mirror2)

    Stock look with White numbers by currently unknown
    Stock_look_with_White_Numbers.png

    Download: Battery Images (Mirror1) (Mirror2)


    Link to old Battery Mods - v2.5/v2.6 only

    Download: Battery Mods


    CHANGELOG: Battery Mod Tool

    9th June - v1.2:
    - Added Linux version of Battery Mod Tool v1.2. (Thanks to dave_p_b)
    - Added 1% Battery Gauge modded by dave_p_b. (Gauge changes colour as your level changes)
    3rd April - v1.2:
    - Fixed some bugs.
    1st April - v1.1:
    - Fixed some bugs.
    - Added all available apktool's
    24th Mar - v1.0:
    - Initial Release: Battery Mod Tool

    CHANGELOG: Battery Mod's
    24th Mar - v2.6:
    - Added support for CM9:0322
    18th Mar - v2.5:
    - Added support for CM9:0314 (and CM9:0318) and xxLPQ
    22nd Feb - v2.4:
    - Added support for CM9:0220 and xxLPH
    5th Feb - v2.3:
    - Added support for LPB
    - Added 2 x more mods by D79_
    2nd Feb - v2.2:
    - Added support for CM9:02012012
    28th Jan - v2.1:
    - Added support for LP6
    - Added a new Battery called "4 Bars" thanks to D79.
    - Recompiled resources just in case for CM9.
    - For now, use v2.0 for LP2. I'm working on multi-platform support for next release.
    - Added BigAndroid.
    25th Jan - v2.0:
    - Converted all flashable zips to UNIVERSAL type. (One zip for both versions of ICS)
    21st Jan - v1.1:
    - Updated all mods to use UFT, they should be compatible with all future builds as well.
    - Added 9 new battery MODs.
    - Added compatibility for ICS XXLP2 to the list.
    - Resized a few more of them.
    - New screenshots showing new battery MODs.
    15th Jan - v1.0:
    - Updated all mods to use VRTheme, they are compatible with all future CM9 builds now.
    - Resized a few of them as per your requests.
    - New screenshots showing new sizes.
    - Reset version numbering convention.
    - I'm now also clearing DALVIK during install just to eliminate any possible errors with other mods you may have done.
    - Add "Restoration to Stock" for each build.
    12th Jan - v3:
    - Updated to latest CM9 Build: "update-cm-9-SGS2-01112012-2-signed.zip"
    - Still using old method. Will update to VRT over the weekend.
    9th Jan - v2:
    - All MODs in 1% increments
    8th Jan - v1: (Initial Release)
    - Files removed (MODs not in 1% increments)
    7
    Thanks for the great work. This is wonderful! :)
    530d8191857c.png
    6
    My new tool for you all.
    I've created a tool to automatically create a modded SystemUI.apk containing any 1% battery you wish.
    It's very simple to use, just follow the Instructions in the root of the zip archive.

    This tool is setup to work with both CM9 and Sammy ROMs.

    Let me know if you have any dramas.

    Hope this helps.

    Shayne.

    http://www.box.com/s/a4299a7a9f91405f25ca
    6
    V1.2 for you all...
    Support for Siyah kernel...

    http://db.tt/S4XgvPOq

    sent from my Motorola XOOM using XDA Premium HD
    5
    Hey guys,

    I will endeavour to update to the latest asap. I'll try and sit down tonight.