Any way to make battery icon image update every 10% rather than every 20%?

This is a discussion on Any way to make battery icon image update every 10% rather than every 20%? within the cvpcs forums, part of the Droid Forums Dev Archives category; Originally Posted by kevdog One of the pitfalls with this approach is that if you want to apply a theme after applying this hack, the ...

+ Reply to Thread
Page 10 of 10 FirstFirst ... 8 9 10
Results 91 to 98 of 98

Thread: Any way to make battery icon image update every 10% rather than every 20%?

  1. Master Droid
    GeLopez's Avatar
    Member #
    10275
    Join Date
    Nov 2009
    Location
    Dallas TX
    Posts
    631
    Liked
    23 times
    Phone
    Galaxy Nexus
    #91
    Quote Originally Posted by kevdog View Post
    One of the pitfalls with this approach is that if you want to apply a theme after applying this hack, the new custom framework-res.apk (containing the 10% battery) will be overwritten with the themed framework-res.apk -- hence losing the 10% battery effect. Essential for this hack to work is both the stat_sys_battery.xml file along with the resources.arsc file. The actual png icons can be added later at any time.

    I wish there was a way to distribute a framework-res.apk file that made it possible only to update changes (call it a partial framework-res.apk update), rather than distribution of the entire framework-res.apk. That way only the updated portions of the framework could be updated, leaving any themed parts behind. The problem however arises if the theme creator modified the resources.arsc in any way.

    Possibly the best way to distribute these two files would be either individually (which could then be applied using ninjamorph) or as a metamorph file. I'm not the biggest fan of either approach, however they would allow others to install this hack over a themed ROM (possibly).

    The sure fire method would be to ask theme creators to create their themes with the ability to have custom 10% icons. That would probably be the best way (or have cvpcs add this in when the entire ROM is compiled -- which I'm betting has virtually no chance.).
    if you need more ideas "nex thang" theme already comes in 10% intervals, i have been using it since sapphire 1.0 came out.
    90 80 70 60 50 40 30 20 15 10
  2. Senior Droid
    GodfatherIP's Avatar
    Member #
    39810
    Join Date
    Feb 2010
    Posts
    249
    Phone
    Droid Razr Maxx
    #92
    Hey, I know this is an old thread but I wanted to set up the 10% battery images on my current rom and was wondering what files I need to copy over to get it to work. So far I took Chevy's SS rom and decompiled it with APK manager. I found the stat_sys_battery.xml file in /res/drawable/ and I copied it over. I then tried to use metamorph to replace the xml and the pngs in my current rom (CM 6.1.2) with new pngs and the xml file with 10% increments. The metamorph operation appeared to work and I was prompted to reboot for changes to take effect. I rebooted and the phone started up fine but now I have no battery images at all (a quick nandroid restore fixed that of course but now back where I started). So I have read this whole thread and am trying to figure out what I did wrong and I think it is either that I didn't copy everything I needed to or that metamorph isn't suitable for the job.

    Are there more files I need to copy over? Somebody mentioned the public.xml file. I found this file but I read one post that said it wasn't necessary to copy it over. Someone else mentioned resources.arsc. Where is resources.arsc and can I just copy it over from Chevy's rom as well or will that create some kind of conflicts with my current rom and theme?

    My second thought is that maybe metamorph isn't suitable for this? Do I need to actually compile framework-res.apk with APK manager and ADB push it to system to get it to work properly.

    Also if anyone is looking for alternate themed 10% battery icons this is the set I'm trying to use: Liquid Battery Icons.

    Any help would be appreciated. Thanks!
    Project Elite v6.5 Link2SD for apps on sdext and Super Freaking Charged thanks to ZepplinRox!
    Thanks to all the devs out there keeping the OG Droid running strong!
    Join Dropbox for all your file storage and sharing needs, join from this link to give me more space
  3. Senior Droid
    GodfatherIP's Avatar
    Member #
    39810
    Join Date
    Feb 2010
    Posts
    249
    Phone
    Droid Razr Maxx
    #93
    So I tried to recompile with APK Manager but I got a ton of errors (I guess because my framework-res.apk is themed) and a basically empty framework-res.apk. I can recompile with the stock CM framework-res.apk but not the Nextheme version. Is there any way to make this work with a themed framework-res.apk?
    Project Elite v6.5 Link2SD for apps on sdext and Super Freaking Charged thanks to ZepplinRox!
    Thanks to all the devs out there keeping the OG Droid running strong!
    Join Dropbox for all your file storage and sharing needs, join from this link to give me more space
  4. Senior Droid
    ACalcutt's Avatar
    Member #
    9393
    Join Date
    Nov 2009
    Posts
    207
    Phone
    Motorola Droid 3
    #94
    This is how I add 10% increments to the smoked glass theme

    start with the stock framework-res.apk
    1.) Decompile framework-res.apk with apk manager 4.9 (option 9)
    2.) Edit
    drawable\stat_sys_battery.xml
    3.) Add new battery icons
    res\drawable-hdpi\stat_sys_battery_0.png
    res\drawable-hdpi\stat_sys_battery_5.png
    res\drawable-hdpi\stat_sys_battery_10.png
    res\drawable-hdpi\stat_sys_battery_15.png
    res\drawable-hdpi\stat_sys_battery_20.png
    res\drawable-hdpi\stat_sys_battery_30.png
    res\drawable-hdpi\stat_sys_battery_40.png
    res\drawable-hdpi\stat_sys_battery_50.png
    res\drawable-hdpi\stat_sys_battery_60.png
    res\drawable-hdpi\stat_sys_battery_70.png
    res\drawable-hdpi\stat_sys_battery_80.png
    res\drawable-hdpi\stat_sys_battery_90.png
    res\drawable-hdpi\stat_sys_battery_100.png
    4.)Compile APK (option 11). I usually do the keep old files option (though i'm not sure its needed)
    5.) At this pont the 10% increments are done, then I add the rest of my theme images into unsignedframework-res.apk. (if i add them before compiling i seem to get an error compiling)
    6.)Sign APK (option 12)

    Attached is the decompiled stat_sys_battery.xml file and the icons I made. feel free to use them.
    Attached Files
    -Andrew Calcutt
  5. Senior Droid
    XDRDX's Avatar
    Member #
    134062
    Join Date
    Nov 2010
    Posts
    134
    Phone
    Motorola Droid X
    #95
    You may be able to get rid of the error when recompiling if you increase your heap size. I adjust mine to 512 and I have been able to decompile and recompile now without getting errors.
  6. Droid
    Lock-N-Load's Avatar
    Member #
    35537
    Join Date
    Feb 2010
    Location
    Westsiiide
    Posts
    73
    Phone
    Drizzoid
    #96
    Quote Originally Posted by lrgraham14 View Post
    Update.zip can be installed the same way a rom is... Note that this replaces your services.jar with a modified one to allow transparent images.
    Download update.zip

    Let me know if you have any problems installing..
    necropost...

    just FWI... your update.zip will not unzip and expand on the desktop (just to peep the png files) and trying to install it from recovery causes a boot loop on my D1. I tried 3 times.
  7. Droid
    Lock-N-Load's Avatar
    Member #
    35537
    Join Date
    Feb 2010
    Location
    Westsiiide
    Posts
    73
    Phone
    Drizzoid
    #97
    Quote Originally Posted by ACalcutt View Post
    This is how I add 10% increments to the smoked glass theme

    start with the stock framework-res.apk
    1.) Decompile framework-res.apk with apk manager 4.9 (option 9)
    2.) Edit
    drawable\stat_sys_battery.xml
    3.) Add new battery icons
    res\drawable-hdpi\stat_sys_battery_0.png
    res\drawable-hdpi\stat_sys_battery_5.png
    res\drawable-hdpi\stat_sys_battery_10.png
    res\drawable-hdpi\stat_sys_battery_15.png
    res\drawable-hdpi\stat_sys_battery_20.png
    res\drawable-hdpi\stat_sys_battery_30.png
    res\drawable-hdpi\stat_sys_battery_40.png
    res\drawable-hdpi\stat_sys_battery_50.png
    res\drawable-hdpi\stat_sys_battery_60.png
    res\drawable-hdpi\stat_sys_battery_70.png
    res\drawable-hdpi\stat_sys_battery_80.png
    res\drawable-hdpi\stat_sys_battery_90.png
    res\drawable-hdpi\stat_sys_battery_100.png
    4.)Compile APK (option 11). I usually do the keep old files option (though i'm not sure its needed)
    5.) At this pont the 10% increments are done, then I add the rest of my theme images into unsignedframework-res.apk. (if i add them before compiling i seem to get an error compiling)
    6.)Sign APK (option 12)

    Attached is the decompiled stat_sys_battery.xml file and the icons I made. feel free to use them.
    do you just install this from recovery as an update.zip?

    nope, I guess not can you provide a compiled version of all of this that can be just installed as an update.zip in recovery? I do not have the ability to do steps 1-6 on my mac.
    Last edited by Lock-N-Load; 02-10-2011 at 12:50 PM.
  8. Junior Droid
    R-1 Rider's Avatar
    Member #
    13444
    Join Date
    Dec 2009
    Posts
    8
    Phone
    Motorola Droid
    #98
    Quote Originally Posted by ACalcutt View Post
    This is how I add 10% increments to the smoked glass theme

    start with the stock framework-res.apk
    1.) Decompile framework-res.apk with apk manager 4.9 (option 9)
    2.) Edit
    drawable\stat_sys_battery.xml
    3.) Add new battery icons
    res\drawable-hdpi\stat_sys_battery_0.png
    res\drawable-hdpi\stat_sys_battery_5.png
    res\drawable-hdpi\stat_sys_battery_10.png
    res\drawable-hdpi\stat_sys_battery_15.png
    res\drawable-hdpi\stat_sys_battery_20.png
    res\drawable-hdpi\stat_sys_battery_30.png
    res\drawable-hdpi\stat_sys_battery_40.png
    res\drawable-hdpi\stat_sys_battery_50.png
    res\drawable-hdpi\stat_sys_battery_60.png
    res\drawable-hdpi\stat_sys_battery_70.png
    res\drawable-hdpi\stat_sys_battery_80.png
    res\drawable-hdpi\stat_sys_battery_90.png
    res\drawable-hdpi\stat_sys_battery_100.png
    4.)Compile APK (option 11). I usually do the keep old files option (though i'm not sure its needed)
    5.) At this pont the 10% increments are done, then I add the rest of my theme images into unsignedframework-res.apk. (if i add them before compiling i seem to get an error compiling)
    6.)Sign APK (option 12)

    Attached is the decompiled stat_sys_battery.xml file and the icons I made. feel free to use them.
    I don't use Saphire, but I am using a deodexed FRG83G and this method worked perfectly. Thanks for the tutorial.

Sponsors

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Similar Threads

  1. [MM Theme] Spiderman Battery Icon / The Flash Charging Icon
    By oMenaceTigero in forum Droid Themes
    Replies: 8
    Last Post: 12-06-2010, 10:42 PM
  2. how can i hit one icon on main screen and make a call
    By malpert in forum New Member Introductions & Site Assistance
    Replies: 7
    Last Post: 07-18-2010, 04:13 PM
  3. how to make an icon with bettercut?
    By peterjariel in forum Droid Applications
    Replies: 13
    Last Post: 05-12-2010, 10:12 PM
  4. icon/image question
    By liquidzoo in forum Droid Hacks
    Replies: 2
    Last Post: 02-08-2010, 01:37 PM
  5. how to make custom icon?? help please
    By GOON in forum Droid Themes
    Replies: 1
    Last Post: 01-26-2010, 02:33 AM

Search tags for this page

@drawable/stat sys battery 10 android:maxlevel= ??? 10
,
a10 frameworl-res.apk
,
android battery icon inaccurate
,
android battery icon percentage png
,
android battery icon png
,
android battery icon theme xml file
,

android battery xml

,
android xml png hex battery icon
,
battery icon droid update
,
battery of droid xml
,

brut.directory.pathnotexist: apktool.yml

,
edit stat sys battery.xml
,
hdpi+battery icon
,
link2sd jar
,
public.xml file android
,
stat battery png
,
stat sys battery 10
,
stat sys battery charge.xml
,

stat sys battery.xml

,
theme guide add 1% battery mod to decompile framework.apk sa
Click on a term to search our site for related topics.

Tags for this Thread