Remove All Ads from XDA
Honor 9 Lite

Wrong state of charge calculation by android

1 posts
Thanks Meter: 0
By Ulianov_Lenin, Junior Member on 28th April 2014, 01:13 PM
Post Reply Email Thread
I've i9195 with stock battery and rom, all was normal. Then I replaced it with double sized battery+new back cover. Not a microUSB batterycase. After many cycles and weeks of use it still didn't calibrated to new capacity. Fully charged battery lasts about a day and phone shuts down. If I switch it back ON after couple of minutes - I see 50% charged and can use phone another day.After second 'full discharge' I'll have about 15% more. All techniques for 'calibrating' battery with deleting batterystats doesn't work. Charge, off, remove bat, wait, place it back - either. /sys/class/power_supply/battery/uevent have string POWER_SUPPLY_ENERGY_FULL=1940000000 and it is always the same. So phone simply downcount from this level and tells that charge is 0% while voltage is about 3.7v. Interesting that "energy_full" file has number of 3880000000 but it seems that it's not used in calculations.
After all I installed CWM, root, cyanogenmod 11 and used it for about a week. SAME problems, except that "energy_full" is 1940000000.
I want to solve this very much, I can program or recompile kernel, if needed. It's pm8921 charger ic there. Maybe this number was programmed in it in factory mode or smth. Maybe threis a way to correct it. Thanks in advance.
2nd September 2014, 12:17 AM |#2  
Junior Member
Thanks Meter: 13
Same here with stock-rom, CyanogenMod and MoKee's rom.
I think the only way will be to recompile the used kernel with the correct value of 3880000000 instead of 1940000000 in file "drivers/power/pm8921-bms.c" in kernel sources (function "calculate_fcc_uah", part "scalefactor". Scalefactor has to be change into scalefactor *= 2;).

Huge work for a little problem...
5th September 2014, 04:04 PM |#3  
Junior Member
Thanks Meter: 2
Instead of making any advanced config, have you tried this little app (needs root privileges)?

After migrating to CM11 my battery was draining very fast. I used this app and it apparently fixed a part of the issue (battery still drains fast, but not as fast as before).
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes