yashsingh1/xdaforums huggingface dataset:
[Nexus One Android Development] apratomo:
if I want to hit learn mode again, could I just stop charging, turn on my phone, drain again

and setreg 0x10 03 and set age 100%
[Nexus One Android Development] RogerPodacter:
Nice that's a good tip. Once learn is hit no need to keep it on and a good way to stop the pop up. So how far into your cycle did you get to? Did you change your empty volt at all or is it still 3.416volts still?
[Nexus One Android Development] RogerPodacter:
Yes for sure just charge for a few minutes, maybe to 4% or so and try again. But at that point make sure to do

Echo 0x10 04 to bump it up a bit else the learn may not turn on. Each time you make an attempt do that first when you are down low near the bottom like under 10%. And setting age to 100 is good to do when you are doing a full charge and THEN attempting to do learn by draining. But it can't hurt either way. To let you know I keep my age at 100 all of the time no matter what.
[Nexus One Android Development] k3vink3vin:
After 3 hours of on-charging, I switched on the monitor and saw it had reached 79%, voltage was at 41xx mV, and the current flowing in was around 1xx as oppose to 7xx during the early stage.

It jumped to 100% from 80%. I have only got the log for 0%-80% (I exported the log manually after I switched on the monitor), but not for 80%-100%.

I have my full40 set to 1550mAH and empty volt set to 3201mV.

Looking at the log now, the statusreg changed from 0x03 to 0x73 @ 0% to 0x33 @ 6% to 0x13 @ 15% to 0x03 @ 48%.
[Nexus One Android Development] apratomo:
what exactly 0x10 register do? I can't seems to find it

I see recommendation by you to set it 03, 04 and even 05
[Nexus One Android Development] k3vink3vin:
Correct me if I am wrong, it sets your remaining battery percentage to 25%, no matter how much battery you have left.
[Nexus One Android Development] apratomo:
and how do I revert that back to normal? it seems my battery confused right now. I did set to 04 when my battery already at 75%, and now it gets shutdown before hitting learnf voltage
[Nexus One Android Development] RogerPodacter:
Ha ha I meant to only echo that command when you are down very low trying to hit learn and it looked like you were going to run out of mAh before reaching empty volt. Register 0x10 is just the mAh register and a 3, 4 or 5 just bumps it up a little higher each one. To get your battery back just charge it to full or drain it to empty and it resets itself. So only use that command if you are making a second attempt at learn mode cause the first one missed and it looks like mAh is gonna hit zero too quick before empty volt.
[Nexus One Android Development] theloginwithnoname:
...which the CM standard kernel now does - yay! :D

Going to have a chat with Wildmonk to get the proper version in there too.
[Nexus One Android Development] theloginwithnoname:
How freaky - I just suggested that to RP before I read the above!

App needs to display all the values that LEARN uses.

It should probably offer to:

add an extra XXmAh to the capacity/full40, or

set the battery percent +10%

if current volts are too much above AE volt to hit LEARN.

I'll do a full review of the app and feedback to RP...
[Nexus One Android Development] RogerPodacter:
Ok just entered learn mode. One bug I see is the polling is going crazy, its way faster than once per second. Not sure what happened there as my last test showed it polling fine. Likely to do with the onPause onResume I recently added. And the pop up goes crazy. But I hit learn on my first shot, didn't even have to do that echo command. Will see what happens...
[Nexus One Android Development] myakove:
With this app I just hit learn mod, battery life is greet.

After about 15 hours I'm on 42%
[Nexus One Android Development] dvgrhl:
I'll take a look for it tonight and see if I can get that sorted out. Same for the polling issue.

I'll be diving into it tonight and tomorrow, so any suggestions you or anyone else has can be sent my way as well.
[Nexus One Android Development] apratomo:
Umm I think I just messed up my battery. after changing 0x10 I did full charge but it seems the setting sticks.

I have 4133mV but my batt capacity only reached 1256mAh

How do I set it back to normal to reach full40 1452mAh?
[Nexus One Android Development] apratomo:
Okaaayyy, weird things just happened. I did bump charge it, then suddenly I have 100% and 1433mAh
[Nexus One Android Development] RogerPodacter:
Yeah setting register 0x10 has no long term effect and its reset back to normal on the next charge to full or drain to empty. That is just useful to do for certain instances when you are approaching like 10% trying to hit learn to ensure you nail it. We likely could just automate that in the app. And it could easily be applied only conditionally, meaning a check could be in place to compare the mAh reading vs the voltage, and either apply it or don't apply it based on the condition.

Perhaps I confused things posting that command since its not always necessary, only in certain conditions. You just wanna use it close to the bottom nearing the end. And once learn is hit that will reset that mAh register back to stock;-).
[Nexus One Android Development] GunPR:
I wanted to try the attached app, but is giving me a parsing error maybe because my tablet is running 2.1 and this is for 2.2?

Is possible to compile this for 2.1? Or im missing something?
[Nexus One Android Development] samarium:
Missing:

1. App requires kernel with patched battery drivers.

2. Installing kernels usually requires a rooted device.

3. Patched kernel only available for a ds2784 battery chip in a Nexus One.

So you probably wont have any joy on any point above.

4. We probably should get the thread title changed to reflect this limitation.
[Nexus One Android Development] samarium:
I copied the .config from my cm-kernel build into the pershoot kernel-2635 tree and seem to have a successful make zImage. I'll try it out tomorrow.

Seems like there is a RC2 to try out tomorrow too, but I think I'll do a repo sync & let it build overnight.
[Nexus One Android Development] Fiddlestix:
hey guys..

sorry for not reading the whole 20 pages but I was wondering is there a full tutorial on getting this thing to work? step by step? if anyone has one that would be lovely ^_^ ty
[Nexus One Android Development] bassmadrigal:
While the battery age is something you can just guess at, it could be wrong. 85% is probably a decent place to start, but it doesn't mean that your phone will shutdown when it reaches 0%. To find the proper battery age, you need to perform the calibration.
[Nexus One Android Development] cyberon:
I thought the only way to find/guess the battery age was to pay attention at the % that the phone used to shut down before calibration, what do you mean with "you need to perform the calibration"?

Mine used to shut down around 13%/15% so i calibrated it adding 87% in LearnPrep Age field.

Am i doing something wrong?

Thanks.
[Nexus One Android Development] bassmadrigal:
By default, the N1 battery thinks its battery age is 94%, so trying to guess what battery age yours is at if it shuts down at a certain percentage is just that, guessing. If you follow the instructions for the calibration app (found in the 3rd post on this thread), you can find your true battery age. No guess work involved.
[Nexus One Android Development] cyberon:
You mean a capacity test?
[Nexus One Android Development] temasek:
No.

Stock battery no such thing as a capacity test. Only aftermarket battery does.

Try draining your battery to auto shutdown at 0%. If u are able to do so, it is considered proper calibration.
[Nexus One Android Development] virus2013:
My battery age was at 94. I followed the all the instructions carefully. Now, it shows 100 as battery age. I didn't know if it's normal.

I don't know yet for the shutdown percentage but I already notice that battery drains fast between 100 and 85%. After that, it seems normal.
[Nexus One Android Development] bassmadrigal:
Unless your battery is brand-new, it won't achieve a 100% battery age. So that means that the calibration failed (it also failed if it goes to 94%).

If what you mean by a capacity test is the battery calibration mentioned earlier, then yes, you do need to do that to get the proper age for your battery. Otherwise, the percentage will be off, and your phone will not auto-shutdown at 0%.
[Nexus One Android Development] virus2013:
OK, I just don't know what I haven't done as described... I was thinking it was normal because it is said in the explanation to put 100 for battery age.

What are the proper steps I have to do to have a good calibration?
[Nexus One Android Development] temasek:
Just share the difference between stock and aftermarket battery.

Stock battery full40 is accurate but aftermarket battery may not thus require a capacity test to find out its real max capacity level. Capacity test is NOT battery calibration.
[Nexus One Android Development] bassmadrigal:
Wait, is this on your Desire? I believe this app only works for the Nexus One.

If you are running it on a Nexus One, yes, you do set your percentage to 100%. This lets the app know the range when it performs its calibration. When it is complete, the app should then reflect your real battery age (if it is at 100% or 94%, then the calibration failed, and you will need to try again). And are you running this on a stock battery or aftermarket? If it is aftermarket, then the instructions on the third post are not going to be fully accurate as you need to adjust for the different full40 as temasek mentioned.
[Nexus One Android Development] temasek:
Works on desire as some of their kernels have the battery drivers ported. Also we share same battery type.
[Nexus One Android Development] virus2013:
It's a Desire with stock battery. It just shut at 13% and battery age is back at 94% now so it didn't worked. I'm loss, really don't understand what I'm supposed to do now...
[Nexus One Android Development] bassmadrigal:
Ok, I had read somewhere (probably when this app first came out) that it was for the N1 only and wouldn't work on the Desire (probably because there weren't drivers for it yet). Good to know!

Did you follow all the directions to properly calibrate it? It requires you fully discharging and recharging the battery. When you are recharging the battery, you need to make sure there is nothing that will cause the phone to get out of learning mode (which will happen if the draw jumps too much - by starting an app, receiving a call, turning on or off the screen, etc). Once the calibration is complete, you should have your battery age. Restart the phone, and it should shut down at the proper time. But anytime the phone has shutdown automatically from it reaching too low of battery power, you will need to re-input the battery age (whatever the age was after you completed the calibration -- mine is at 81% right now).
[Nexus One Android Development] cyberon:
That value appears at the app right after calibration right?

Restarting calibration! :D
[Nexus One Android Development] bassmadrigal:
1. Yes, the battery calibration. The problem with our battery is that it doesn't automatically adjust for the natural degradation of the lithium-ion cells. The calibration can be used on a battery, no matter how old it is.

2. You place the battery age at 100% so that the app can properly gauge your age when it performs the calibration. When the calibration is done, it should no longer be at 100% (or 94% which is the default for the battery). It should be at whatever age your battery is at. Once this age is properly set in the app, your phone should auto-shutdown at 0%. Keep in mind, anytime the phone shuts down from low battery, you will most likely need to re-input the battery age that you got when you finished your calibration. As I mentioned above, my battery age is currently at 81%. So it is able to provide 81% capacity compared to a brand-new stock battery. This helps the phone know when to shutdown the phone due to low power.

3. The different values are to help the app get the battery to its lowest point so it can determine the lowest threshold your battery can get to. This helps it calculate the battery age.
[Nexus One Android Development] virus2013:
So I made calibration for the second time without success. Tell me, the application only determine the battery age or it also do another thing? Because as I can't successfully achieve the process I wonder why I don't put something like 85% and see how it goes, and adjust like that.
[Nexus One Android Development] bassmadrigal:
It only determines the battery age (for stock batteries). And yes, there is nothing preventing you from just guessing the battery age and seeing how close it is when it auto-shutsdown. Last time I did mine, it came up to 83% and I have slowly worked it down over time to 81%.
[Nexus One Android Development] virus2013:
OK my battery as 15 or 16 months, I put battery age at 88 and will see. What's the behavior if I inserted a too low number?
[Nexus One Android Development] bassmadrigal:
I don't know if I have tested that, but I would assume it would just sit on 0% for an extremely long time, or it may still shutdown once it reaches 0% but it may still have more juice that would've allowed it to run longer.
[Nexus One Android Development] virus2013:
OK I'll let it at 88 and see what happens. If it reach 0%, I'll put a higher number and try again till I found the right age for shutdown at 1% so I'll be very close to the right age. Thanks for all your answers!
[Nexus One Android Development] virus2013:
OK 88 wasn't good. It shuts at around 13-14%... I just put 80% as battery age and will see again if it's good now! Just to be sure, new age is set just after I pressed the save button or do I have to reboot the phone?
[Nexus One Android Development] temasek:
Once u set the new battery age, the effect will only kick in on next full charge, ie your 2nd charging cycle.
[Nexus One Android Development] waylo:
Can someone share the registry command to set the mAh to 500 or so?

Just got a 3200 battery, and man does it take a long time to drain down to 3.201 volts! Would like to use the phone in the meantime without having to continually go back into the app to boost up the mAh with the acr adjustment. Basically I'm going from 3% to 7% each time the acr adjusts, and it's just silly to repeat that 20 times for another 2 hours!
[Nexus One Android Development] temasek:
10 x 05.........
[Nexus One Android Development] waylo:
Nice battery life. But taking a long long time to drain with normal usage :-P

Not that I'm complaining :-)
[Nexus One Android Development] waylo:
Wow. My capacity for this 3200mah battery turns out to be 3920!

But the utility only lets me input up to 3700.

Manual hex registries entry then? I'd like to put in a full40 of 4000 and change the battery age accordingly. Some conversion help please? (I've never quite understood the conversion method here... I know it's not simple dec to hex)...

I know full40 is stored in entries 0x6a and 0x6b.

EDIT:

Figured it out. Didn't know about the multiplier of 2.4. So hex = 2580. I'm guessing this is the "sense resistor" value?
[Nexus One Android Development] DirkStorck:
Hi. hope someone can help me !

I have now a new battery. If I start you app I get strange readings.

Look at the capacity!!!

When I discharg the new battery it first discharges very fast but at the end the phone needed over 1 hr to drop from 2% to 0%.

Is my new battery broken?

Thank you ! :)
[Nexus One Android Development] temasek:
I'm sorry to say you bought a battery which cannot be calibrated.

Edit: But useable .....
[Nexus One Android Development] Dr Byte:
I'm starting to get this feeling...

That my original battery can't be calibrated :(

This is at least my 40th attempt, on five different ROMs and six different kernels. In every case, the log jumps from somewhere around 1250-1350 (87-93%) to 1452/100%.

Interestingly enough, the latest test (Oxygen 2.3.1) was the first in ages to fail the ACR part. It failed 6-10 times and turned off without adding "extra mAh" when it got to about 7mAh left. In the end, I manually pushed it higher and waited for the voltage to drop. Sure enough, it picked up LEARN mode and charged to full.

Again, 1260 -> 1452 in one poll. So I've set the age manually to 87% with a stock Full40 of 1452. 87% is roughly where it should be *anyway*

However, the learn cycle is "tainted" by the 5-6 failed attempts where the charger had to be reconnected to reboot the phone. So I guess I have one more calibration "with feeling" to go :( I believe the "true" aged capacity is closer to 1350-1375mAh based on earlier cycles.

I've never had the ACR adjustment fail (yes, all the boxes were ticked) until this test with Oxygen/Thalamus kernel - so I thought it worth mentioning. CM7.0.3 - 7.1rc1 - 7.1 all worked, as did 7.0.3 with ManU kernel.

So if you're hovering over the phone waiting for the battery to reach AEV and it drops below about 12mAh while still >0.2V above AEV - give it a 100mAh push and save some grief :)
[Nexus One Android Development] resynx:
Aaaah! I can't get my phone to hit 3201 and make the learn box pop up. It got down to 3268 1 time but then it shut off. I'm doing everything the instructions say but it's not working T_T ...... anyone know wat to do?
[Nexus One Android Development] temasek:
The answer is 1 post before yours.
[Nexus One Android Development] resynx:
Wait, so I'm supposed to push my phone by 100 mah? Or I'm supposed to set the age to 87%? And how would I go about pushing the mah up by 100?
[Nexus One Android Development] temasek:
You had insufficient mAh before u hit your Empty Voltage Point of 3201mV.

How to increase mAh?

1. In the app select ACR adjustment (there is a bug where it wouldn't provide the mAh)

Or

2. From the app, input as follows for manual increase of mAh

10 x 01 (for 100mAh)

10 x 02 (for 200 mAh)

Etc

10 being register

01/02 being value
[Nexus One Android Development] cyberon:
Guys, small issue here, everytime i turn the phone off during night, it looses the calibration and i have to input the battery age again.

Is this expected?

Thanks.
[Nexus One Android Development] temasek:
No.

Unless u performed power off charging.
[Nexus One Android Development] chowlala:
I swear we should make a manual.

Yes. I'm around. Lurking in the shadows. :D
[Nexus One Android Development] temasek:
Lolz

And I'm still repeating same answers to many questions. :)
[Nexus One Android Development] cyberon:
You mean i cant charge the phone while it is powered off?

I do it every night, now i need to do another calibration right?

Thanks.
[Nexus One Android Development] temasek:
When u power off charging, upon bootup your age will be reset to 94%. Just set back your battery age will do (if u remember).

I don't recommend power off charging. Just airplane on charging will do if u don't wanna be disturbed.
[Nexus One Android Development] theloginwithnoname:
Oh, hello stranger!!
[Nexus One Android Development] theloginwithnoname:
LOL, amazing how many people can't read the first few posts eh...
[Nexus One Android Development] theloginwithnoname:
SmH, FFS!!!
[Nexus One Android Development] cyberon:
Thanks for the usefull info! :rolleyes:
[Nexus One Android Development] tatsit:
my nexus one shut off before reaching 3201mV, is it normal?
[Nexus One Android Development] cyberon:
It also happened to me.

From the app, input as follows for manual increase of mAh

10 x 01 (for 100mAh)

10 x 02 (for 200 mAh)

Thanks Temasek. :)
[Nexus One Android Development] tatsit:
wow. thanks a lot :D

another question, its taking me whole day for the real-time voltage to reach 3201mV. GPS polling is enabled, why is it still taking such a long time?
[Nexus One Android Development] temasek:
Don't u think the longer the better?

...joking....

Ok. One should start to prepare learn cycle closer to the empty voltage point. In my past tries I use my phone normally till about 3500mV then I start preparing to perform learn cycle. Then u don't have to wait too long.
[Nexus One Android Development] Dr Byte:
It's amazing how few people can read at all :)

Seems to go with the whole "instant gratification" vibe these days. Why lift a finger, when you can just blurt out your question and expect everyone to hop-to and answer? :)

I think I just did my final calibration on the "original" Desire battery. Same result as ever - age remained at 100, with a suspicious jump at the end (when the current dropped below 20mA).

So for the 42nd time... I had to set the age manually. 88%, based on this data.

Not only did I need to set the age, but this time pushing register 0x10 didn't work 15 times out of 16. I have no idea why, though the remaining charge was <30mAh at the time. Confusingly, the ACR adjustment did work one time, pushing it up to 252 at one point when I hadn't done it manually.

I've only done these last two calibrations with Oxygen 2.3.1 (_thalamus kernel), the previous ones were with CM7.0.3, 7.1rc1 and 7.1.0 - all of which worked every time I used register 0x10, and usually worked with ACR. (7.0.3 mainly with the ManU 2 kernel.) I wonder if there is something in that?

Despite all the aura of super-efficiency that Oxygen gets, it seems to operate at about the same battery drain (for me!) as CM7 with the stock CM kernel - and CM with ManU kernel is substantially better on battery drain. With regular reboots and hangs though :(

I think this battery is trying to tell me it wants a gold watch and a long retirement :)

No film at 11, but some screenshots here...
[Nexus One Android Development] tatsit:
I've finally able to complete whole process. But it registers 0x83 instead, and batt age is 85%. No idea what went wrong, but i'm going to try again.
[Nexus One Android Development] bassmadrigal:
If you got 85%, then that should be your battery age. Your battery has 85% of the capacity of a brand-new battery.
[Nexus One Android Development] tatsit:
I see. Is that normal for a near 2 years old Nexus One?
[Nexus One Android Development] temasek:
Depends how often u use. My 1st battery was at 86% just about a year.

80% = RIP (but still usable)
[Nexus One Android Development] waylo:
I've never had luck with the automatic setting of batt age either! I do exactly what you show here.

So technically the only reason to hit learn mode is so that mah can get accurately zeroed. Whenever it stops charging, when the min charge rate is reached, its at batt capacity.
[Nexus One Android Development] bassmadrigal:
It depends a lot on your use and charging patterns. I have had my phone for a little over 1 1/2 years, and my percentage is down to 81%. I likely won't get a new battery when it gets below 80%, because all that it means is that I have lost 1/5 of my battery capacity. I guess many consider that to be far enough gone to warrant the battery being dead, but my phone still lasts me the full day (on most days). I am barely scraping by (I'll plug it in when it is in the single digits), but it is enough.
[Nexus One Android Development] $omator:
ok and now restart your test with a proper tool to track battery data

juice plotter aint such ;)

try with Battery Monitor Widget

and customize the reading method, intervl nd so on ...

god luck
[Nexus One Android Development] resynx:
So I tried this and it still didn't work x.x

One time the voltage actually went below 3201... but other than that, all the other times the phone still just shuts off :confused:
[Nexus One Android Development] temasek:
When u 'hit' the empty voltage point with a positive mAh, your learn flag should be lit and there is when u turn on your power to your charger. Possibly u are either too slow or u used up your mAh before u hit 3201mV.

I can't think of any other reasons.
[Nexus One Android Development] dvgrhl:
You should see the emails I got (and still get) about this. No one ever reads.