yashsingh1/xdaforums huggingface dataset:
[Desire Android Development] Nutterpc:
Well I noticed after running the ahmat-exp4-cfs_havs for 1 day, the battery drain was horrid

Whereas on ahmat-exp3, it would last almost the entire day without draining much (if at all), on the exp4 version it was going down a lot quicker

If you have a chance ganymedes, could you list the changes/features of some of these kernels? So that power users/devs like you & I know what is going into the kernel :)
[Desire Android Development] theGanymedes:
I write what I added in ADDENDUM parts, but ok: I'll move them to a changelog format.

The only thing that is different between EXP3 and EXP4 is a wifi patch that allows low-signal connections to be kept intact. That shouldn't affect battery consumption much - unless you have a low signal connection
[Desire Android Development] ironjon:
For me exp4-CFS-SVS had better battery life than exp3

Now I´m testing exp5 and for now runs very smooth
[Desire Android Development] Nutterpc:
it was strange, ill give u that lol
[Desire Android Development] rafithegreat:
Was just wondering - Is there any similar method to calibrate under AOSP? I did the calibration that was offered for the Oxygen kernel, and it did work, but, of course, as soon as the phone shut down at 0-1%, and I connected the charger, it reset it's calibration to the old, uncalibrated state..
[Desire Android Development] Nidzo80:
2 days on 4exp cfs havs without calibration. First shutdown was at 2% , last night at 6%. Generally I'm satisfied because my Desire usually shuts down at 16%.

Haven't experienced any other issue with this kernel.
[Desire Android Development] theGanymedes:
nice. But I think you should decrease your full40 value a tad - say 75-50mAh. Then it will be perfectly calibrated. Since there are some round-off errors, such errors do occur.

Aosp is where this idea came from :) if it returned to uncalibrated state back:

1- you charged your desire off without calibrating your full40 value.

2- Learning cycle is interrupted, so you should try again.
[Desire Android Development] theGanymedes:
I guess EXP5 series became success then? I have to admit though: normally my battery reaches at 25%~ when I come home, but today it was 15%~.. There is a tad higher battery usage it seems.

On the other hand, stability is a value I can sacrifice 10% in 9 hours, so .. :D
[Desire Android Development] Sally Mack:
I believe I isolated the variable which dictates whether or not my phone bootloops. It's battery life.

EDIT: nope its not battery life. Managed to boot it at less than 25%. I'm starting to think maybe its the temperature of the phone. When I got caught in a boot loop I pulled the battery for a few mins and let the phone cool down. Popped it back in, and it booted fine. That also would explain why it won't boot when charging (generally the phone is warmer when charging). Normally I'd just chalk it up to my phone being old but the fact that it only happens on your kernels baffles me. Is there any way for me to monitor phone temperature while booting?
[Desire Android Development] NeoEpsilon:
@theGanymedes

FYI...

I'm monitoring the shutdown level on my phone...

Currently it's on 6%...

Before callibration, the phone turns off at ~15%...

So far so good... :D

Will update when the phone shuts off...

Thanx for everything...
[Desire Android Development] theGanymedes:
You might try turning your phone on when you connect it to your pc and then check the log outputs with "adb logcat" and "adb shell cat /proc/kmsg". First command is for application-Android level logs and the second is for kernel logs.

IF there is a overheat situation, I think you can see that in second log.

Funny thing is, my patches are also based on gingercakes, but you don't have such issues with those kernels.

if you can obtain any output from kmsg (with that second log) , I guess that'll lead us to salvation
[Desire Android Development] loedrus:
My phone sadly dies down after I plug the charger in even if I decrease usage as advised and put it in airplane mode @ 3400...
[Desire Android Development] theGanymedes:
Did you also increased mAh value (by writing to register 10 - written in earlier posts?)
[Desire Android Development] ironjon:
Fantastic job with exp5

Only a random reboot otherwise battery drain is excelent

And runs faster!!

Tapatalking
[Desire Android Development] majin_vegeta:
before this fix with either droidzones or snq kernel my battery would die at around 20-25%, i havent ran you app yet with your kernel, but this first died at 30% and today it died twice once at 40% then 45% is this normal? plus i dont quite understand the instructions on calibrating the battery could someone please dumb it down for me :)
[Desire Android Development] SpideRMaN-17:
Why the app is not notifying me when real time voltage goes below 3201v ?

I am registering and saving 66 to a4 and 65 to 06 and 10 to 04 and can see the realtime voltage goes below 3201 but app is not asking me to plugin charger (learn flag remains off) I am enabling detect learn mode to on. And setting battery age to 100.

Am using droidzone's patched kernel

Thanks
[Desire Android Development] NeoEpsilon:
Update...

My phone died at ~1% (I last checked it's 2% before it automatically shutdown)... :D

So I guess its callibrated perfectly...
[Desire Android Development] theGanymedes:
I don't know how Droidzone applied the patches. But I urge you to check the "General" tab and see what's your minVolt value. When the voltage drops below that, the chip should go into Learn mode - maybe Droidzone edited something there, I'm not sure.

Good news!
[Desire Android Development] theGanymedes:
Random reboots? That's weird.. Are they fast-reboots (only Sense crashes) or hard-reboots (like you gave reboot command)? Which ROM and with storage config?
[Desire Android Development] mitch_55:
@ theGanymedes,

I use the runnymede 6.1 ROM with the droidzone kernel (#21). I have a question/issue : How calibrate the battery when the phone shuts down at 18%? I can't have 3201mV!
[Desire Android Development] nomatterbv:
Yesterday I re-calibrated the batt,I had to set 66 to b9 (3611mV, I couldn't reach less) but it doesn't show me the age of the batt, it's still on 94 (I didn't turn off the phone since the calibration or restart) and the full40 is on 1420, which I set at the learning prep.

I unplugged the phone yesterday at 11 pm and now it's at 13%, it drains pretty fast but the good news is that it didn't shut down. I"m waiting to see when it'l turn off.

Any sugestion/ideea how to find out the age of the batt and the real full40?

The LEARNF turned off during the calibration when the batt was at 86% it should turn off when the batt reaches 100%, right?

EDIT: The phone just turned off, right after I hit the submit button, it was at 12%. I don't know what's wrong with it, sometimes it shuts down at 30%, 17% and now at 12%. I think the calibration wasn't successful. I will flash other ROM even if I like more the Sense ROMs, I have to find out if my batt is dead or the problem is with the ROM/kernel. I hope I won't have to give up and use other ROM and/or buy a new batt. The phone/batt behaves very strange from a while.
[Desire Android Development] ironjon:
Only one hard reboot but only one with runnymede cm7 with int2sd S

For now is fantastic :D:D

Tapatalking
[Desire Android Development] ahac85:
Hi theGanymedes i really want to try your kernel but is there any chance you could make one with 2way recording??
[Desire Android Development] SpideRMaN-17:
I am on my 5th try using droidzone's kernel. Am following all procedures described in here.

Switching to airplane mode and close some background processes (eg. Call recorder )

Set battery life to 100 and save

Set full 40 to 1452 and save

Register 66 to a4 and save (3201v)

Register 65 to 06 and save

Register 10 to 04 and save

Set detect learn mode to on

Wait for app to request to plug in charger (and do so on request) **

Check that learn flag is on (which is on) and leave phone alone to get fully charged.

When fully charged battery register is 0x81

Unplug charger

Restart phone

Battery age remains 100% and age capacity 1393 (battery is 18 months old)

Mobile shuts down around 18%

FAIL :(

** that app was not asking to plugin charger solved by using original charger instead of charging from PC.
[Desire Android Development] worrum:
I have exactly the same thing, age remained at 100%. Either the app or the kernel is flaud. I too use droidzones kernel, followed the instructions to the letter. Died at 16%. I'm currently trying to manually set an age, and lower it until it dies at 0%. I've set 88 as a starting point. Lets see what happens.
[Desire Android Development] erklat:
All who fail to calibrate under Sense, make nandroid backup and flash Oxygen. When you learn your real age, restore and use theGanymedes formula.
[Desire Android Development] SpideRMaN-17:
will try to enter age manually and see what happens
[Desire Android Development] theGanymedes:
I must find the necessary patcher for it. I'll see what I can do.
[Desire Android Development] bgumble:
with ahmet-exp5_cfs_svs.zip 2wcr is working fine here
[Desire Android Development] theGanymedes:
First thing first: PLEASE ASK ASSISTANCE FROM DROIDZONE ABOUT HIS KERNEL, for since I don't know what he does to his sources.

Second: Setting register 10 is definitely unnecessary. Only do it if your phone shutsdown before it gets close to 3201 mVolt level (say 3500 but your percentage is at low levels). Normally application does it automatically, but it doesn't always work under Sense - this is not something I can do anything about.

Most of the time, learning gets interrupted near to completion - this is the hard nature of calibration and there isn't much I can do about this: the only known way to get over it is to decrease the amount of battery usage to a minimum possible (with airplane mod, low brightness levels etc.) and to leave your phone off. It's why I recommend you to make the calibration at night - while you're sleeping.

If you continously fail to calibrate under Sense ROMS, try CM or Oxygen ROMS - it's easier to calibrate under AOSP Rom's since they use less battery than Sense.

NOTE: Seeing 0x81 is not much of importance: The important thing is to make sure that current level never drops to negative values: and frankly, this is like Heisenberg Principle: in order to learn it's negative, you must consume battery by turning on the screen - which can make consumption negative :D
[Desire Android Development] theGanymedes:
Hmm, interesting... Apparently Bananacakes integrated the 2way call recording into sources, but never mentioned it. :)
[Desire Android Development] Sally Mack:
I've calibrated twice now following the instructions to a tee, using airplane mode + lowest brightness + not touching the phone, yet somehow I never get my battery age.

For some reason it stays at 100, and when fully charged I get battery register 0x87 instead of 81. Upon Googling 87, I see it has something to do with undervolting, but aside from that I'm pretty lost.

At 100% charge my log shows a capacity of 1433mah. Would it be fair to say that I'd be calibrated by setting full40 to that value? (Seems way too high but I'm starting to give up hope on this calibration)
[Desire Android Development] ryanchanmd:
After 5 tries, I'm still unable to get till 3201 using the attached battery calibrator app. My phone dies at around 3220 while LearnMode is ON. Please help as I still experience this annoying 15% shutdown bug. Really wanted to fix this. Details below on my current setup:

ROM: Runnymede AIO v6.0.4.3 Stable edition

Kernel: Droidzone's #22 (kmods_Full_BattCalib_070312_205103.zip)

Recovery: 4Ext Touch recovery 1.0.0.4 RC2

Let me know if other details are needed.
[Desire Android Development] SpideRMaN-17:
If battery is dying at 3220 instead of 3201 you can register 0x66 to a5 (3220v) and app will switch to learn mode when voltage goes below 3220 volts

You can also try a6 (3240volts)
[Desire Android Development] ryanchanmd:
Thanks man! Anyways just flashed to the latest MIUI.us. I assumed battery calibration will work here as it has a CM kernel. Still waiting for 3220uv. :) Hope everything works fine now.
[Desire Android Development] patp:
I thought I'd done this successfully, but found I still had a 18% shutdown, so I must have botched it somehow. Running a Euroskank CM7 nightly.

But before I go further, can I clarify something... am I losing that 18% of uptime, or is the battery just hitting empty and the phone is describing it at 18%? In other words, will a proper calibration give me any more uptime? Or will it just mean the same amount of time, more accurately represented in % terms?
[Desire Android Development] ryanchanmd:
+1 to this. I hope to hear the answers too.
[Desire Android Development] theGanymedes:
I cannot give support for Droidzone kernel - told you this, sorry. I don't know his files/sources.
[Desire Android Development] WatsonDue:
I tried yesterday with Runnymede AiO and Droidzone #22. After a few shutdowns at "plug now" message, I made a nandroid and flashed the CyanogenMod, Tiamat's Kernel and calibrated without any issue..:p

Then I restored my backup!
[Desire Android Development] theGanymedes:
The thing is: you already lost that 18%, it's just your phone doesn't know it (and why shuts down at 18%)

Well, that "extended life" depends on your battery, but I cannot "guarantee" that. The only thing I can guarantee is that, you shall be able to use your battery completely, without of weird-shutdown problems in high percentages.

Even though people usually report "longer battery lives", this is not a rule - just statistically important outcome :)
[Desire Android Development] theGanymedes:
That's better - AOSP ROM's are more suitable for calibration - since they are more "lightweight and simple".
[Desire Android Development] bg_man:
exp4_cfs_havs is very stable and fast. Good work theGanymedes.

The calibration process seems a bit complex.

Can you suggest some values, e.g. for a year old stock battery, for two years old stock?

I've troubles to get all calibrating process done.
[Desire Android Development] SpideRMaN-17:
After various failed attempts, I decided to try and guess the battery age. At 85% my phone is shutting down at 2% so maybe with 84% phone will shutdown at 1% or 0%

Can someone tell me how to make 85 or 84 permanent please so that when phone shuts down battery age won't go back to 94% ?

Shall i do it as described here even though i have my battery age calculated manually ?

http://xdaforums.com/showpost.php?p=23400262&postcount=2119

Thanks to all !!

Edit: i calculated actual capacity and full 40 from battery age of 84% . Converted to hex and registered to 62 and 63 permanently. Now app is showing correct full40 and actual capacity even when phone is charged powered off. And phone shuts down at 0% !!

The only thing not being saved is battery age. It reverts to 94.

Any way to make 84 permanent pls ?

Thanks to all involved in this topic. Especially theGanymedes !!
[Desire Android Development] rafithegreat:
Thanks for you reply, I did forget to edit the Full40 value, which I now did after another learn cycle.

Only thing I can't understand, is after your quoted text in the instructions thread you explain something about the ACR value - I have tried to change registers 62 and 63 to 2 differently calculated values which I can't quite understand - How exactly is this formula executed? Is it the capacity (to set) actually meant to be the new "fake" full40 value? because after setting it to 2 different values and rebooting, the aged capacity still shows 1393 (though battery age is correct..).

Am running Oxygen..

Thanks for any help :)
[Desire Android Development] bg_man:
Can you post your values for 62 and 63 fields?
[Desire Android Development] theGanymedes:
Thanks :)

I don't know why age becomes reset - tried to find a solution for that actually first; but there is not much I can do when the phone is off :)
[Desire Android Development] rafithegreat:
So what would the 62 and 63 hex values be for a 82% battery? 1267 is what I calculated my full40...

Thanks
[Desire Android Development] SpideRMaN-17:
For 84% battery age (age capacity 1220mAh)

0x62 = 0b

0x63 = 70

Full40 = 1297 mAh

---------- Post added at 08:27 PM ---------- Previous post was at 08:15 PM ----------

For 82% battery age (age capacity 1191mAh)

0x62 = 0b

0x63 = 2a

Full40= 1267 mAh
[Desire Android Development] rafithegreat:
Thank you! I don't quite understand how you worked it out with the formula, but it instantly changed the aged capacity to the correct value of 1190! Hopefully it will stick for good.. :)
[Desire Android Development] erklat:
Exactly what I was thinking. Is this now permanent with your intervention in the kernel code, ie will that chip compensate now for battery capacity lost?
[Desire Android Development] SpideRMaN-17:
Don't forget to put the full40 of 1267 and the battery age of 82% from the LearnPrep of the app

The only thing you have to set again if you charge your desire powered off is the battery age (which you should set as soon as you power on your device) The rest is permanently saved

If the 82% battery age you calculated was correct, your device should shutdown on 1% or 0%
[Desire Android Development] rafithegreat:
Well, the full40 of 1267 was set already (that one I actually managed to calculate), the battery age of 82% was calculated by the calibrator app after the learn cycle and a reboot. So I'm guessing now that I've also entered the 2 registers of 62 and 63 I'm now completely done, and I can charge off as well as on without losing any data on the battery chip, correct? :)

Thanks again
[Desire Android Development] theGanymedes:
If you did rearrange the Full40 value; battery Age value should be reset to 94% (which is automatically done whenever you plug the charger when device is off) - so you should not worry about the battery age value anymore. Once you calibrate the Full40 value, you can charge the device off again - calibration becomes permenant.

What I did in the kernel was to make calibration settings prevented by the kernel (it was reverting to the stock values and I just removed that part - so that the chip can use correct values).

Setting registers 62 and 63 is not necessary - it does have no importance. Normally, DS2784 chip should recalculate the battery age etc. but for some reason it doesn't, so registers 62 and 63 is never used - I thought they were for some time but then I've seen that they are not important. So, if it says Aged capacity is 1393, just laugh at it and go on :) What's important is the Full40 value and the battery Age.

After the calibration, say that your Age is estimated as 83%. What you should do is follows:

Actual Capacity = (old full40 (generally 1452)) * 0.83

New Full40 = (Actual Capacity) / 0.94 <<-- 0.94 is constant, don't ask me where it comes from, it's complicated :)

Once you write this "New Full40" to full40 value, reset the battery age to 94% (or plug in your charger when the device is off).

After doing this process, let the phone discharge (but be careful, it should not turn itself down - for the easiest way, just discharge to 80%) and then charge it to full again (device is on during these steps). Now your battery becomes completely and permanently calibrated.

The last step is necessary because even though we change the Full40 value, it's not actually reflected to the ROM until next full-charge.
[Desire Android Development] Notum:
I've applied ahmet-exp4_cfs_havs.zip via Recovery and now my camera doesn't work! :-(
[Desire Android Development] bg_man:
Same kernel mine camera working's fine.

Rom?
[Desire Android Development] robe42:
I think i saw a fairly strange thing just now when trying to recalibrate, first i drained my battery to see where it shuts down, it shut down at about 16%.

Then i charged while the phone were off for a while, booted up & set up the values stated at the calibration-guide. At this time the phone were charged to 12%.

Entered learning-mode, battery started to drain till about 10%, and as soon as it hit 9%, it went straight up to 18%(!!?).

Do anyone know if something odd happens when reaching 9%? I'm running tiamat's latest gb-kernel if it matters.

EDIT: It did the exact same thing at 9% again, it have now (since first shutdown at 16% and then recharged to 12%), been draining for 40-45 minutes(!?). Possible faulty battery?
[Desire Android Development] theGanymedes:
If you selected "Detect Learn mode" to on; that's normal: don't be afraid - the software is trying to reach "actual empty point" then - that's the part of learning process.
[Desire Android Development] ryanchanmd:
my battery is now properly calibrated. shutting down properly at 1%. thanks alot! but now I noticed that I need to charge my battery more than 7 hours to 100%!! is this normal or something is wrong about this? I am using the same wall charger before and after calibration. And I used the following registry entries when I calibrated:

0x66 = a6

0x65 = 06

0x10 = 04

Please let me know how to fix this. Thanks.
[Desire Android Development] theGanymedes:
This is kinda-normal. Since your battery limits are "the" real limits now, it'll take a lot of time for the battery to hit 100 from 99 percent. If you're to feel bad about this, you can increase the "Charge current" value from 20 mA to, say, 50mA (this value is 80mA in stock kernel, while we set it to 20 in calibration to really push the limits).

Since this process will be really confusing for some, I'll not post it here. What you should do is, download DS2784 chip spec. sheet (can find in google); then learn how to set IMIN value properly (register 0x65). Increasing IMIN value will make your battery to be "less aggressive" about charging to really to its full.
[Desire Android Development] ironjon:
Yes the same for me.

After calibrate it takes a lot of time to hit from 99 to 100%

Tapatalking
[Desire Android Development] bookerok:
If i maked a wrong calibration, which defaults settings i may to insert to make a stock parameters?

on oxy after • Register: 0x66

Value: a4 --> save

• Register: 0x65

Value: 06 --> save

• Register: 0x10

Value: 04 --> save

my phone is freezing on 84% charging ((
[Desire Android Development] theGanymedes:
-> You should not write anything to register 10.

If you've changed Full40 value, revert it back to 1452. Unplug your charger and deplete your battery till it goes to 50% or so. Then turn your phone off, plug in your charger and let it charge till you can see the green led on. It should be stock then.
[Desire Android Development] dongerado:
Thanks for this explanation.

I changed it and i found out, that you have write "0A" or "0B to register 65.

Only A or B won´t be accepted.
[Desire Android Development] wwuk:
Hello,

I've been trying without success to perform this on my Desire.

I'm running the latest stable version of Insert Coin, using the Exp 4 Kernel from the opening post.

I follow the instructions to the letter, however despite immediately plugging in the Charger, my device shuts down.

I'm on my 15th attempt :(

I'm using a replacement 1300mAh battery.

Any ideas?
[Desire Android Development] blondz101:
Hi guys,

when I launch the battery calibrator app, all value in all screen are empty; no %, no mV, nothing.

It's normal?

I have Insertcoin 1.1.0 rom
[Desire Android Development] erklat:
No. As much as it is not normal not to read the first post of this guide.
[Desire Android Development] wwuk:
I believe I am right in saying that, you will need to 'flash' using a recovery such as ClockworkMod... one of the kernels mentioned in the opening forum post.
[Desire Android Development] WatsonDue:
15th?? I flashed CM7 after 4 o 5 times.. and all went good.;)
[Desire Android Development] blondz101:
Yesterday I had the ahmet-exp4_cfs_havs.zip kernel and the app didn't work.

Then I flashed the ahmet-exp5 kernel and now it works fine.

A lot of word wasted for nothing....
[Desire Android Development] rafithegreat:
Just out of interest, if I flash a new ROM, will I have to repeat the whole process again..?
[Desire Android Development] theGanymedes:
No, just flash the kernel.