yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] Vlad_z:
Batterystats.bin is just a log made by serialization of Batterystats class.

In this class Android OS keep statistics like how much and how long apps was running, how long screen/wifi/bt was on/off, also what was max, min ADC values in milliVolts on lipo battery, etc.

One cell lipo battery has nominal voltage of 4.2V or 4200mV... This is what Android OS should take as a 100%. BTW, overcharging lipo battery over this value is a sure way to reduce cycles - battery life big times. So, if your lipo is charged only to 4190mV - this is a good thing, it will live longer (like 300-400 cycles or couple years).

By deleting batterystats.bin file and letting Android OS serialize a new copy (new log) I cannot see how the same battery can improve and provide twice as much capacity.

Real-time voltage from battery about 3200-3400mV means time to shutdown, battery is depleted... Sure one can discharge battery down to 3000 or 2900 but this will greatly reduce useful life of that lipo.

I see no reason for Android OS look at the percentage which is calculated based on min/max voltage of the previous runs (log file). Instead those min/max values should be "hard coded" by lit-ion technology (4200mV - 100% and something around 3200 - 0%).

And by the way, Android OS does not control charging circuits (telling for how long, lipo should be charged), otherwise it would be impossible to change battery when device is Off. So, charging circuits are implemented in silicon chip and this chip does not care about batterystats.bin file.

May be I missing something, but I doubt... I cannot find reasonable explanation of "Calibration" effect. (btw, I've tried it myself - and no surprise, where was no changes)
[Android Apps and Games] weretiger:
yellow=green

Aiks... :) Yellow=Green.

every time i used this, my battery died @ 22%.

What i did was i charge it until led = Green. shutdown phone, charge until led=Green.

turn on phone charge until LED=Green. Calibrate.

I calibrate when its turn to GREEN..
[Android Apps and Games] marosige:
wiki.cyanogenmod.com/index.php?title=Troubleshooting#Battery_recalibration

2.4

First I read this on CM wiki, tried this and worked. If you read the comments it worked for a lot of people. I don't really know why is it good, but it works if you have battery draineing issues.
[Android Apps and Games] neocheck:
@marosige

if I understand you correctly, I should:

1. charge phone to full,

2. then hit calibration,

3. normaly use the phone untill it shouts by it's selve,

4. recharged it with out a break - that means also you can not power up the phone when the phone is charging.
[Android Apps and Games] stylez:
I would on 4. go for a unbooted charge due to the fact of software v's hardware, the battery holds calibration yet phone software also does this to which is why we get these massive jumps down in battery percentage after charge removed as it's all gestimated by phone and since just given x ammount of mA it's unable to give correct readout.

I may be wrong?

marosige,

Thx have added to sticky :)
[Android Apps and Games] marosige:
4.: you can leave it on. After you put it in to the charger you can turn it on. Phones with cwm can't turn off while charging so it's ok to leave it turned on.
[Android Apps and Games] neocheck:
@marosige

thank's for your quick replay...also one more thing...I have just temporary root access, which is lost when the phone shouts down (and you have again root your phone when you turn it on)...should this pose any problem with the calibration of the battery or with your app...any way...thumbs up for your app...:):)
[Android Apps and Games] marosige:
Root permission is only needed when you want to delete the bin file. So it works with temproot too.
[Android Apps and Games] neocheck:
thank's I will give it a try...report when I am done:)
[Android Apps and Games] crachel:
CWM pushed update to fix the charging issue, so DZ, MT4G, and maybe some others can charge while being off now
[Android Apps and Games] neocheck:
you mean what by that...I should not power up the phone until is fully charged?
[Android Apps and Games] nmadd:
It was touched on briefly earlier, but I didn't see an explanation. Can somebody explain why the mV are so different plugged vs. unplugged? I imagine I should be trusting the plugged in mV?

100% plugged -> 4148mV

100% unplugged -> 4204mV

Plug it back in and back to 4148mV
[Android Apps and Games] libraryclg:
I was able to charge with my TB off yesterday, though it seems the update works for some and not others.
[Android Apps and Games] thomsch:
How can i solve this?
[Android Apps and Games] nmadd:
Attempt to charge it overnight with it turned off.
[Android Apps and Games] Fratboy:
I tried this app on my Droid1. It comes up with a message saying Calibration Failed. Root First.

I am rooted. Superuser icon exists and has apps listed in it (like Barnacle Wifi)...

Any ideas on what to try?
[Android Apps and Games] Vlad_z:
4200mV - 4165mV = 35mV or 0.035V or 0.8%.

What I'm trying to say, it might be a little bit tired battery and/or accuracy of voltage measurements is a bit off.

Btw, portable multimeters got an accuracy of 0.5% on the DC.

So, basically, those 35mV does not make any significant difference for you. To determine if you battery still got a life you have to measure its capacity.
[Android Apps and Games] Anon9mouz:
Well the closest I could get to the 4200 was 4197 so that's where I calibrated from so I will see how it last
[Android Apps and Games] TabletConnect:
The most I get is 4149mv. So far the calibration has not worked for me. I followed the steps and actually did it twice. I haven't noticed any improvements.
[Android Apps and Games] stylez:
Yes as the problem with smartphones is that there are 2 x measurments, one of them being software OS based the other being battery as has built in measurments, this is why we get the turn phone off and reboot and end up with a silly % of battery sometimes even higher than previous OS state, the problem is that the OS uses gestimation based on mA usage.
[Android Apps and Games] marosige:
I'm working on a charging current viewer. With that you have to calibrate the battery when the charging is off. So thats will be more precised than the original percentage and mV viewer.
[Android Apps and Games] undercover:
I used battery monitor widget for that.
[Android Apps and Games] marosige:
I'm using current widget right now for that, but I want to put it to my app and make a notification sound (like it beeps at 100%) so I don't have to check it every 5 minutes :P
[Android Apps and Games] ottuh:
Hi,

I have a LG Optimus 2X Speed. Yesterday the battery was full so I pushed the button 'Battery Calibration'. Now I'm at 16%, my voltage meter says I have 3714mV left.

When I reach 0% should the voltage meter reach 0 also? Or is this wrong thinking of me?
[Android Apps and Games] nmadd:
The voltage will never reach 0 as that would damage the battery. There's a lot to read here, but it is good information: http://batteryuniversity.com/learn/article/low_voltage_cut_off
[Android Apps and Games] corgar:
How a log file can calibrate a battery voltage? ......
[Android Apps and Games] Super_Dork_42:
I just tried the download link and it wouldn't work. I just got a 404 error.

EDIT : I figured it out. The link points to https://https://market.android.com ... when it should actually be just one https:// at the beginning.
[Android Apps and Games] :
battery is charging, 90% & 4231mV
[Android Apps and Games] adl:
After I charged, hit the,magic button, drained battery until the phone shuts off, charge while it's off to 100% and use it normally (for 3 days now by the way, so calibration worked for me) : when should i charge it again? Should I wait till phone is shut down again or more at about 10 - 20%?

Thanks for a short reply!
[Android Apps and Games] :
yesterday night, when was 100% - push calibrate with 4230+mA

Now while charching:

90% & 4231mV

94% & 4236mV

96% & 4238mV

97% & 4240mV

&

jump from 97% to 100%, but still 4240mV

Unplug power &:

97% & 4228mV

97% & 4191mV

97% & 4187mV

97% & 4188mV :) it's true :)

96% & 4181mV

96% & 4178mV

96% & 4168mV

95% & 4171mV it's true :)

95% & 4163mV

EU tme, I'm going sleep ....

PS: Darky 9/5 for Captivate & SpeedMod kernel
[Android Apps and Games] imakul8:
Minor issue...after disabling the notification sound it re-enables itself...woke girlfriend up last night... twice. :D
[Android Apps and Games] streamline:
yes yes yes :) i was looking for this app :)
[Android Apps and Games] RaymondPJR:
Battery Calibration

But you solved everybody's problem. No one really figured out that the battery stats were not really being deleted when done manually. And this is so much easier than the manual procedure anyway. Next to NoLed, this is tops!:D
[Android Apps and Games] moonchy:
Will clearing the battery stats affect battery life or is it just cosmetic?
[Android Apps and Games] X10_minipro:
Really nice!

Will download later today :)
[Android Apps and Games] misterfroyo:
my first post... :)

will try this app and hope for battery improvements! Thanks marosige! :)

NOTE: SGS - Darky's ROM 9.5, Dark Core 1.4 kernel, lagfix enabled
[Android Apps and Games] marosige:
Use it normally. Charge whenever you want.

Thanks I wil fix that.

EDIT: It's https://market.android.com/details?id=com.nema.batterycalibration from the beginning I don't know what's the problem :S

Sorry I will fix that!
[Android Apps and Games] Guashh:
Thank you!!
[Android Apps and Games] ratson:
cheers from Hungary ;)
[Android Apps and Games] marosige:
;) Szia :)
[Android Apps and Games] adl:
Weird: after i did the calibration (even with the suggested battery draining after the battery stats wipe and fully charge while phone is off) i had over 3 days (!) of power (see picture below).

Yesterday the phone shut itself off (battery was finally at zero) and i charged it during night. Rebooted today and now the battery seems to drain fast again, just like it was before the calibration. After 3 hours of nearly no use at all (phone call 5 minutes, searching in market 5 minutes using hsdpa) i am already down to 91%.

Will monitor it some more but so far a bit disappointed after i was happy seeing that the SGS really can last longer than 1 day. :confused:

EDIT:

Ok, looks good so far: 1 day+2 hours of use and still 68% left. :D
[Android Apps and Games] juky77:
Really really nice work. i see it helped many it helped me too :-)
[Android Apps and Games] aragarm:
good work now my battery has a longer life duration than before using your program ! thanks
[Android Apps and Games] lukappaseidue:
Hi all, Hi Marosige.

First Thank You for youy usefull app.

Could You be so gentle to explane how it has to be used?

This is what I0ve done:

I've unlocked my stock NEXUS s with 2.3.3 (manual update)

I've rooted by superboot by MoDaco GRI40

Downloaded Rom Manager and soon after ClockWorkMod for backup up my device

Downloaded and Installed Battery Calibrator by Market

Now what I've to do?

I've charged my Nexy to 98% (the best that NExy could reach)

than calibrate the Nexy

I've used the device until it shut down.

But it seem that battery in less efficient.

What is wrong?

Thank You very much.

Luka
[Android Apps and Games] rhcp011235:
Great work. Love the app. Keep up the good work
[Android Apps and Games] D3abL3:
My question may be weird or stupid but it worth the shot...

Doesn't "Wipe battery stats" on clockwork recovery do the same?
[Android Apps and Games] RaymondPJR:
Battery Calibration

That's part of the reason for this app. Wiping that way actually was not deleting the file.:)
[Android Apps and Games] zeppelinrox:
For those not reaching 4200 mV, you most probably need to do a bump charge which bypasses any info Android could or would use to impede a full charge.

marosige: It's great that you incorporated mV into the app. However, you should use the mV for the calculation as well.

In the OP the screenshot shows 66% at 3882mV

Since 100% is 4200mV and 0% is 3200mV, the math is easy.

So it's (current mV-3200mV) / 1000% (or, more simply, 10)

3882-3200=682/10=68.2%

So the screen cap in the OP is off 2%.

Also, you should try and incorporate the bump charge.

If the phone never reaches 4200mV, let the user delete batterystats.bin but instruct the user that they should bump charge.

For those with freaky phones that will boot up without the battery, try my funky technique ;)
[Android Apps and Games] valve timing:
My battery life has gotten drastically better how often do you calibrate
[Android Apps and Games] Reda88:
morning,

first thx a lot for this wonderful app. I use a DHD mobile phone and after charging it to 100% and calibrating (while on charger) I noticed the improvement on the Battery life. So another time I was near my charger (battery around 54%) I decided to calibrate again and did that with no issues. I think I did that around 3-4 times whenever the battery reached below 50%. Anyhow yesterday I calibrated it when it was full but today when I woke up the phone was turned off and when I turned it on it said plug in charger (the battery was totally drained!!)

My questions are (and I hope they haven't been mentioned before)

When (and how often) should I calibrate?

Is it harmful to calibrate while on charger?

Your app is really fantastic for a first devs app and I hope you the best of luck with later apps

Reda
[Android Apps and Games] marosige:
As I see in the comments something is wrong with the nexus S's battery indicator?

Your device is nearly stock. Battery calibration is needed after flashing a new ROM. You only used the stock ROM and that's why your battery is not miscalibrated and you can't see any changes.

It's almost the same but you don't have to boot in to recovery, and the indicators shows you the battery status so you can calibrate it when it's fully charged.

I will put that to the OP. I don't really like bump charge cause it can be harmful for the battery.

Once after every ROM flashing.

Why did you calibrate your phone when it was around 54%? I wrote it to the OP and to the app that calibrate when it's on 100%. You should calibrate only after flashing a new ROM. It's not harmful to calibrate on charger cause you have to calibrate it when it's on the charger :D
[Android Apps and Games] undercover:
Guys, we need to work out a way to allow phone to be charged to desired mV somehow. I mean actually FORCE phone to charge to set mV. Say, fully charged would be set at 4200 mV. So once phone reaches that, your app would delete bat stats. Or at least, could you make an option which would delete bat stats automatically once 4200 mV is reached? Just food for thoughts.
[Android Apps and Games] imakul8:
My phone never reaches 4200...it gets like 4195 which I feel is close enough, but look at my results when the battery is down to 1%. It's no where near 3200. According to the voltage, I should have a good bit of juice left. If I fully charge my phone while powered on and then power it off and charge, the orange light always turns green within a few seconds. So, charging while powered off or bump charging seems to make no difference in my case. I hate that I'm not getting all my juice.
[Android Apps and Games] Reda88:
I didn't calibrate on 54% I meant that whenever I reached below 50% I recharged my phone and calibrated it after it reaches 100%

But now I know that only one calibration in sufficient.

Thanks again for this wonderful app
[Android Apps and Games] elesjuan:
My battery life wasn't terrible, but figured "what the heck. I've flashed a new ROM, might as well calibrate." Right?

Yeah, that appears to be a bad idea. With nothing running on the phone its completely dead after approx 5 hours, where before it'd last at least 10 at the minimum. Have tried to recalibrate it multiple times without any success

Last night it was dead. Completely dead, wouldn't even power on for a second. Plugged in and 25 minutes later I powered it up to find the batter was now at 100% charge with ~4090mV so I hit calibrate. Unplugged it and 2 hours later was at 8%. Plugged it back in and 10 hours of charging only took it up to 76%, been plugged in for about 90 minutes since and shows 4200mV with 80%. Just now hit calibrate and doing a reboot to boot, along with leaving it unplugged.

Am I missing something? Can this be "undone?" Could I go into my clockworkmod recovery to a previous ROM flash and copy that batterystats.bin file to my SD card, then copy it back after restoring to my current ROM?

*Edit: After the reboot its showing 88% and 4060mV
[Android Apps and Games] marosige:
You can try that. Or simply flash a clean ROM and see how's that draineing your battery. Then nand restore.
[Android Apps and Games] elesjuan:
Well, quick update. I left it on the charger until it reached like 4250mV and 100% Hit calibrate, unplugged and rebooted. Took 20 minutes to drop to 90% and has been going down rather slow. Not using it any, just switching it on to look at with brightness on low, 4g bluetooth and wifi off, full signal strength, and minimal data transfer. Down to 46% already.

It has not improved from yesterday, sadly. What couldve gone wrong??
[Android Apps and Games] valve timing:
Here is my current stats after hitting calibrate
[Android Apps and Games] valve timing:
edit! above post im at 53% battery life on my touch 4g orange glacier rom running faux123 9.9 low voltage kernel on smartass governor
[Android Apps and Games] marosige:
Intresting. Try this.

For step 1.2- Calibrating the battery / You can use my app.
[Android Apps and Games] bobbyphoenix:
Just what I was looking for. Thanks.
[Android Apps and Games] DanteGR:
Don't calibrate the battery repeatedly...

Charge to 100%, hit calibrate button, unplug and let it power off.

Recharge it to 100% and then DON'T push the calibrate button again.

Let it run down to 20% or so and then charge again till 100% WITHOUT calibrating again.

And then use as normal.

That pretty much worked for me!

Btw thanks for this app! :D
[Android Apps and Games] corgar:
Power off till discharge a lithium battery? Calibrate a battery voltage by deleting a log file?

This is an how to kill your battery.
[Android Apps and Games] iamxeph:
Is this manual calibration worth for me if I use 2 batteries a day?
[Android Apps and Games] marosige:
I read this kind of calibration on several webpages. I think it's harmless. Bump charging is much more harmful.

Not really :( Maybe it can help but I don't really know.
[Android Apps and Games] zeppelinrox:
Bump charging can't be worse than letting the battery die.

Batteries actually have built in safety where it overestimates it's mV when full so that it doesn't overcharge and it underestimates is empty mV so it doesn't get too low.

Bump charging is all about

feeding the battery charger first hand information

(

from the battery itself

) instead of second hand information (from Android)

This is a post of mine from another thread:

Anyway, this reminds me, the Milestone overstates the full charge mV and underestimates the low battery mV.

So, if Battery Monitor Widget reports that I have 4230mV when it's fully charge and plugged in... it's really only 4170mV.

When it's reporting empty at 3200mV, it's really at 3300mV.

http://www.android-hilfe.de/root-ha...ku-infos-ladekurven-leistungsverbraucher.html

Apparently,

we are still protected even if we do calibrate the battery.

I'm pretty sure that Payce at android-hilfe actually took that battery out of his phone so I'll go with that.
[Android Apps and Games] Delta25:
hello, very good app it works on my i5500 but it has a bug, the menu looks cutted off on qvga screens like mine, i mean the buttons just say (left one) "recommended" and the right one says just "charged to"

if you can make a qvga version i would be very happy thanks

PD:you also could make a list of phone working i mean

phone works? tester

galaxy I5500 yes Delta25
[Android Apps and Games] marosige:
I will fix it so it will look nice in a qvga screen too. I made the interface using dp (witch is a ratio) not pixels, but it doesn't work correctly. I'm busy right now but I have plans for a future version.

Because batterystats.bin is a system file and it can be found on all android devices it works with every phone. If not, the app notificate you when you open it.

In a future release I will make a charging current monitor in it. That file is located in different files in different phones. I'm working an algorithm which found this file. Maybe with that version I will meake a list.
[Android Apps and Games] valve timing:
I did a fresh install of my rom and kernel and charged my phone to 75% here is a screenshot
[Android Apps and Games] Mylenthes:
I used this app discharged to 20 percent and my phone lasted a day. I found out before calibration, my phone would be at like 50 percent when down to 5 percent or so. I charge my phone at 20 ppercent so i was basically only getting like 50 percent out of my battery.
[Android Apps and Games] elesjuan:
While I really appreciate the effort of the OP this process has completely ruined my handset.

Before I could easily go 10 hours+ without charging. After removing the file with the application the phone is dead in 4 hours.

Anybody want a 400$ paperweight?
[Android Apps and Games] BoscoTM:
Thanks OP, I'm getting 18+ hours per charge. Wifi on, data off, GPS off, and moderate use.
[Android Apps and Games] Brandito:
this app and process can't harm your phone to that extent.

make sure you follow the directions closely, and re-wipe your battery stats.
[Android Apps and Games] bgumble:
BIG THX,

nothing left to say
[Android Apps and Games] lukappaseidue:
Hello guys, hello Marogise.

CONGRATULATIONS FOR YOUR APP. Great.

I uploaded your smartphone up to 100% (4195 mV, most of it was not possible).

I pressed the button Calibration

then I unplugged the charger.

Used the phone until it is off (0%)

Charge the phone up to 100%

I lasted 42 hours with heavy use of phone calls, 3G always on, active widget beautiful updated every 3 hours and other applications that access the web.

GREAT.
[Android Apps and Games] elesjuan:
In my line of work I understand the importance of following directions closely, which is what has happened several times attempting this procedure.

Letting the phone charge to 100% ~4200mV, I press the calibrate button. Unplugging it, three hours later the phone is completely dead when previously it would take over 10 hours for the same result. Recharging back to what the phone thinks is 100% takes a VERY long time to accomplish (plugged in over 8 hours straight) and is still not complete??????

Forgive my extreme frustration, but this procedure has caused my phone to become absolutely unusable.
[Android Apps and Games] thunder2132:
Awesome, I've been looking for a good way to do this :)
[Android Apps and Games] ERamseth:
IIRC, full benefits of recalibration are achieved after 2-3 days. If I understand fully, this gives the device sufficient time to get used to the way the battery is being used.
[Android Apps and Games] zerkai:
Lol. Someones not using their phone... but if it makes you sleep at night! ;-)
[Android Apps and Games] marosige:
If you flash a new ROM, a new batterystats.bin creates. So my app can't make your phone unusable. Do you use a coocked ROM or the stock?
[Android Apps and Games] elesjuan:
I've been using Myn Twopointtwo RLS5 for a couple months now. Battery life was fine until removing the batterystats.bin file.

Without hardly touching the phone it went from 100% to dead betwen my last post and now.
[Android Apps and Games] bgumble:
I use it a lot, but not at the weekend.

You must know that before calibrating my phone was out of juice within one day, without using it :eek: