• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[APP][2.1+] Battery Calibration - EASIEST WAY! - Version 1.2 (10th April, 2011)

Search This thread

marosige

Senior Member
Nov 7, 2008
120
311
Budapest
Battery Calibration
[APP] by marosige
version 1.2​

Requirements: Android 2.1+ | Root permissions

Calibration needs to be done after flashing a new ROM, but you can calibrate any time you think your battery is miscalibrated. This program does it by removing the batterystats.bin system file. The OS generates a new clean batterystats file soon, thus any fake information from the previous ROM is removed.
It's suggested, but not necessary, to let the phone fully discharge after calibration, then charged to 100% without break.

The app shows your actual battery status, and only allows you to start the calibration (i.e. removes the file) when it's fully charged, unless you force earlier calibration.
The voltage meter can be useful too. Full charge is around 4200mV.
There is an option to beep when 100% is reached so you don't have to closley follow the changes.

8ycqkx.jpg


DOWNLOAD
Those who had 1.1 or lower installed: you must uninstall before installing from the Market, or else it will say installation unsuccessful, package not signed.
img.php


I tried this and it WORKS! (Also works on HTC HD2 Nand version.)
I'm not responsible for any damage or losses of any kind caused by the use or misuse of the program!


;)If you like this app, feel free to buy me a few beers ;)

All donations are received with thanks!


Thank you for donating:
RaymondPJR
Ramiro Doporto
Sebastien Cau
Robert Schmelz

Change log:

BatteryCalibration V.1.2 (10th April, 2011) - From Market
  • Option to beep when 100% is reached
  • Voltage meter added
  • New icon
BatteryCalibration V.1.1 (9th April, 2011) - BatteryCalibration_v.1.1.apk
  • Runs on Android 2.1+ devices
  • Checks for compatibility
  • Added a switch to force earlier calibration
BatteryCalibration V.1.0 (6th April, 2011) - BatteryCalibration.apk
  • Initial release
  • Runs on Android 2.2+ devices
 
Last edited by a moderator:

zeppelinrox

Senior Member
Dec 21, 2010
9,374
21,587
IN THE FREAKIN' OP
What if the battery is not calibrated to begin with?

You can delete batterystats.bin while its charging.

Batterystats will get recreated if you were to unplug it.
Otherwise, it get recreated at the boot logo before the animation.

So you can delete it while it's charging, let it charge it up to 4200mV + 15 minutes or so.
Leave it plugged in.
Shut down, take out the battery, start it up and you get a battery screen with the ? and then pop the battery back in and it will show 60% at first and if it's fully charged, it will show 100% soon enough.

Not sure if it works on other phones, but on droids and milestones you can boot the phone up without the battery.
This way to calibrate is pretty cool.

After deleting and charging, reboot phone normally but take the battery out before the logo and the phone keeps on booting.
Then you pop the battery back in at the lock screen and you can monitor everything with battery monitor widget.

Anyway, full guide in in my signature.
 

marosige

Senior Member
Nov 7, 2008
120
311
Budapest
What if the battery is not calibrated to begin with?

You can delete batterystats.bin while its charging.

Batterystats will get recreated if you were to unplug it.
Otherwise, it get recreated at the boot logo before the animation.

So you can delete it while it's charging, let it charge it up to 4200mV + 15 minutes or so.
Leave it plugged in.
Shut down, take out the battery, start it up and you get a battery screen with the ? and then pop the battery back in and it will show 60% at first and if it's fully charged, it will show 100% soon enough.

Not sure if it works on other phones, but on droids and milestones you can boot the phone up without the battery.
This way to calibrate is pretty cool.

After deleting and charging, reboot phone normally but take the battery out before the logo and the phone keeps on booting.
Then you pop the battery back in at the lock screen and you can monitor everything with battery monitor widget.

Anyway, full guide in in my signature.

Batterystats.bin will get recreated 2-3 minutes after deleting the file too. So reboot is not necesarry.

I have an HTC Desire HD. HTC and Samsung (and othere) phones can't boot up without battery. So this is the best way to do it in these phones.
But I will put a switch in my app so you can delete batterystats before chargeing it to 100% so people with droids or milestones can use your guide too, and can delete batterystats with my app.

Sent from my Desire HD using XDA App
 

zeppelinrox

Senior Member
Dec 21, 2010
9,374
21,587
IN THE FREAKIN' OP
Yeah i figured it would not be universal that a phone can do no battery boot.
You should explain more fully in OP the remaining steps after deleting the bin file.

Sent from my Milestone using Tapatalk
 

marosige

Senior Member
Nov 7, 2008
120
311
Budapest
got a problem with this one....my nexus s battery stops at 99% tried pulling charger out and in trick reboots etc nothing gets it up to 100% any ideas?
I had the same problem when I first used my brand new batterey. It solved the problem when I fully discharged the batt. (the phone turned off) then when I charged it the phone showed 100% and I could run the app. Try this, if it's not working I willi figure out something else.
 
Last edited:

marosige

Senior Member
Nov 7, 2008
120
311
Budapest
You should explain more fully in OP the remaining steps after deleting the bin file.
What remaning steps are you thinking of? The calibration is ready after deleting the bin file. It's suggested, but not necessary, to let the phone fully discharge after calibration, then charged to 100% without break. Thats all.
 
Last edited:

adamantypants

Senior Member
Nov 8, 2008
297
37
las vegas
I'm genuinely asking since I don't know much about battery reads, but what's the advantage of using this over say just deleting battery stats in a recovery then fully charging/discharging?
 

marosige

Senior Member
Nov 7, 2008
120
311
Budapest
I'm genuinely asking since I don't know much about battery reads, but what's the advantage of using this over say just deleting battery stats in a recovery then fully charging/discharging?

It's almost the same. The only difference is that this app only let you delete the battery stats when your phone is fully charged so your battery will calibrated correctly.
The othere advantages are: you don't have to boot into recovery and use the volume rockers to navigate on the screen, you just have to start the app and click on the button. Booting in to recovery then rebooting takes some time and maybe you miss a call while you're in the revocery. Or if you have the original recovery and your phone is rooted you can still delete this file if you think that your battery is not calibrated correctly.
 
  • Like
Reactions: el-jodio

Top Liked Posts

  • There are no posts matching your filters.
  • 274
    Battery Calibration
    [APP] by marosige
    version 1.2​

    Requirements: Android 2.1+ | Root permissions

    Calibration needs to be done after flashing a new ROM, but you can calibrate any time you think your battery is miscalibrated. This program does it by removing the batterystats.bin system file. The OS generates a new clean batterystats file soon, thus any fake information from the previous ROM is removed.
    It's suggested, but not necessary, to let the phone fully discharge after calibration, then charged to 100% without break.

    The app shows your actual battery status, and only allows you to start the calibration (i.e. removes the file) when it's fully charged, unless you force earlier calibration.
    The voltage meter can be useful too. Full charge is around 4200mV.
    There is an option to beep when 100% is reached so you don't have to closley follow the changes.

    8ycqkx.jpg


    DOWNLOAD
    Those who had 1.1 or lower installed: you must uninstall before installing from the Market, or else it will say installation unsuccessful, package not signed.
    img.php


    I tried this and it WORKS! (Also works on HTC HD2 Nand version.)
    I'm not responsible for any damage or losses of any kind caused by the use or misuse of the program!


    ;)If you like this app, feel free to buy me a few beers ;)

    All donations are received with thanks!


    Thank you for donating:
    RaymondPJR
    Ramiro Doporto
    Sebastien Cau
    Robert Schmelz

    Change log:

    BatteryCalibration V.1.2 (10th April, 2011) - From Market
    • Option to beep when 100% is reached
    • Voltage meter added
    • New icon
    BatteryCalibration V.1.1 (9th April, 2011) - BatteryCalibration_v.1.1.apk
    • Runs on Android 2.1+ devices
    • Checks for compatibility
    • Added a switch to force earlier calibration
    BatteryCalibration V.1.0 (6th April, 2011) - BatteryCalibration.apk
    • Initial release
    • Runs on Android 2.2+ devices
    8
    What if the battery is not calibrated to begin with?

    You can delete batterystats.bin while its charging.

    Batterystats will get recreated if you were to unplug it.
    Otherwise, it get recreated at the boot logo before the animation.

    So you can delete it while it's charging, let it charge it up to 4200mV + 15 minutes or so.
    Leave it plugged in.
    Shut down, take out the battery, start it up and you get a battery screen with the ? and then pop the battery back in and it will show 60% at first and if it's fully charged, it will show 100% soon enough.

    Not sure if it works on other phones, but on droids and milestones you can boot the phone up without the battery.
    This way to calibrate is pretty cool.

    After deleting and charging, reboot phone normally but take the battery out before the logo and the phone keeps on booting.
    Then you pop the battery back in at the lock screen and you can monitor everything with battery monitor widget.

    Anyway, full guide in in my signature.
    4
    Let's back up this train for a moment, shall we? It is not a matter of opinion that this app cannot positively affect battery life or battery charge indication. It is a cut and dry fact that this app can have no real positive effect and following its outdated advice can actually be detrimental.

    Calibration needs to be done after flashing a new ROM, but you can calibrate any time you think your battery is miscalibrated.
    The file which this app wipes lies in the /data/system partition. When you flash a new rom, the partition is formatted and the new files are written to the partition. Thusly, the app does nothing that has not already been done.

    The second problem with the above statement is that level of charge reporting is a function of an integrated circuit on the battery itself. The lithium based batteries that are used in our devices sport their own internal fuel gauge. The level of charge that you see is pulled from the battery and deleting a random file on the device will not affect what's reported by it. Every so often, the battery's fuel gauge may go a percent or two off, although this has no effect on its operating time since the PMIC of the device uses the battery's voltage to determine when to shutdown.

    Okay then, since this app doesn't work to calibrate a battery and they may occasionally misreport, what is a user to do? The simple answer is just a single complete discharge/charge cycle. This is something you don't want to do too often, however- more on why later.

    This program does it by removing the batterystats.bin system file.
    Dianne Hackborn has weighed in on the myth of deleting batterystats.bin over a year ago. For those who do not know who she is, Mrs. Hackborn is Google's Android Framework Engineer. As she has been coding for Android since the AstroBoy, Bender and R2-D2 versions (early alphas that only saw internal release), I would tend to qualify her as a subject matter expert. Her direct quote...

    Today's myth debunking:

    'The battery indicator in the status/notification bar is a reflection of the batterystats.bin file in the data/system/ directory.'

    No, it does not.

    This file is used to maintain, across reboots, low-level data about the kinds of operations the device and your apps are doing between battery changes. That is, it is solely used to compute the blame for battery usage shown in the "Battery Use" UI in settings.

    That is, it has deeply significant things like "app X held a wake lock for 2 minutes" and "the screen was on at 60% brightness for 10 minutes."

    It has no impact on the current battery level shown to you.

    It has no impact on your battery life.

    Deleting it is not going to do anything to make your more device more fantastic and wonderful... well, unless you have some deep hatred for seeing anything shown in the battery usage UI. And anyway, it is reset every time you unplug from power with a relatively full charge (thus why the battery usage UI data resets at that point), so this would be a much easier way to make it go away.

    There you have it- the one and only thing being deleted is merely a list of what has been consuming battery since last charge. The problem with this is that it hinders the causal user from troubleshooting what is actually may be causing undue battery drain.

    The OS generates a new clean batterystats file soon, thus any fake information from the previous ROM is removed.
    As stated, the file is automagically cleared by unplugging the device after charging. This makes the app doubly pointless. Further, if one flashes a new rom, the partition upon which the file resides has been formatted and rewritten. On that note, if you've been dirty flashing between roms, then the info in batterystats.bin will be the least of your worries.

    It's suggested, but not necessary, to let the phone fully discharge after calibration, then charged to 100% without break.
    This is where there be dragons. Complete discharge/charge cycles are not a best practice with lithium polymer batteries. They will shorten the overall lifespan of the battery as these batteries have a finite number of cycles in their lifetime. They may, although rarely, render the battery totally unusable. Additionally, some devices, such as the Nexus 7, will go into a sort of hibernation to prevent the battery from too deep a discharge after the point of shutdown. If this automatic protection is triggered, the device will not boot or charge until the protection is reset.

    That being said, there are situations where one may wish to intentionally perform a complete cycle, such as the aforementioned calibration of the battery's fuel gauge. I'd only advise it once every few months if you feel that your reported charge may not directly correlate to the battery's actual state.

    The app shows your actual battery status, and only allows you to start the calibration (i.e. removes the file) when it's fully charged, unless you force earlier calibration.
    Again, we come to the fact that the file in question is automagically wiped by Android anyway.

    The voltage meter can be useful too. Full charge is around 4200mV.
    Credit where credit is due for this factually accurate statement. Additionally, I'll concede that, at the time the OP created the app and started this thread, the groupthink was contrary from what we now know to be true

    There is an option to beep when 100% is reached so you don't have to closley follow the changes.
    Pointless, but that's neither here nor there at this point.


    When the OP created this app, the conventional wisdom was that, by virtue of its name, a file called batterystats.bin was obviously related to battery indication and that deleting it would wipe the slate clean and start users anew, so to speak. This is now widely known not to be the case. However, despite the facts, post hoc logical fallacies keep the fiction alive. It's high time the myth of battery calibration via deleting batterystats.bin be taken off life support and allowed to die.

    Some good introductory reads pertaining to the subject...
    https://plus.google.com/105051985738280261832/posts/FV3LVtdVxPT
    http://batteryuniversity.com/learn/article/how_to_prolong_lithium_based_batteries
    http://batteryuniversity.com/learn/article/battery_calibration
    4
    got a problem with this one....my nexus s battery stops at 99% tried pulling charger out and in trick reboots etc nothing gets it up to 100% any ideas?
    I had the same problem when I first used my brand new batterey. It solved the problem when I fully discharged the batt. (the phone turned off) then when I charged it the phone showed 100% and I could run the app. Try this, if it's not working I willi figure out something else.
    3
    Thank's ,, 'must have' ulility.;)