yashsingh1/xdaforums huggingface dataset:
[Galaxy S II General] Entropy512:
This is standard for Lithium-Ion batteries (of most chemistries - there are exceptions, but our device is not one of them.)

The standard charge cycle for a Li-Ion is as follows:

Constant current (aka current-limited) initially, until battery voltage reaches approximately 4.2 volts.

Once the battery hits 4.2 volts, it is constant-voltage (battery his held at 4.2 volts)

Charge termination is done by monitoring the charge current in the CV phase. Once the current drops to around C/10 (e.g. 165 mA for most GSIIs), the charger is shut off. I need to double-check this number.

As the original post hinted, and I have confirmed by reading kernel source - this advice is applicable to most HTC Android devices, and other devices (such as the Galaxy Tab 10.1) that have "coulomb counter" type fuel gauges. These measure the current in/out of the battery periodically and sum it up - Slowly, their estimate of state of charge will "drift", which is why they occasionally need to be recalibrated.

The Maxim fuel gauge IC used in first-gen GalaxyS devices needs no calibration, and in fact, is designed specifically to be "convergent" rather than "divergent" - i.e. if it is initially "uncalibrated", it will converge on a correct state of charge estimate after a few hours, regardless of initial conditions. See http://www.maxim-ic.com/datasheet/index.mvp/id/6621

The MAX17042 in the GSII (I9100 and I777, probably SPH-D710 also) is an improved version of the 17040. While it does, unlike its predecessors, have a current measurement function, it is not used right now (see kernel sources) - so it's functionally almost identical to the 17040 for us.

This fuel gauge assumes the battery is in a "relaxed" state initially - so ideally, if you want the best "calibration" - pull the battery for an hour or so, so that it is "relaxed". If this seems to long to you - overnight idle drain will be low enough that any State of Charge (SoC) estimates will converge, regardless of initial conditions.
[Galaxy S II General] afilopou:
90 seconds for the chip no longer powered.Which chip?
[Galaxy S II General] ithehappy:
I don't wanna know what is exactly meant in first post but all that this method DOES WORK. I was having a nuisance full charge notification bug at 96-97%, I without any hope did the method said in first post and it just worked. So Thank You very much for posting this very useful post.

It's time to get rid of the gobs posted above by some plastics.
[Galaxy S II General] pikaone:
works fine !
[Galaxy S II General] ram3n:
To sum up, I am referring actually to the chip wich manages "battery calibration".

Good to hear such good feedbacks guys :)

Really pleased to share my experience.

thumbs up ! :)
[Galaxy S II General] coolfire:
Wow, couldn't have put it any clearer.... :D
[Galaxy S II General] tsinc:
it's working, for sure
[Galaxy S II General] Entropy512:
BTW, if you tried to do any of the "invalid" calibration methods that mess with batterystats.bin and are now getting horrible battery life, check to see if you're getting a long fuel_alerted wakelock in /proc/wakelocks

There's a kernel bug where if the fuel gauge drops below a certain value, and then rises above it without EXACTLY hitting it will cause a permanent wakelock.

Kernel developers: To fix this problem for your users, the fix is here: https://github.com/Entropy512/linux_kernel_sgh-i777/commit/fc9eb85807302583259e27013ed184a43107bb67

I haven't figured out WHY the fuel gauge will briefly "glitch low", but it does for some people causing this permanent wakelock.
[Galaxy S II General] ram3n:
Interesting news.

However, never had this issue with my current ROM.
[Galaxy S II General] carotteman:
Come for my feedback

It works.

Good battery when the phone is not use and as usual more battery when i use it.

But it's just the first cycle of charge. I will see in the future how my battery goes.

Will post a graph after full discharging.
[Galaxy S II General] morbidoso88:
Thank you i try
[Galaxy S II General] MJDdeLacerda:
Hi ebraga, I had the same problem as you and it was, indeed, my battery. It somehow braised and didn't even fit like before, the battery cover was stewed... Doesn't need to say I had do buy another battery, so, I bought 3, 1 original and 2 similars.

Even if it isn't the way I described, the problems are exactly alike, and I believe your battery is, in fact, dead. Sorry for bringing you bad news.
[Galaxy S II General] ebraga80:
yes...... you're right! I got a new battery and the phone is back to life :good:
[Galaxy S II General] insaf_mohd:
Wow!!
[Galaxy S II General] Wunjo:
Lithium-ion polymer batteries

Yap, generally, Lithium-ion polymer batteries, after full charge cycles above 500 times,

the capacity of battery to be diminishing :eek:

Like the water reservoir sludge, reduce its capacity....can't keep water like before :o

old Bat. usually can't keep the voltage normally, may cause the display going blink or turn off immediately...etc

The best way to keep the bat. 20%~80%, another way is taking $$ from ur wallet and....you know that :cool:
[Galaxy S II General] ebraga80:
yes...... but only costs 10€ at ebay Germany, so, 10€ every 2 years is not that bad ;)
[Galaxy S II General] livingindoubt:
I guess I'll give this a shot. Today, just during my bus ride home from work (roughly 1.25 hours) my battery dropped from ~50% to 15%. I know that I'm to blame for my battery being crap, since I didn't know until today that you shouldn't fully drain your battery. Hopefully this can give my battery some more life again.

I will follow up later with my results.
[Galaxy S II General] sripathi6:
can anyone fix this issues

i'm using my friend mobile Samsung galaxy S2 (I9100)

i'm facing battery issues and often restart automatically..

so now changed rom (slmkat 4.4.2) also tried by another charger :eek:

even now issues like battery showing 80% then sudden drop then again its increasing gradually (without the charger) i got mad by seeing this...so i flashed SLIM KAT official 4.4.2 (earlier neat rom4.1.2 then custom 4.4.2) OS by thinking software issues... but after that also same issues then bought new battery by thinking battery issues due to its little bit bulged (very little) but after that also same issues

now charging the battery but the mobile turned OFF condition, while connect the charger it shows 85% after 4 hours its decreased to 56% :crying:
[Galaxy S II General] mosespl:
The same situation like my father. He has a s3 mini and when he plug in charger there is a signal meaning that phone is charging but battery never charged and only solution was samsung service and varanty. They replace whole motherboard but i think the problem was only a... I dont know how is it english but socket for charging or something like that cheap part and home working i think and thwre will be no problem

Wysłane z mojego GT-I9100 przy użyciu Tapatalka
[Galaxy S II General] scandiun:
I've checked at Cyanogenmod for i9100, and apparently it's patched there. But how can I tell that cm-10.1.3-i9100 is patched?

https://github.com/CyanogenMod/sams...g-2.6.35.7/drivers/power/max17042-fuelgauge.c
[Galaxy S II General] pipyakas:
This one doesnt work, tested and still get battery drops after reboot
[Galaxy S II General] Galaxy pop Plus:
did'nt understand the last step can you explain please ?

After that, you can make some cycle of fully charge/discharge to ~15/20% TO complete the method :confused:
[Galaxy S II General] jammerlee711:
if you rooted your device you can find this option in Dorimanx kernel...a great kernel nonetheless
[Galaxy S II General] JavFlo:
Well this is something. Does anybody have a GS2 D710 with Villuminati on it? Freshly installed, battery life life was awful, but apparently using a calibration app seemed to fix it, despite what is said on this forum. I'm new and I can't post into a dev forum yet.
[Galaxy S II General] Kushal19:
Thanks for the great tips=p It's appreciated.
[Galaxy S II General] Robby68:
Good Tips. Thx
[Galaxy S II General] Roxxors:
Thanks for the tip!
[Galaxy S II General] GadgetAvi:
Hi guys,

My mom's device (S2 I9100) has this problem, it won't charge to 100%....

So I ordered new Original battery + New charger from Samsung store in my country.

It was fine for a few days and then it started again, today the device reached 50% and won't charge anymore...

I opened it up, removed the battery for 2 minutes, and then turned on the device and it was on 8% (?!?@?@#)

It's drives me crazy, I can't figure out what's wrong with it, I did tried battery calibration App when it reached 100% last week,

but here we are and the problem returned...

Some info: I'm running stable version of official CM11-M12, everything else is perfect in this rom!

And before CM11, I was on some Samsung based custom rom and the problem existed even then...

I remember that there used to be a "Reset battery stats" option on CWM under "advanced" but in my current CWM there inst such thing.

What do I do?

Thanks!
[Galaxy S II General] kai1313:
hello

did we need re-calibrate the battery after reset fuel gauge chip?

i use fuel gauge tool apps to reset
[Galaxy S II General] issy_i:
hello people, i recently switched to an extented battery on my S2, the 3200mAh. do i need to do this trick or not? i dont know if the fuel-Gauge chip recognoze the 3200mAh battery propperly and do i need this "reset" to get the most out of my battery?

my phone last longer than the original 1650mAh thats for sure.
[Galaxy S II General] daniu:
Hi,

for those who still believe in deleting batterystats.bin:

just found out that tasker can do all that is required (one more app that becomes unemployed because of tasker):

create a profile that waits until the battery is at 100%

create a task that is fired in that moment

add these actions to the task:

-File - move /data/system/batterystats.bin to /data/system/batterystats.bin-%DATE-%TIME - tick "use root"

-Tasker - "Profile Status" "profile that fires this task" "off"

like this the profile only needs to be turned on once you want to calibrate.

It will save the old file with the date and time and will switch off the profile afterwards

And now stone me - maybe it is placebo but for me deleting the file helps plus: I do not want to take my phone out of the cover each time I flash a new rom

regards
[Galaxy S II General] Web_Monster:
Is this working on S2G?
[Galaxy S II General] ram3n:
Waiting for your battery graph.

Don't forget to tell us your current ROM + kernel.

Cheers :p
[Galaxy S II General] AndroidGX:
Wow, finally you did it. Was waiting this kernel fix since I bought my SGS2, you'r THE man ! :cool:

Just tried latest Siyah's b13 kernel which integrated your fix and all I can say is wow what a difference! Battery didn't moved from 100% below once unplugged AC and still 100% after 4h23 idle deep sleep with wifi+sync. Before it was like 98 or 96% already.. :D

Thanks man !
[Galaxy S II General] carotteman:
Sorry , I've just change rom this morning.

I'm on checkrom revolutionHD with siyah kernel 1.7.8

I'll do your tips when my battery will be full charged (In 1/2h i think) and will come back again for graph
[Galaxy S II General] ram3n:
Mate,

If I may, you are asking something in the wrong thread.

My nickname isn't LeoMar or even Check :D
[Galaxy S II General] Universeal:
I tried and for me i does not work. Same baterry drain and it's a huge battery drain.
[Galaxy S II General] ram3n:
in this case, maybe it's another problem.

You should take a look at wakelocks... ;)
[Galaxy S II General] el_mekawy:
thanks for the TIP :)
[Galaxy S II General] Canadoc:
Hey Montrealer here just got a S2.

Upped Rom to xxKI4.

Battery l9fe so far is much worse than my iphone.

With not heavy use I am getting 12-18 hours out of it.

Your battery stats are amazing!!!!

Can you tell me if you are running exchange? what settings are you using for your e-mails and other widgets etc.

Am wondering if something not obvious is draining battery in background.

Also am unlocke don Rogers?

Given this is a HSPA+ phone is there some setting in service menu that need to be changed that might be causing my drain on the 3g network of Rogers?
[Galaxy S II General] AndroidGX:
Hmm finally I was wrong.. :(

I unplugged this night like always, after a full 100% charge and the percentage immediately dropped at 98%, like before.. :mad:

I plugged AC back, and waited till 100% back and dropped again immediately at 99% right after.. :/ I stoped.

Battery dropped 2% until the morning with same settings as my previous post (with screenshot) here, so finally the fix changed absolutely nothing for me :( damn..
[Galaxy S II General] ram3n:
You re welcome :-)
[Galaxy S II General] tarloc:
nice post thank you
[Galaxy S II General] nicksnoobie:
Thanks for proper calibration
[Galaxy S II General] ram3n:
Thumbs up !

Thanks for testing !

:D
[Galaxy S II General] Entropy512:
Then your drain has nothing to do with calibration.

Honestly, few people, if any, should have to even do the calibration steps presented in this thread. It should only be necessary if your fuel gauge seems to have "wigged out":

1) a sudden jump in percentage on the order of 10% change or more, instantaneously

2) State of charge percentage wildly inconsistent with raw battery voltage. Such as reporting 30% with a voltage over 4.0 volts.

That's about it. Other than that, in general, the gauge should be convergent over time.
[Galaxy S II General] volapyk:
+1

I don't get why some devs recommend calibration after flashing a new rom. If I get drain it's usually an app. Otherwise I do a full discharge/charge. I don't if these calibration tips work for some but after every rom flash, no.
[Galaxy S II General] Entropy512:
I believe some of them may be resorting to old habits from their days as WinMo/HTC owners.

Many WinMo devices did have fuel gauges that required calibration/learning cycles, and I believe many HTCs still do.

However I think fuel gauges have gotten a bit "smarter" and are less likely to become extremely divergent nowadays, even for other devices.

For example, the Nook Color does have a fuel gauge that requires calibration, and apparently some CM7 ports were improperly reloading the cal data, causing all sorts of state of charge estimation problems.
[Galaxy S II General] Pryda:
Strange, since I made this trick got a problem with my phone. It's constantly in charge mode on/off instantly, as if I was playing with the charger connecting and disconnecting it all the time... of course it's killing my battery.

just wtf? someone has an idea?
[Galaxy S II General] yepssss:
@Entrophy512

Did it per your description. Will return with a shot og todays usage.

Regards

Sent from right here
[Galaxy S II General] Entropy512:
Maybe you didn't reinsert the battery properly? Sounds like a loose connection of some sort to me.

After all, all this really is, is a battery pull and reinsert.
[Galaxy S II General] strenx:
I tried your tip but it does not worked about scaling graph battery bug. :-[
[Galaxy S II General] AndroidGX:
OK..

I finally did it ! :D

I was really but REALLY sceptical about this method, but I recognize that it's so far the best "calibration" method you can get about the battery for SGSII.

Since I did it, battery charge at his real 100% and no more surprise after unplugging from charger.

I generally take out my battery few mins, it's enough suffisant, I would say 90 seconds is not enough and 1 hour is too much. 5-10 minutes is perfect.

I do this everytime when I got a freeze or sleep of death (I got many, after trying all those kernels :D).

Battery graph is now ok for me, I can confirm no more bugs on it, smooth ascending line.

Thanks Entropy512 and ram3n ! :cool:
[Galaxy S II General] ram3n:
Glad to hear that dude ! This is indeed the simplest way, and no root needed.

:D

Go go S2 community for sharing ! :)

cheers
[Galaxy S II General] ram3n:
You're welcome mate :)

Now, enjoy fully your little monster SII !

Cheers :D
[Galaxy S II General] Julian1984:
I tryed it and... 11% and 3616mV... same as before... at 1% 3600 mV more or less...

What can I do? It should be at more percent with those mV, isn't it?

Thanks!
[Galaxy S II General] profi208:
Just tried it earlier today..

Very simple and easy to execute..

Currently working very well..

Thanks man!
[Galaxy S II General] Lownita:
Just to get this right: Deleting batterystats.bin doesn't have any sense, no matter if I flashed a new rom or whatever I did?
[Galaxy S II General] ram3n:
You're welcome mate ;)

You're right. It doesn't "work".

Just follow my tutorial, very simple but so efficient :D
[Galaxy S II General] Entropy512:
The voltage will vary a bit with load... Really, you should only be worried if they're way out of sync, like over 4.0 volts and indicating below 50% at the same time.
[Galaxy S II General] supergoosepro:
Doesnt work for me..did i do anything wrong? using the original stock 1650 mah sam battery.

Waited 5 minutes instead of 90secs as recommended by one guy in the forum
[Galaxy S II General] Lownita:
"3. When getting 100% signal, unplug quickly." Is this important? Because I charged the phone overnight!
[Galaxy S II General] Pfeffernuss:
Yes, do it within 1.25 seconds maximum. Otherwise this "very accurate" way of calibrating the battery does not work.

So keep a very close eye on the battery indication. Waiting too long will void the whole procedure...
[Galaxy S II General] Entropy512:
You can do this at any state of charge level... Doesn't have to be 100%.

Only thing that matters is that the fuel gauge starts collecting data with the battery in a "relaxed" condition.

Or you can just let the thing sit with the screen off overnight - idle drain is so low that the battery will be "relaxed" for all practical purposes and the fuel gauge will converge.

The key thing here - unlike HTC fuel gauge chips, ours converges over time towards reality, instead of "drifting". The only reason to ever perform this procedure is for those occasional times where the gauge "glitches" - if you see a sudden instantaneous jump of 20-30% - do a battery pull for a few minutes and whatever it says afterwards is reality. Our fuel gauge chip is self-calibrating and should never need any manual calibration procedures unless it glitches. This thread is just for those that insist that somehow, our gauge still needs some form of calibration.

(Most likely, the post-"jump" level is reality and the "jump" was the gauge resetting itself.)
[Galaxy S II General] Z4muZ:
There is a strange behavior I remarked these few last days.

Each time I calibrate via battery pulling out method (1 time a day), battery stats drops itself 5-10% after booting. Is this normal ? you guys have same problem ?
[Galaxy S II General] Lownita:
Never seen that :confused:
[Galaxy S II General] Schindler33:
Why do you do that once a day? Haven't you read, that the battery calibrates itself by using and charging it.
[Galaxy S II General] ekjl:
Yesterday I experienced the glitch where it instantaneously dropped by 20-30%. I'm on the official MIUI ROM. Before I powered off, I was at 46%(ish) I powered off the device for probably 2 minutes. Powered back on and got a "plug in your device" message. I thought that was wierd and noticed it read I had 13% battery left.

I will try the method in the first post to recalibrate my battery.
[Galaxy S II General] ram3n:
This is exactly the case which requires a battery calibration.

Should 100% work for you :)
[Galaxy S II General] Entropy512:
Yup - although it should be noted that the "glitch" may have been the fuel gauge resetting itself, and the "post-glitch" value is what you'll see after a battery pull.
[Galaxy S II General] Sergeant Droid:
Hey this really works! Thanks!
[Galaxy S II General] ram3n:
you're welcome dude :D
[Galaxy S II General] RONIK56:
thank u!!!

does it work on other phones?
[Galaxy S II General] ram3n:
No, you have to check if others have new MAX17042 drivers.

cheers :p
[Galaxy S II General] CobraManEng:
Ok so I have 2 battered, I official samsung and 1 unofficial, at first I had really bad battery life from my unofficial but for the last 2 days it's been ok, not brilliant.

I have kept the unofficial battery in my phone and carry the samsung battery as a spare in my wallet ( the reason I bought a spare)

What am I supposed to do? They are both 1650 mAh, all I want to do is keep a fully charged spare and get good performance from both..... Help me out guys please, I'm a noob, but not stupid ;)
[Galaxy S II General] crypticc:
Always keep them charged I guess and never swap to a partially charged battery
[Galaxy S II General] Mechanisms:
Problem with battery "jumps"

After finding out that my battery would charge up to 100% and then fall to 96% as soon as I unplugged the charger I also found out that whenever I would do a battery pull and turn my phone back on the battery would have drop (sometimes 5%, sometimes as much as 20%).

I did the battery calibration as described here and it held an 100% as it should. I let it go down to 60% approx. and noticed that it wasn't going down as normal. So I did a battery pull and when I turned the phone back on it had dropped to 55%. So this problem continues.

I say problem because I don't think it's normal...but is it? Any idea what the problem could be?

I have stock 2.3.5
[Galaxy S II General] Entropy512:
Anything with a MAX17040 or MAX17042.

17042 is only present in Exynos-based GS2s to my knowledge.

17040 is present in basically the entire first-gen GalaxyS line. (Anything Hummingbird-based).
[Galaxy S II General] grgsiocl:
i did the battery calibration as mentioned and after i switched on the phone, the battery stayed at 100%> when i checked with battery widget pro, It shows at 100% it was 4192mV and at 99% 4108mV. Is it means the battery is not fully calibrated?
[Galaxy S II General] Entropy512:
The battery voltage drops almost immediately after removing a charger, because the charger forces it upwards.

4192 mV = reading taken at the end of charge cycle but prior to charge termination.
[Galaxy S II General] max621:
After evaluating from last few days.. Now I can say that my battery on average gives me 1-2 hours extra as compared to the similar use before applying this calibration technique.

Thanks mate for the tip..
[Galaxy S II General] ram3n:
Glad to hear that !

You're welcome dude :D
[Galaxy S II General] Entropy512:
Sorry man, there's no way this technique can actually change your battery life. It'll just correct the charge estimate if it gets way off - but it'll usually converge within a few hours anyway.

Let me be clear again - performing this trick only makes sense if you think your battery fuel gauge is SERIOUSLY out of wack, such as showing <50% state of charge and a voltage over 4.0 volts.
[Galaxy S II General] jr_718:
Interesting tips..
[Galaxy S II General] SGS-II:
A quick question, how do you tell if your phone is fully charged when it's turned off?
[Galaxy S II General] (^.^):
DO you mean make sure as long as it's more than 90 seconds?:rolleyes:
[Galaxy S II General] ram3n:
You will get a 100% green signal on screen when done.
[Galaxy S II General] ram3n:
You can actually wait for more than 90 seconds if you want, for sure dude! :)
[Galaxy S II General] (^.^):
Thanks dude~ :)

My friend has just got his S2, he has battery drain fast issue. I'll ask him to try your method~:)
[Galaxy S II General] ram3n:
You're welcome dude :)

Plus Don't forget to check for wakelocks which are actually the first cause of massive battery drain.

Sent from my little monster GS2
[Galaxy S II General] spsf:
Thank you, seems to work!
[Galaxy S II General] Echoflyer:
Thank's a lot, it's the best way for my I9100G ;)
[Galaxy S II General] ram3n:
You're welcome guys !

Have fun with your little monster :D

Cheers
[Galaxy S II General] killajl:
"After that, you can make some cycle of fully charge/discharge to complete the method"

Does that mean to charge to 100% and drain until the phone auto-shutdowns?
[Galaxy S II General] jxb25:
Ima try this later on

Sent from my mistress