Swapping batteries and batterystats.bin - Vibrant General

I did some searching and reading and only found speculation on this subject, and during the holidays I have been mostly desk-bound at my home office with very little phone traffic, so I thought I'd post my results after doing some testing.
For those who don't want to read, the bottom line is, if you swap batteries, (especially using batteries of different capacities) I believe you definitely should wipe your batterystats.bin file each time you swap them if maximum runtime is your goal.
Why did I question this in the first place? I saw a dev post a comment that the battery drivers do not reference this file at all. I wasn't able to find any clear explanation of what is actually in this file. I'm running Nero v3 with Voodoo, and after I flashed it, my fully-charged stock battery only lasted about 45 minutes. All these things made me wonder whether it made a difference, and since my previously-fine stock battery suddenly wouldn't last an hour, I had to do something anyway.
For test purposes I attempted to eliminate as much random activity as possible. I shut down my e-mail client and data sync and forwarded my cell calls to my home office land-line. I'm in the camp that believes (from experience) that a good strong WiFi signal to the closet ten feet away uses far less juice than trying to maintain radio contact with a cell tower 2 or 3 miles away, so in this case I switched off WiFi to ensure *faster* power usage. I didn't want to do a crazy-fast maximum-extreme battery drain, though, so I found that streaming radio at full volume using TuneIn resulted in noticeable drain, but also surprisingly extended runtime. I made sure the phone was in the same physical location for the duration. (I know there are still a million-and-one variables at play, but I believe the "big picture" conclusion is valid.)
The battery I'm referring to as G9 is the original "good" battery that shipped with the phone. The G7 batteries are those cheap Chinese knock-offs, the ones with the duplicated serial numbers. These have very different capacities. I believe the G9 is 1500mAh and the G7 has been estimated at 700 to 900 (it is marked as 1200 but this is clearly false). I have two G7s. All batteries were fully charged on an external stand-alone charger. The batterystats.bin file was wiped using Clockwork Recovery. I ran the application with the display off, only turning it on about once an hour to check the battery level. I let it run until the phone shut itself down.
First test:
Install G9, wipe stats: 7 hours 14 min to shutdown
Install G7 #1, no wipe: 4 hours 2 min to shutdown
Install G7 #2, no wipe: 4 hours 4 min to shutdown
Install G9, no wipe: 6 hours 59 min to shutdown
Second test:
(I already saw [above] what the G9 does with a clean wipe)
Install G7 #1, wipe stats: 5 hours 31 min to shutdown
Install G7 #2, wipe stats: 5 hours 27 min to shutdown
As an aside, I'm pretty surprised that playback of streaming-data radio at full volume will last more than 7 hours. I figured I might get 3 hours or so. This suggests to me that both the phone hardware and Android itself is actually very power efficient -- streaming radio is not exactly optimized for power saving, and the stock speaker is quite loud.
Since the phone actually shuts itself down -- it doesn't simply bleed the battery dry until it just dies from power-loss -- I suspect it uses this data to profile how the battery drains to predict when it will become nearly depleted so that it can perform a clean shutdown. And swapping batteries with very different "behaviors" simply throws that off completely. You can see I got a full hour and a half more out of my G7 batteries just by wiping, and my G9 lost about 15 minutes of uptime after the stats were "contaminated" by a pair of G7 runs. I also thought the consistency of my back-to-back G7 runs was interesting.
The probable (and unavoidable) downside to frequently wiping your battery stats is that it also probably defeats any long-term battery management strategies designed to extend the life of your battery. You see this kind of thing most obviously on laptops where the battery management software intentionally runs on battery power even when you're plugged in, letting the battery drain to some point based on the software's evaluation of your battery's health before allowing it to charge again. I'm not sure if Android or the Vibrant does this, but it seems likely it does based on people's complaints about things like the "15% charge drop" issue when they unplug from the charger or USB.
It doesn't appear that our batteries have electronically-readable serial numbers, and I have to assume knockoffs like my G7s wouldn't bother to implement those correctly anyway. But optimally we'd have different profiles for different batteries. Maybe in Galaxy's successor...
Why doesn't the driver reference batterystats.bin? I don't know, but what would be interesting is to scan the released source to see what DOES access it. I suspect it also tracks all that other power-related data (like the detailed battery history information in the *#*#4636#*#* menu), and so I further speculate the file is managed by some centralized logging-style interface, and the battery driver is just one piece among many which communicates with that interface. But I've never bothered to actually grab the code from Google and that's nothing but pure speculation.
Anyway -- wipe it when you swap it.

Related

Question: Has ANYONE figured out a...

...definitive solution to the overheating (and subsequent crap battery life) issue with the Tytn/Hermes/8525?
This seems to be one of the most prevalent hardware-related problems I've encountered after perusal of numerous boards.
Charging, it heats up. Duh. Fine. Disconnect, put it in my breast pocket after it cools down, twiddle my thumbs. During this whole time, for purposes of this test, EVERYTHING is switched off: phone radio, wifi, bt, push, and as many of the background processes as I can kill without having the phone hang on me.
You'd think the symptoms would be the same every time. But nooooo...this thing has a mind of its own. Sometimes it'll be 5 mins before I start feeling the heat, sometimes 40. It's totally unpredictable. I've tried every way I can find to extend the battery life with no luck; this is getting retarded.
So: Battery life drops drastically once the thing starts heating up. But not before. From 3PM to 4PM today, battery life was at 100% and did not move. Sweeeet! I thought...too soon. Got that warm and fuzzy feeling - then it's in free fall. 10% down in 45mins, another 20% by 5:30, dead as a doornail by 8PM. That's exactly FIVE hours of "standby" with ZERO activity. Screen was turned on maybe 4 times just to check battery status. 200 hours of standby?? Sure, in a deep freezer packed with dry ice...
Installed Batti: if anyone with close to normal (advertised?) battery life has also installed it, could you tell me what your temperatures are like? When I'm charging, I'm at 35.6C. My voltage is at 4.213V - this might be the problem since the battery is listed as a 3.7V 1500mAH. Also, I removed the charger for about 30 seconds after Batti said it was charged, then reinserted it. It took about 30 minutes to tell me again that it was full - all the while listing the "Percent" as 100%. Gah!
Anyway - back to the reason I've posted:
1) Is this a phone issue, tweak/registry/software issue, or a good old fashioned battery issue? I've got another battery coming in shortly but it's nothing special, not sure of the brand, just want to compare it to this one - which is a Seidio.
2) If anyone else has had this problem and solved it, please let me know what you did.
3) This phone is for sale if anyone wants it and knows how to fix it. Other than the 5 hours of battery life, the phone is perfect.
Thanks all!
The only time I've ever had this problem was when I installed the very first Palringo mobile beta, and it continuously polled the Palringo servers whenever it was connected... I had a battery life of about an hour and a half!
I can only suggest you have some poorly-written app on your device which is polling some piece of hardware or using (or trying to use!) the data connection, subsequently failing and looping round to try again and again.
I'm not using Batti (using the BatteryStatus Today Screen plugin), but it shows temps - I'm charging my device at the moment and it shows ~41 degrees celcius. When I unplug the charger, I have about 70mW usage and when I tap to turn the backlight back on it roughly doubles (backlight on its lowest setting). Using roughly 40-45mA just idling, I have push mail turned on and ActiveSync is syncing probably every 5/10 minutes or so (can't remember the interval).
I get about a day's worth of usage including regular phone usage, data usage, then locking the device (including turning the backlight off) when it's just on the desk or in my pocket (less if I have BT turned on all the time, obviously). All I can think of is that you have some app on there which is either interacting with something else or causing the problem itself.
@slidizzy:
what is the manufacturer name on the battery?
There are threads around about certain manufacturer brands (there are a couple of different brands) and their performance..
i had a dynatec and it was crappy.. took it back and got a sanyo battery and all was good...
Possible solution - Same geographic location
Hi. I seemed to have the same problem recently. I think my radio was the new 1.54.00.10. I have two batteries and each one was killed in 6 to 8 hours.
I first downgraded the radio to 1.51.00.10 and it seemed a little bit better, but upon upgrading to 1.54.70.00, it seemed to have gone away. My OS is Pandora's 7.1 w/ 3.62.
With 1.51.00.10, I was able to get over a day's worth of life on one charge in 3G/H mode. It seems this 1.54.70.00 is giving me more life, but I'm still testing.
Maybe give this a try, upgrading to 1.54.70.00 and a 3.62 os. No problems for me so far and it seems like it's a keeper!
Hope this helps!
Quakie
Soft reset when it starts getting warm, soft reset after charging if it is warm when on the charger.
My 8525 used to have this problem, but it went away on its own. However, soft resets when the device felt warm did solve the problem when it was occurring. Note that my phone is no longer warm while charging, either.
A lot of people try various radio upgrades/downgrades and ROM changes to fix this, but I think that's on the wrong track as I've never seen anyone report that doing these things made any difference. However, if you're not using WM6, I recommend at least making that change.
Other than that, hit the reset button if it starts to feel warm for no reason and after charging, and you should be fine.
My guess on this is that there is some kind of problem where the device thinks it is plugged in when it isn't, and then it over stresses the battery causing the heat and fast battery drain.
My experience
I am on Rogers in Canada, the same company that owns Fido, and I wonder if there is a problem with their network/ActiveSync/3G/units compatibility.
carrier: Rogers wireless (Canada)
device: branded HTC TyTN WM 5
ROM: 1.34.631.14
Radio: 1.42.00.00
Recently activated Push Email and connecting to exchange server via Activesync. Push requires an "always-on" data connection. It seemed to have been working fine for about 2 days, then suddenly my unit started to heat up significantly, (luckily no screen warp), and my battery would drain from 100% to 0% in 5 hours (if I was lucky). Unsatisifed with Rogers suggestion that replacing the unit with a refurbished unit was the way to go... I continued my research and experimentation and 48 hours later here is whatI came upwith so far:
1) Hard Reset - did not help the situation
2) Soft Reset when heating up - did not help the situation
3) Most frequently associated activity - ActiveSync on with 3G Data Connecton enabled and server directed to exchange server... no difference depending on how often I had the mobile device ping the exchange server. The heat and battery drain occurred while the TyTN was in hibernation (dead unit in the AM when I awoke).
4) Battery drain modifiers - worsens with worsening heat, worsens and acclerates if you remain in an area of low signal (less than 2 bars showing)
Best solution(s)/explanation(s) to date:
1) 3G is a battery killer - it uses a lower intenisty signal, and it generally draws heavier on the battery and hardware when using the network
2) In Phone settings, switching your Band to GSM (2G) fixes the device into one band (does not allow automatic switching and constant detection of best signal). Unless you are a real Power User and rely heavily on every ounce of speed that can be squeezed out of 3G there is no noticeable difference.
3) I have switched off the "receive allincoming beams" for the Ir interface to conserve every mV of power in my battery.
4) Since the switch (a few hours now) I have had no heat issues and the voltage has remained stable with ActiveSync on and mild websurfing to download a couple of CABs... granted it is minimal usage as it is 2:30AM but I think this may be the trick (on Rogers with a TyTN anyways)
I'll keep an eye on this and do some more analysis on the battery... Any input readily welcomed...
M
sounds like you simply need to buy a new battery.
It's not a tumoh!
Doesn't seem to be battery...
I recently tweaked reg with some battery hacks, locked it into 2G and all has been well. Holding a charge with the data connection engaged 24/7 - drops to about 65% charge over 24h, having to charge only every 2nd/3rd day...
M

Advanced battery management

Hi,
I wonder if we could have advanced battery charging management on Android in order to minimize wear. The basic idea is to avoid micro-cycles, i.e. don't start charging every time the power supply is plugged in. I find myself plugging in my Nexus several times a day, so I get several charge cycles every day. Instead, the Nexus should draw its power over USB, but not start charging.
The thinkpad_smapi module implements this for IBM/Lenovo laptops. There are two thresholds, start_charge_thresh and stop_charge_thresh. Setting the start threshold to e.g. 40 will not start charging unless the remaining capacity is below 40 %, and stop_charge_thresh will probably (I don't use it) stop charging early. I use a start threshold of 25 % on my Thinkpad, so I always have at least around 1 hour left, which is enough for me. I understand if people want a full battery all the time and rather buy a new battery every now and then. However, my first Thinkpad battery died after 1.5 years (~500 cycles). The second battery is 2 years old and still charges to 77 % of the original capacity (50 Wh of 64 Wh), so this simple measure has a significant effect.
There's a lot to know about LiPo/LiIon-batteries, way more than I know, but the bottom line is that keeping the battery between 40 % and 95 % minimizes chemical wear.
Maybe someone came across battery-related stuff while digging through the kernel sources and can comment on this. Charging is probably not handled in the kernel, but in the radio or by a dedicated circuit, but maybe there's an interface exposed to the kernel that can be used to set those threshold values. That's how it's done on Thinkpads.
Some changes to how charge management (which is done in the kernel in the ds2784_battery driver) is handled in full and near-full situations are under way. Look for them in the .32-test1 kernel sources in the near future. We're not planning on being quite as aggressive as you propose (wait until 40% to begin charging, etc), but reducing discharge/recharge cycling once the battery is full is planned.
swetland said:
Some changes to how charge management (which is done in the kernel in the ds2784_battery driver) is handled in full and near-full situations are under way. Look for them in the .32-test1 kernel sources in the near future. We're not planning on being quite as aggressive as you propose (wait until 40% to begin charging, etc), but reducing discharge/recharge cycling once the battery is full is planned.
Click to expand...
Click to collapse
i found some unusual battery behavior on the nexus one. i'll charge to 100% when on. then ill delete the batterystats.bin and power off. when off, the light is still orange. takes about a full 5 minutes later then turns green. when i do this and power on, with heavy usage it stays on 100% for 15-35 min, then slowly drops. but without doing this, it just slowly drops from 100%.
100% is not quite the same as fully charged (yes this is a little confusing). If you yank power immediately upon hitting 100% you will typically have a less full battery than if you let it sit until it stops charging. The "power off charge mode" doesn't indicate 100% with the green light -- it indicates "charge complete".
The battery log at /d/battery_log gives a bit more detail as to what's going on (as well as the chatter from the battery driver in the dmesg log).
swetland said:
100% is not quite the same as fully charged (yes this is a little confusing). If you yank power immediately upon hitting 100% you will typically have a less full battery than if you let it sit until it stops charging. The "power off charge mode" doesn't indicate 100% with the green light -- it indicates "charge complete".
The battery log at /d/battery_log gives a bit more detail as to what's going on (as well as the chatter from the battery driver in the dmesg log).
Click to expand...
Click to collapse
thanks for the response! i learned something new today
I've used the Battery University to guide me on Li-Ion batteries:
http://www.batteryuniversity.com/parttwo-34.htm
http://www.batteryuniversity.com/partone-12.htm
(scroll down on either page to see some guidelines).
The first page says that multiple partial recharges are healthier for the battery than fewer deeper discharge/recharges due to less heat buildup. Personally I have never fretted about just plugging in my Macbooks or phones whenever I wanted and the batteries have all lasted quite well.
I also use a slightly weaker charger for my G1 and N1 than the supplied chargers (500 to 700mA Blackberry chargers) and they don't get as hot when I charge them, yet charge to full capacity quickly enough for my needs. The second page recommends a 0.5C charge current (1C == 1400mAmps, 0.5C == 700mAmps) for better life.
I've been playing w the 32 test kernel and looks like this commit has implemented the battery management.
I've now noticed that if the battery level is higher than 90%, plugging in the charger will not charge the phone. Once the battery drops below 90, the battery will start getting charged.
http://r.android.com/#change,13342
is this .32 kernel going to be released as an OTA soon? or is it still in dev stages?
*push*
1.8 years later...
Is it finally implemented in Gingerbread? Are there any mods that provide a frontend to that settings?

Original battery is draining fast, is it dying?

I have my current HD2 since about 2 years now, still on the stock original battery, which was working fine till the last 1-2 months, now I am getting a bad battery life out of it, does this mean it is dying?
months ago, during my normal commute (30 minutes, with Waze navigator and BeyondPod playing podcasts), i used to drain around 10% of the battery, now the same commute drains 20% of the battery.
and just now, during the lunch break of 1 hour, the battery dropped from 50% to 28%, and all what I did was have it play an ebook with the screen off, then later before putting it to charge i noticed that the battery was draining around 1% per minute (while below 30%).
I have been using HyperDroid since few months now, and the only different thing I did 2 weeks ago was changing from magldr to CLK, I don't think this is the cause of the drain, but anyway I just installed CurrentWidget to see if there is some excessive drain by some apps. but maybe it is time to replace the battery....
You could check battery pins, check battery to see if swelling & soft in middle area & could also recalibrate battery data on device but personally if 2yrs old & heavily used a new one such as Andida or genuine (not from eBay) is going to be useful regardless of results & for price of Andida cheap diagnosis ...
Ok, it was the battery, but not only that:
The commute issue was that the kernel was draining it fast, I changed kernel and now drain is better, only 15% per commute.
But with the new battery, the drain when the battery is around 50% is MUCH slower now: yesterday all afternoon it drained 5% (from 47% to 42%), last week when I used the phone with battery below 50% I sometimes saw a drain of 1% per minute !!!
If you want to make sure you get the best battery life you can try these suggestions. These are things that i've tried or read has worked for many people.
My definitive quide to keeping your cell phone battery in top shape and retaining the longest battery life
1. Remove any apps that have not been used in over a few weeks
2. Turn your phone's back light to the shortest setting
3. Turn off wifi when not in use
4. Turn off gps when not in use
5. Turn off bluetooth while not in use
6. Make sure to adjust the brightness to the lowest visable level you like
7. Make sure your home screen is clutter free
8. Turn the vibrate function off
9. Consider disabling 3G
10. Try not to take a lot of pictures that require flash
11. Disable Flash while viewing webpages if you can
12. Dont keep a spare battery in your car, higher then room temps can shorten its life
13. Clean the battery contacts every once in awhile. Make sure battery pins are aligned while doing this
14. Turn down the update frequency ie, email, facebook etc..
15. If you’re in an area with no signal and will be for a long time, put your phone in "airplane mode"
16. Dont use a Animated Wallpaper
17. If you must use a headset, try a corded one because it will use much less battery then a bluetooth
18. Avoid using none OEM chargers
19. Make sure you keep your apps updated
20. Use simple Ringtones
21. Do not bring your cell phone into the bathroom while you shower, moisture can at times sink into the battery
22. Dont store battery in a phone that your not going to be useing for an extended period of time
23. Using a belt clip can keep your phone cooler then in your pocket thus keeping the temp of the battery lower
24. While surfing online use mobile site versions when ever possible or try using Black Google Mobile. It uses less battery and bandwidth
25. Darker wallpapers can use less battery then very bright ones
26. Disable always-on mobile data
27. Turn your wifi sleep policy to Never
28. Turn off keytones
29. Download a battery app to keep an eye on this stuff automatically so you dont need to
30. Don’t let it die: Avoid placing unwanted strain on your battery by charging it before it fully discharges
This Guide is something I have come up with over the past several months all pieced together from many sites giving their "best ways to save battery life".

Sudden drop in battery life

Ever since I had gotten my Nexus One back in July 2011, I had been really pleased by the battery life. With my usage patterns, I could easily get two days on a charge, sometimes getting three comfortably. All of the sudden, about half a week ago, I noticed that the battery would discharge itself really quickly. It would go from 100% to around 30% in a day. I hadn't changed my usage patterns, nor had I installed any new apps. I went into the settings for any apps that may be loading data in the background (Twitter, Facebook, News/Weather, etc) and made sure background data was enabled, and I always turn off mobile networks (EDGE/3G) and WiFi when I'm not using them. I even went as far as wiping the phone and resetting everything, but no change in battery life. Calibrating the battery by letting it fully discharge and then charging it fully while the phone is powered off also did nothing. I'm at a total loss here. This seems inexplicable as to why the battery life is now so bad.
i change my battery every 6-8 months batteries are stupid like that i had this problem also like 5 months ago i just bought a new battery then BINGO 3-4 days on 1 full charge with every know battery tweaks if you look for battery look in the Nexus Q&A thread someone asked whats the best battery life ... hope i helped
here's the post http://forum.xda-developers.com/showthread.php?t=1569069
Thanks. I think I'll order a new battery, probably a standard 1400mAh battery instead of one of the larger-capacity extended batteries. I don't really want to add any more weight or thickness to my phone. If that doesn't seem to do the trick, I'll probably just eventually buy a new phone. I've been looking for something different for a while now and this will give me a good excuse to do so. Heh.
I don't want to jinx myself here, but I may have found a temporary solution. Use only 2G networks. Curiously, about two or three weeks ago, I noticed that the mobile network type has changed from HSPA to HSDPA. AT&T appears to have done some upgrades to bring "4G" to the area. I wonder if the changeover has done something to my Nexus One and now was drawing more power from the device searching for a signal? Ever since I've disabled 3G, I've been on EDGE and I've only lost ~5% battery compared to the near 25% that I had lost on HSDPA. I'll check back if I find out anymore information.
One option is to try to recalibrate the battery. There is a root app out there that allows / guides you how to do this. Just search battery calibration. Additionally, instead of using an app, what you can do is boot into a custom recovery image (preferably 4EXT touch) and wipe the 'battery stats'. Then turn the device off, charge til the LED is green and then leave on the charge for an hour after it turns green (maybe overnight?). Then run the battery full out the next day to properly calibrate it.
Yes, 2G mode only does save a lot of battery. Apps that sync in the background (IE Gmail, FB, Twitter) use battery a lot. From your post it sounded like you have them set to auto update. Disable that or force it to refresh less often. What is sounds like is that your device maybe trying to connect to cell towers but is having a harder time; this may be due to ATT's 'upgrade'. I'm not too sure about that stuff though, haha.
Just as I had expected, I believe that it is an AT&T-related issue. A friend of mine who has an Aria has been experiencing the exact same battery drain issue that I had been having.
recalibrate your battery
1.drain your battery until you get the message "powering off"
2.quickly connect your charger
3.charge it 8 hours straight..
Battery calliberated...well it worked for me...:thumbup:
Sent from my HTC Nexus One using XDA
Solution
I had the exact same problem. I had a refurbished nexus one, everything was working fine for a month then suddenly one day battery life goes from 14-16 hours to 4-6. I call customer service and search online, do all the battery pull out replace and whatever but no result. Took it to a shop, they couldn't figure out how to fix it but mentioned perhaps I should change the power strip (the black plastic card wich has the power button, camera and flash attached to it). Look at ifixit nexus one teardown for the actual part. So I bought a new power strip, replaced it and my nexus one is back to its original 12-14 hours. Not sure if this will help you, but that's what I did to fix mine.

Still having charging issues with 4.2.2

I'm really frustrated because i really used to love the n7 so much I was an early adopter and bought another one after I dropped my first and then went on to buy my girlfriend one. But after being plagued with this issue and stuck on 4.1 its just not the same anymore since I cant flash custom roms all day :/
I've been having a charging issue with android 4.2.1 since it came out (both stock and all the roms I tried) but I noticed that whenever I reverted to 4.1.2 the issue went away completely. So I've been waiting for 4.2.2 to come out for a while now to see if it fixed the issue and after flashing the update tonight it seems to have the same problem.
I've tried searching for months now and haven't found any answers.
So this is the issue with both 4.2.1 and 4.2.2:
The battery charges at an insanely slow pace to the point that it ruins the tablet completely. I'll plug it in over night for 8+ hours and it will not gain more then 40% battery life in that time.
Its to the point that when I was just using it right now on the charger with brightness turned all the way down and nothing on other then sync and WiFi that light web browsing for 10 mins caused it to discharge a percent after being plugged in for 19 minutes.
Notes:
Its a c70 16gb
I tried 3 different stock N7 chargers with stock cables as well as trying them with other cables.
I'm not plugged into any kind of extension cords and I've tried multiple wall sockets at different locations.
My girlfriends nexus 7 32g charges fine on 4.2.1 and I have not updated her to 4.2.2 to test yet.
I haven't checked the battery connection because like I said whenever I revert to stock 4.1.2 or any 4.1.2 rom it charges in 4 hours flat or 6 hours with heavy usage while charging.
So anyone have any ideas? If not I guess I have to rma.
Do both, yours and your girlfriend's devices take that long to charge?
sl4y3r88 said:
Do both, yours and your girlfriend's devices take that long to charge?
Click to expand...
Click to collapse
Nope her nexus 7 charges fine. ( a little slower on 4.2 then 4.1 but nothing like mine)
Her nexus does have issues with turning on sometimes on 4.2.1 like a lot of other users but its nothing holding the power button for 10 seconds doesn't fix.
It also just noticed it seems to discharge at an extremely fast pace. (still on 4.2.2)
It just dropped from 55% to 51% in the time I've typed these responses with brightness all the way down.
So anyone want to try and help me figure this out before I send it in friday? I called it in to Google play device support to try and report the software bug and they said its the first they heard of it and they would pass it on but I felt like the rep didnt want to help as I bought it from a third party. I'm willing to do any tests suggested and hop between software versions to try and figure out this bug.
Why do you think it is a "software bug" when millions of people running the "same software" don't experience the same behavior?
I realize that software can exhibit data-dependent behaviors, and thus exhibit low occurrence rates... but there is no "software" involved in charging the battery.
Do you think a booted Linux kernel is needed to charge a battery? How would the battery get charged when the device is turned off in that case? C'mon!
Send it back and tell them the battery (or charge contoller CIRCUIT) is defective.
If it's out of warranty, PAY them to replace it.
bftb0 said:
Why do you think it is a "software bug" when millions of people running the "same software" don't experience the same behavior?
I realize that software can exhibit data-dependent behaviors, and thus exhibit low occurrence rates... but there is no "software" involved in charging the battery.
Do you think a booted Linux kernel is needed to charge a battery? How would the battery get charged when the device is turned off in that case? C'mon!
Send it back and tell them the battery (or charge contoller CIRCUIT) is defective.
If it's out of warranty, PAY them to replace it.
Click to expand...
Click to collapse
Then how do you explain that if right now I flash back to 4.1.2 it will work fine? If you want I'll provide screenshots.
I just flashed back to 4.1.2 this morning and it worked perfectly. Just now I flashed codefires 4.2.2 build and the problems back.
Please explain how that is hardware related.
I may of jumped the gun assuming it was a charging issue. It seems like it might be a battery drain issue. Here's a couple screenshots from a fresh install of codefirex 4.2.2 build.
Sent from my Nexus 7 using XDA Premium HD app
All I was trying to say is that when the OS is booted, at most all it does is monitor battery voltage and current - it doesn't get actively involved in control of charging circuitry.
At most this historical data can be used to *predict* when the battery will run out of juice, and this number is what is shown to the user as a % charge number. Hopefully that allows the prediction to be sort of correct as the battery ages and it's characteristics change.
This "calibration data" is only used for prediction - it does absolutely nothing to alter the rate at which current is drawn from the battery by the motherboard, nor for attempting to alter the behavior of a battery charge controller.
Li-Ion and Li-Polymer batteries are indeed complicated enough that they should not be charged by extremely simple circuits if a long operating lifetime is desired. For this purpose though, monolithic battery charge controllers chips are used - they do not need any assistance of a micro-controller or advanced CPU running a modern OS. That's why they are able to charge batteries rapidly and appropriately when the motherboard is in a "powered down" state.
Relative to a big multi-core CPU chip, which might have hundreds of millions of transistors, battery charge controllers are extremely small circuits - they are sold by the billions and cost in the ballpark of one to several pennies. They don't need the support of a CPU or even a microcontroller to operate correctly.
Good luck with your tab; I hope you enjoy it.
bftb0 said:
All I was trying to say is that when the OS is booted, at most all it does is monitor battery voltage and current - it doesn't get actively involved in control of charging circuitry.
At most this historical data can be used to *predict* when the battery will run out of juice, and this number is what is shown to the user as a % charge number. Hopefully that allows the prediction to be sort of correct as the battery ages and it's characteristics change.
This "calibration data" is only used for prediction - it does absolutely nothing to alter the rate at which current is drawn from the battery by the motherboard, nor for attempting to alter the behavior of a battery charge controller.
Li-Ion and Li-Polymer batteries are indeed complicated enough that they should not be charged by extremely simple circuits if a long operating lifetime is desired. For this purpose though, monolithic battery charge controllers chips are used - they do not need any assistance of a micro-controller or advanced CPU running a modern OS. That's why they are able to charge batteries rapidly and appropriately when the motherboard is in a "powered down" state.
Relative to a big multi-core CPU chip, which might have hundreds of millions of transistors, battery charge controllers are extremely small circuits - they are sold by the billions and cost in the ballpark of one to several pennies. They don't need the support of a CPU or even a microcontroller to operate correctly.
Good luck with your tab; I hope you enjoy it.
Click to expand...
Click to collapse
Thank you for taking the time to write out this detailed explanation. I read it over a couple times and that all makes a lot of sense and now I have a little better understanding of how things work charging wise.
But I still can't wrap my head around how the problem DISAPPEARS COMPLETELY on any 4.1 based build...
I'm not trying to contradict you in anyway it seems like you are way more knowledgeable then me on the subject.
It just doesn't make any sense and I was hoping you could make more of it for me.
Maybe it isn't the charging but a battery drain issue something on 4.2 based builds is draining more current then the charger can dish out.
But while i was doing research I read that chargers up the current they dish out if the device is in use. Is that correct?
I've looked into the media server bug but as I just did a fresh install of stock 4.2.1 and haven't changed or added anything to the file structure that wasn't included in the factory image, I also went through and turned off the keyboard press sound and all other sounds like explained in some of the threads I have read. I also read that the problem is supposed to be fixed in 4.2.2. I also haven't installed any apps from the market.
I guess all I'm looking for is the answer to this question:
Could there really be a hardware related problem of any sort (not just charging and battery problems but anything) that causes problems with 4.2 based builds specifically but doesn't cause problems with 4.1?
If the answer is yes then I don't have to feel bad about sending it in but if its software based issues I'll be upset that I wasn't able to fix it and gave up.
Have you let the battery drain all the way or do you just plug it in at a certain point? if not let it get to the point were it will turn itself off. if the battery with the cross in it stays for more than it would take for 1% to drain then it just might be your battery stats file. even if its not let it drain and then charge it while its off. you can check the battery by pushing the power button quick. i know i have had this problem with other devices that were fixed by doing this. and my N7 did it last night were i updated and plugged it in, it was at 60% and when i woke up it was at 46%.
projectzro said:
Have you let the battery drain all the way or do you just plug it in at a certain point? if not let it get to the point were it will turn itself off. if the battery with the cross in it stays for more than it would take for 1% to drain then it just might be your battery stats file. even if its not let it drain and then charge it while its off. you can check the battery by pushing the power button quick. i know i have had this problem with other devices that were fixed by doing this. and my N7 did it last night were i updated and plugged it in, it was at 60% and when i woke up it was at 46%.
Click to expand...
Click to collapse
I'll give this a try right now then post results, the battery is already pretty low so It shouldn't take very long. Thanks for the response.
projectzro said:
Have you let the battery drain all the way or do you just plug it in at a certain point? if not let it get to the point were it will turn itself off. if the battery with the cross in it stays for more than it would take for 1% to drain then it just might be your battery stats file. even if its not let it drain and then charge it while its off. you can check the battery by pushing the power button quick. i know i have had this problem with other devices that were fixed by doing this. and my N7 did it last night were i updated and plugged it in, it was at 60% and when i woke up it was at 46%.
Click to expand...
Click to collapse
So I let it run dry and am getting some weird behavior...
The dead battery symbol did not pop at all. It actually booted played the low battery sound half way through the nexus logo loaded into the OS and immediately was greeted by the battery to low logo powering down message and then it returned off. It did this cycle all the way through three times in a row before holding the power button did nothing. I let it sit for a minute before trying again and I got another boot out of it all the way to the OS again. But I've yet to be greeted by the battery with the cross symbol. Holding the power button will do the cycle described above or do nothing at all.
krisserapin said:
But while i was doing research I read that chargers up the current they dish out if the device is in use. Is that correct?
Click to expand...
Click to collapse
Well, the 120v->5v converter certainly can be providing more current @5v because the device is active, but that's only because the motherboard is drawing current in parallel with the battery charging circuit. It doesn't mean the battery charge rate is higher.
krisserapin said:
Could there really be a hardware related problem of any sort (not just charging and battery problems but anything) that causes problems with 4.2 based builds specifically but doesn't cause problems with 4.1?
Click to expand...
Click to collapse
I suppose so.
I would do a few things to determine whether that is a reasonable hypotheses, though.
1) See how fast the battery charges with the tablet turned off. Should be close to 40%/hour for a new battery. You know there is no "software" running with the tablet turned off, so if you don't see some reasonable number here (say > 20%/hr) then a bad battery or charge controller circuit in the tab are the most likely culprits. Also, if the temperature rise of the tablet while doing this seems higher than the gf's unit, that would implicate the battery, not the charging circuit.
2) There's software, and then there's software. (Preinstalled vs. User installed) Run the battery down a ways, and then observe the battery charging rate with the device on but screen off (sleeping), but on a stock 4.2 install with ZERO user apps installed. Then, install/restore all your favorite apps, reboot, maybe use a couple of your fave apps, and repeat the same charge rate trial (screen off/sleeping). Are there large differences between the two cases? If so, that would implicate one of your apps in causing either lots of additional compute operations or preventing entry into the LP0 state (perhaps because of wakelocks?)
The thing is, the N7 battery is rated at 4325 mAh; that is sort of the same thing as 4.325 amps of current for 1 hour. (Voltage range of roughly 4v to 3.5v).
So, if a "good battery" can be charged in 2.5hrs, that is sort of like stuffing 1.73 amps into the battery for that time (1.73 x 2.5 = 4.325 A-h or 4325 mA-h). That's pretty near to the max capacity of the AC charger (2A)
Now, some users have reported discharging their tabs in 4 hours under heavy continuous use; that would be about 1.08 amps for 4 hours.
Since the wall charger is rated to produce 2A, this suggests that very heavy usage simultaneous with charging would indeed cause battery charging to slow down significantly - let's suppose it drops from 1.73a to 0.65a. Now it takes the battery 6.6hrs to charge ... but that is still just over 15%/hr ... with the tab in active use.
But that's not what you were noticing - you were seeing much worse charge rates than this when the tablet was supposed to be more or less idle!
Finally I should point out that I previously mentioned that the % charge number is a prediction, not a measurement! If for some reason this number were screwed up, then the "charge rate" observations could be completely screwed up. (Think of this as being analogous to trying to partially fill a gas tank in a car or estimate fuel mileage with a broken gas gauge) The only way to be sure that you are not falling victim to something like this is to record battery voltages - the 100% level should be up around 4v, and the 10% values down around 3.5v.
You can observe this value at /sys/devices/platform/tegra-i2c.4/i2c-4/4-0055/power_supply/battery/voltage_now
(note value is reported in uV)
Whew - long post. It doesn't directly answer your question about "why was 4.1 so different?" - but gives you an idea about why I was skeptical when you saw charging rates as low as you did.
I dunno, maybe the % charge prediction value numbers are screwy on your tab for some strange reason in 4.2, perhaps because of a minor hardware difference. I can't rule it out - I once saw a bug expression in a hardware/software combination that required three independent conditions (from three separate vendors!) to have precise configurations before the bug would show itself.
I hope this post gives you some ideas to try; it certainly doesn't give a solution.
Good luck - if you feel like spending more time investigating, go for it; just don't let the clock run out on the warranty period if you have one left.
bftb0 said:
Well, the 120v->5v converter certainly can be providing more current @5v because the device is active, but that's only because the motherboard is drawing current in parallel with the battery charging circuit. It doesn't mean the battery charge rate is higher.
I suppose so.
I would do a few things to determine whether that is a reasonable hypotheses, though.
1) See how fast the battery charges with the tablet turned off. Should be close to 40%/hour for a new battery. You know there is no "software" running with the tablet turned off, so if you don't see some reasonable number here (say > 20%/hr) then a bad battery or charge controller circuit in the tab are the most likely culprits. Also, if the temperature rise of the tablet while doing this seems higher than the gf's unit, that would implicate the battery, not the charging circuit.
2) There's software, and then there's software. (Preinstalled vs. User installed) Run the battery down a ways, and then observe the battery charging rate with the device on but screen off (sleeping), but on a stock 4.2 install with ZERO user apps installed. Then, install/restore all your favorite apps, reboot, maybe use a couple of your fave apps, and repeat the same charge rate trial (screen off/sleeping). Are there large differences between the two cases? If so, that would implicate one of your apps in causing either lots of additional compute operations or preventing entry into the LP0 state (perhaps because of wakelocks?)
The thing is, the N7 battery is rated at 4325 mAh; that is sort of the same thing as 4.325 amps of current for 1 hour. (Voltage range of roughly 4v to 3.5v).
So, if a "good battery" can be charged in 2.5hrs, that is sort of like stuffing 1.73 amps into the battery for that time (1.73 x 2.5 = 4.325 A-h or 4325 mA-h). That's pretty near to the max capacity of the AC charger (2A)
Now, some users have reported discharging their tabs in 4 hours under heavy continuous use; that would be about 1.08 amps for 4 hours.
Since the wall charger is rated to produce 2A, this suggests that very heavy usage simultaneous with charging would indeed cause battery charging to slow down significantly - let's suppose it drops from 1.73a to 0.65a. Now it takes the battery 6.6hrs to charge ... but that is still just over 15%/hr ... with the tab in active use.
But that's not what you were noticing - you were seeing much worse charge rates than this when the tablet was supposed to be more or less idle!
Finally I should point out that I previously mentioned that the % charge number is a prediction, not a measurement! If for some reason this number were screwed up, then the "charge rate" observations could be completely screwed up. (Think of this as being analogous to trying to partially fill a gas tank in a car or estimate fuel mileage with a broken gas gauge) The only way to be sure that you are not falling victim to something like this is to record battery voltages - the 100% level should be up around 4v, and the 10% values down around 3.5v.
You can observe this value at /sys/devices/platform/tegra-i2c.4/i2c-4/4-0055/power_supply/battery/voltage_now
(note value is reported in uV)
Whew - long post. It doesn't directly answer your question about "why was 4.1 so different?" - but gives you an idea about why I was skeptical when you saw charging rates as low as you did.
I dunno, maybe the % charge prediction value numbers are screwy on your tab for some strange reason in 4.2, perhaps because of a minor hardware difference. I can't rule it out - I once saw a bug expression in a hardware/software combination that required three independent conditions (from three separate vendors!) to have precise configurations before the bug would show itself.
I hope this post gives you some ideas to try; it certainly doesn't give a solution.
Good luck - if you feel like spending more time investigating, go for it; just don't let the clock run out on the warranty period if you have one left.
Click to expand...
Click to collapse
Wow thank you so much for the help. I'll play around with this tonight and see what happens. If I can't figure it out by the morning I think I'll be able to RMA it without feeling like I just rolled over and let my n7 get the best of me.
So after charging it on stock 4.2.1 with the power completely off it only charged 3% in a little over a hour and voltages read 3.6. I'm gonna leave it on the charger over night turned on starting from 3% with only two extra battery monitoring apps installed and report back in the morning with screenshots of the results. After that ill probably revert to 4.1.2 drain the battery fully, charge it off for an hour report the values then let it charge fully with the battery apps on for reference take a few more screenshots then lock the bootloader install the ota and ship it off to good old ASUS since it sounds like its hardware from whats been explained.
FWIW, I drained my N7 last night (LOL, typing novels into XDA threads) - when I finished I was at 6% charge - that was 3.66v. In the morning @ 100%, the battery voltage was 4.1-something.
Sounds to me like you've definitely got a hardware problem.
Good luck with the RMA.
Canyou help me?
Since I flashed 4.2.2 my 240V-USB charger only cahrges thes battery about 5% in one hour.
Before (with 4.2.1) It was definitely faster. It charged more tha 5% per hour (maybe 20-25%).
I double checked the plug in the socket. checked the correct fit of the USB cable on the docking station.
Everything fits tight. No wiggle.
It must be software related, since it started after flashing the OTA zip from 4.2.1 to 4.2.2
Polarfuchs said:
Canyou help me?
Since I flashed 4.2.2 my 240V-USB charger only cahrges thes battery about 5% in one hour.
Before (with 4.2.1) It was definitely faster. It charged more tha 5% per hour (maybe 20-25%).
I double checked the plug in the socket. checked the correct fit of the USB cable on the docking station.
Everything fits tight. No wiggle.
It must be software related, since it started after flashing the OTA zip from 4.2.1 to 4.2.2
Click to expand...
Click to collapse
From a partially charged state, say below 50%, turn the device off, (NOT sleeping, but powered OFF) and put it on the charger for one hour.
It should charge at around 30-40%/hr.
As I pointed out above, how is it possible that software would be affecting the charging with the device turned OFF?
I believe you are seeing exactly what you report; my best guess is that a hardware problem occurred just about coincidentally with your upgrade. Just coincidence - not causation.
You also should inspect the battery voltage (see above for path in /sys) in case something crazy is happening with the %charge *prediction* (it is not a measurement) - because the total charging range is from about 3.65v-4.15v, a normal charge rate should be roughly 150 to 200 mV/hr
good luck

Categories

Resources