[MOD] Change your Battery Icon to show Percentage charge level

Search This thread

saltorio

Senior Member
Feb 20, 2009
1,098
67
Ottawa, ON
www.NutsNGum.net
Modify your X10 and change the default battery icon in the Notification bar (on the right) to display the exact battery charge level in percent.


(For a complete tutorial on modifying your choice framework to use whichever battery icons you wish, check out Calum's X10 Theme Reference – specifically post #5.)


Option 1: Install Only the Battery Icon Mod
(process and framework courtesy of MrRusch)

This tutorial will install a clean version of framework (2.1 original with the default X10 theme) with the percentage battery mod (grey colored version) applied. Choose this if you want to keep your X10 looking the same as it is by default, but you want the an accurate (ie: useful) battery icon.

  1. Download and unrar your choice MrRusch's modified framework: framework-res.rar (from post #147).
  2. Copy framework-res.apk to to your X10's /sdcard
  3. In terminal client on your phone (try Android Terminal Emulator if you don't have one already installed):
    - make sure you have super user permissions (su),
    - remount filesystem as read-write (mount -o remount,rw -t yaffs2 /dev/block/mtdblock2 /system), and
    - replace framework (dd if=/sdcard/framework-res.apk of=/system/framework/framework-res.apk)


Option 2: Install Battery Icon Mod as part of the Dark10 Theme
(process and modified framework courtesy of _calum_)
(Dark10 theme and installation tool courtesy of Chewitt.)


This tutorial uses Chewitt's Dark10 theme as a basis for the modification, and will result in that theme being installed on your phone along with the battery icon mod. If applied your X10 will look like the screenshots below.

  1. Download Calum's modified framework: framework-res.7z (from post #57).
  2. Use 7-Zip to unzip it as: framework-res.apk
  3. Download and unzip Chewitt's Dark10 Download Link For 2.1 Alpha theme.
  4. Copy framework-res.apk to \Dark10 for 2.1 Alpha v3.0.0\Content\content\, overwriting the existing file.
  5. Plug X10 into my PC's USB, ensuring USB debugging is enabled (Settings > Applications > Development > USB Debugging)
  6. Run \Dark10 for 2.1 Alpha v3.0.0\Content\Dark10 Series Installer.cmd.
  7. Select: #1 - Pre Install Check, and follow the on-screen prompts.
  8. Once everything is verified OK, select: #5 - Install Framework.
  9. Upon notice of success, phone will reboot with the beautiful Dark10 theme and (most importantly here), an animated percentage battery icon (visible on both the notification bar as well as the lock screen).

Additional Credits
Thanks to _calum_ for cracking how to modify framework-res.apk to get a working percentage battery icon.

Credit for the modified battery icons goes to Fightspit

Special thanks to: MarylandCookie.


Next Up: Lets see if we can figure out how to replace the semi-useless signal strength bars with an accurate signal strength (dBm) instead. Come join the effort!
 

Attachments

  • snap20101109_220415.jpg
    snap20101109_220415.jpg
    24.1 KB · Views: 8,040
  • snap20101109_220536.jpg
    snap20101109_220536.jpg
    36.6 KB · Views: 6,964
Last edited:

_calum_

Senior Member
Aug 16, 2010
493
58
Tübingen, Germany
I can't tell you for sure if it'll work on an X10, but it's no. 3 on my todo list :)

I hope to get around to it this week if work slows up a bit, I'll post back if noone beats me to it.
 

SXUsr

Senior Member
Jul 11, 2010
8,161
2,877
Here =)
Using Gauge Battery Widget you can have something similar, but it doesn't replace the default battery icon. Can't see it being long though for the SuperCircle to be ported.
 

saltorio

Senior Member
Feb 20, 2009
1,098
67
Ottawa, ON
www.NutsNGum.net
Using Gauge Battery Widget you can have something similar, but it doesn't replace the default battery icon. Can't see it being long though for the SuperCircle to be ported.

Yeah I use Battery Indicator Pro to show the percentage as a notification bar (left side) icon right now. However, I would really prefer to just have the default battery indicator show more useful information.

Plus, with the bigger icons on the 2.1 notification bar, we actually get less icons showing, making each space more valuable.
 

gavriel18

Senior Member
Nov 26, 2007
453
3
Ottawa
It's definitely possible but will probably take some work to get it running. I tried using the link provided and my battery display disappeared on reboot. I'm pretty sure those ones are froyo only.
 

chiefy009

Senior Member
Oct 29, 2010
4,158
796
I use battery indicator its free and it shows the percentage left as well as the original indicator
 

gavriel18

Senior Member
Nov 26, 2007
453
3
Ottawa
I actually didn't get it working myself. My little brother emailed some the xmls and told me to push them.

Ill post a tut tonight when he explains

Sent from my X10i using XDA App
 

saltorio

Senior Member
Feb 20, 2009
1,098
67
Ottawa, ON
www.NutsNGum.net
OK. My friend (who has a Samsung Galaxy S) told me how he managed to change the battery icon to a percentage graphic (see attached pic).

  • He edited \system\framework\framework-res.apk.
  • Deleted all the existing res\drawable-hdpi\stat_sys_battery_<X>.png graphics.
  • Replaced them with a new (more extensive) set of graphics for every percentage.
  • Replaced res\drawable\stat_sys_battery.xml with one that includes listings for each new graphic.
  • Replaced res\drawable\stat_sys_battery_charge.xml with one that includes listings for the new charging graphics.

I have attached a .rar archive (framework-res.apk.rar) with only the changed files he used.

I tried editing my own framework-res.apk using APK-Manager (http://xdaforums.com/showthread.php?t=695701), but I was unable to re-compile the modified APK (kept reporting errors).

My friend states that he simply dragged the files over using WinRAR, but I haven't tried that. If someone wants to, I've also attached his compiled (and signed?) apk (framework-res.apk).

If anyone else wants to see if we can work something out, this is a place to start at least.
 

Attachments

  • snap20100907_084830.png
    snap20100907_084830.png
    10.6 KB · Views: 579
  • framework-res.apk.rar
    1 MB · Views: 51
  • framework-res.apk
    4.4 MB · Views: 49
Last edited:

iridaki

Retired Forum Moderator
Feb 21, 2007
4,532
5,190
37
Edinburgh, Scotland
OK. My friend (who has a Samsung Galaxy S) told me how he managed to change the battery icon to a percentage graphic (see attached pic).

  • He edited \system\framework\framework-res.apk.
  • Deleted all the existing res\drawable-hdpi\stat_sys_battery_<X>.png graphics.
  • Replaced them with a new (more extensive) set of graphics for every percentage.
  • Replaced res\drawable\stat_sys_battery.xml with one that includes listings for each new graphic.
  • Replaced res\drawable\stat_sys_battery_charge.xml with one that includes listings for the new charging graphics.

I have attached a .rar archive (framework-res.apk.rar) with only the changed files he used.

I tried editing my own framework-res.apk using APK-Manager (http://xdaforums.com/showthread.php?t=695701), but I was unable to re-compile the modified APK (kept reporting errors).

My friend states that he simply dragged the files over using WinRAR, but I haven't tried that. If someone wants to, I've also attached his compiled (and signed?) apk (framework-res.apk).

If anyone else wants to see if we can work something out, this is a place to start at least.
System files do not need to be signed after editing! ;)
 

Top Liked Posts

  • There are no posts matching your filters.
  • 4
    Here's the battery modification for 2.0.2.A.0.24 firmware.
    2
    Modify your X10 and change the default battery icon in the Notification bar (on the right) to display the exact battery charge level in percent.


    (For a complete tutorial on modifying your choice framework to use whichever battery icons you wish, check out Calum's X10 Theme Reference – specifically post #5.)


    Option 1: Install Only the Battery Icon Mod
    (process and framework courtesy of MrRusch)

    This tutorial will install a clean version of framework (2.1 original with the default X10 theme) with the percentage battery mod (grey colored version) applied. Choose this if you want to keep your X10 looking the same as it is by default, but you want the an accurate (ie: useful) battery icon.

    1. Download and unrar your choice MrRusch's modified framework: framework-res.rar (from post #147).
    2. Copy framework-res.apk to to your X10's /sdcard
    3. In terminal client on your phone (try Android Terminal Emulator if you don't have one already installed):
      - make sure you have super user permissions (su),
      - remount filesystem as read-write (mount -o remount,rw -t yaffs2 /dev/block/mtdblock2 /system), and
      - replace framework (dd if=/sdcard/framework-res.apk of=/system/framework/framework-res.apk)


    Option 2: Install Battery Icon Mod as part of the Dark10 Theme
    (process and modified framework courtesy of _calum_)
    (Dark10 theme and installation tool courtesy of Chewitt.)


    This tutorial uses Chewitt's Dark10 theme as a basis for the modification, and will result in that theme being installed on your phone along with the battery icon mod. If applied your X10 will look like the screenshots below.

    1. Download Calum's modified framework: framework-res.7z (from post #57).
    2. Use 7-Zip to unzip it as: framework-res.apk
    3. Download and unzip Chewitt's Dark10 Download Link For 2.1 Alpha theme.
    4. Copy framework-res.apk to \Dark10 for 2.1 Alpha v3.0.0\Content\content\, overwriting the existing file.
    5. Plug X10 into my PC's USB, ensuring USB debugging is enabled (Settings > Applications > Development > USB Debugging)
    6. Run \Dark10 for 2.1 Alpha v3.0.0\Content\Dark10 Series Installer.cmd.
    7. Select: #1 - Pre Install Check, and follow the on-screen prompts.
    8. Once everything is verified OK, select: #5 - Install Framework.
    9. Upon notice of success, phone will reboot with the beautiful Dark10 theme and (most importantly here), an animated percentage battery icon (visible on both the notification bar as well as the lock screen).

    Additional Credits
    Thanks to _calum_ for cracking how to modify framework-res.apk to get a working percentage battery icon.

    Credit for the modified battery icons goes to Fightspit

    Special thanks to: MarylandCookie.


    Next Up: Lets see if we can figure out how to replace the semi-useless signal strength bars with an accurate signal strength (dBm) instead. Come join the effort!
    2
    Here is the battery modification for the 2.1.2.1.A.0.435_GLOBAL firmware.

    Let me know if you have any issues.
    1
    framework-res.apk for 2.0.2.A.0.24 firmware

    If anyone, like me, likes option C (from this thread: http://xdaforums.com/showpost.php?p=9143233&postcount=92) better, i have added it to the attatched framework.

    All credit goes to you MrRusch as you made all the work. I just took the images from one of your framework apk's and added to this new one.

    EDIT: I forgot 2 images. It is now fixed.
    1
    Cm7.0.3 j022

    Here is the mod for CM7.0.3 J022 version.
    Check it out and let me know if it is stable.