• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root Fix for status bar battery indicator

bluemax

Lurker
Mar 1, 2010
9
7
Stock battery indicator in the status bar was bugging me, since it was constantly showing more charge than all other battery apps (widgets, Spare Parts...).

After looking in /system/framework/framework-res.apk/res/drawable/stat_sys_battery.xml, I could see that Samsung changed battery level thresholds compared to other Android releases (sources found on net):

explanation2.jpg



I have made a mod which changes the levels to the ones in the right column (source). Tested only on this 1.6 firmware: Baseband version I7500XXJB2, Build number Donut.XXJB6. Do not change /system/framework/framework-res.apk directly, the phone might not boot if it is not signed again after changing! Make all necessary backups!

You will need Metamorph to apply it, but since we have only 1.21 MB available on /system partition with this firmware, we will have to move Maps.apk to /data/app.

The procedure (if you are not sure what each step does, do not proceed):
1. root the phone
2. copy busybox to /data/local/bin and give it execute permissions
3. install Metamorph from the Market
4. mount /system as RW (via "Root explorer", for example)
5. Run Metamorph. It will check for necessary files, and copy zip to /system/bin/zip. You can move it to /data/local/bin/zip to save some space on /system, and create symlink with this: ln -s /data/local/bin/zip /system/bin/zip
6. copy attached Galaxy-BatteryFix-v1.0.zip to /sdcard/AndroidThemes
7. move /system/app/Maps.apk to /data/app. It seems that Maps work fine from that location, after reboot.
8. apply theme from Metamorph
9. reboot

If you have problems with Metamorph and copying zip app, run this command: ln -s /data/local/bin/busybox /system/bin/cp (after renaming /system/bin/cp to cp.old).

To restore the original, use Galaxy-BatteryFixRestore-v1.0.zip.
 

Attachments

  • Galaxy-BatteryFix-v1.0.zip
    1 KB · Views: 537
  • Galaxy-BatteryFixRestore-v1.0.zip
    1 KB · Views: 316
Stock battery indicator in the status bar was bugging me, since it was constantly showing more charge than all other battery apps (widgets, Spare Parts...).

After looking in /system/framework/framework-res.apk/res/drawable/stat_sys_battery.xml, I could see that Samsung changed battery level thresholds compared to other Android releases (sources found on net):

explanation2.jpg



I have made a mod which changes the levels to the ones in the right column (source). Tested only on this 1.6 firmware: Baseband version I7500XXJB2, Build number Donut.XXJB6. Do not change /system/framework/framework-res.apk directly, the phone might not boot if it is not signed again after changing! Make all necessary backups!

You will need Metamorph to apply it, but since we have only 1.21 MB available on /system partition with this firmware, we will have to move Maps.apk to /data/app.

The procedure (if you are not sure what each step does, do not proceed):
1. root the phone
2. copy busybox to /data/local/bin and give it execute permissions
3. install Metamorph from the Market
4. mount /system as RW (via "Root explorer", for example)
5. Run Metamorph. It will check for necessary files, and copy zip to /system/bin/zip. You can move it to /data/local/bin/zip to save some space on /system, and create symlink with this: ln -s /data/local/bin/zip /system/bin/zip
6. copy attached Galaxy-BatteryFix-v1.0.zip to /sdcard/AndroidThemes
7. move /system/app/Maps.apk to /data/app. It seems that Maps work fine from that location, after reboot.
8. apply theme from Metamorph
9. reboot

If you have problems with Metamorph and copying zip app, run this command: ln -s /data/local/bin/busybox /system/bin/cp (after renaming /system/bin/cp to cp.old).

To restore the original, use Galaxy-BatteryFixRestore-v1.0.zip.

Sounds amazing! That would be really helpful... but isn't there an easier way to do this? I currently use fastboot and adb, I can flash a recovery and a custom Rom, but I don't know what busybox or Metamorph are...
Is there any chance you could have some time for writing a simplier guide?

Thanks, anyway!
 
Upvote 0
Sounds amazing! That would be really helpful... but isn't there an easier way to do this? I currently use fastboot and adb, I can flash a recovery and a custom Rom, but I don't know what busybox or Metamorph are...
Is there any chance you could have some time for writing a simplier guide?

Thanks, anyway!

Busybox comes built in with Galaxo 1.6.1. So figure out how to install that if you don't have it installed yet and then you can download Metamorph from the Market. This was the simplest way I could figure. I couldn't find Busybox anywhere for download.
 
Upvote 0
taken from this old post, it works
http://androidforums.com/56711-post6.html

To install busybox on a firmware on the phone, there are a few ways. Easiest is to either use the rooted recovery v3 image or a rooted kernel.

If using the recovery, you'll need to boot up in recovery mode and connect your phone to your computer. For rooted kernel, just connect the phone when it's running normally and make sure adb is enabled in settings.

1. Run "adb remount"
2. Next push busybox with "adb push busybox /system/bin/busybox"
3. Create the symlinks with "adb shell /system/bin/busybox --install -s /system/bin" (you can skip this part if you do not foresee using the rest of the commands that busybox provides)
4. Modify cp's symlink to allow file managers to copy files "adb shell rm /system/bin/cp"
"adb shell ln -s /system/bin/busybox /system/bin/cp"
 
Upvote 0
The problem with Samsung's battery icon tresholds (in various firmwares I tested, from H to J) is that it is showing more charge than actually left, especially in the lower range.

The change in ADC reported levels mentioned above was a step in the right direction, but I feel that Samsung's tresholds were still not tweaked correctly.

On JB2/6, my battery still drains much faster in 40-0 % range than in 100-40 one, so ADC levels still need additional tweaking...
 
Upvote 0
Upvote 0
What Michael said, Samsun is lowering actual readings because they are trying to warn you that the battery is going to die much before than what original readings are. Original readings are suggesting that the battery at 30% will provide more 30% usage time, but it translates to maybe 5%.

I think what Samsung did is fine.
 
Upvote 0
hmm, if this mod makes the notification go yellow before samsung settings, i'm fine with it :) the graph is confusing a bit.

does this thing change only how icon changes states, or changing values of battery percentage readings? i'm used to ignoring the icon and watching only what is the percentage via "systray monitor" app.
 
Upvote 0
This is awesome! I vote to have this integrated in the next Galaxo. Hopefully drakaz will find it interesting.

I 100% agree with you. it is ****ing annoying as **** seeing your battery meeter at 80% green when in fact it is only about 30-20%:eek::mad::mad::mad:. I thought it was my phone but it apears it is samsung flaw! now how could you **** this up so badly???
 
Upvote 0
I am still using 1.5 II5, I need this patch badly because it drives me nuts. will it work with my version? also would you be able to provide a more noob freidnly tutorial?

I already rooted my phone to galaxo many times so I am not a complete noob, I just went back to 1.5 because I feel it is much faster and bug free.
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones