1. Are you ready for the Galaxy S20? Here is everything we know so far!

Creating a custom battery meter?

Discussion in 'Android Themes' started by clmaz, Aug 15, 2010.

  1. clmaz

    clmaz Lurker
    Thread Starter

    Hey guys. I'm new to the droid, and have been messing around with making my own first theme. One of the questions I have is how do I create my own custom battery meter? It looks like it can be done, since I've seen others available for download, such as a disk icon or percentage. But none of the ones available are what I'm really looking for. So if there is a way for me to actually make one of my own design, where would I begin? Thanks

  2. triki

    triki Newbie

    Here is how you modify some icons/graphics:
    *backup with nandroid first*

    1. Pull the framework-res.apk file:
    Code (Text):
    1. $ adb pull /system/framework/framework-res.apk
    2. Extract the apk file with archiving program (winzip or tugzip)
    * keep original framework-res.apk handy for later *

    3. The images you are looking for are in /res/drawable-hdpi

    4. Modify your images as you like.

    5. Once you had all the images ready, open up the original copy of the framework-res.apk file with (winzip or tugzip), drag and drop your new
    images into the correct directory. Close archiving application.(The purpose of just dropping the images into the apk file is to save you time of having to repackage the extracted framework-res.apk file and having to sign it)

    6. Push the apk file back to the phone:
    Code (Text):
    1. $ adb push framework-res.apk /system/framework/
    (you may need to make the /system partition writable)
    Code (Text):
    1. mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
    7. Once the file is copied you will see some apps on your phone die, like android market. Just reboot your phone and you should see your new images.

    Note: Check out google dev site for info on the Draw 9-Patch.
    Draw 9-patch | Android Developers

    Hope this helps.
  3. I am looking for this also!

    Thank you so much!

Share This Page