[Guide]Using the Advanced Charging Controller (ACC) Magisk Module with Pixel 3a/XL - Google Pixel 3a Guides, News, & Discussion

While I've had many Android phones, this is the first phone that I decided to use a battery charging controller to regulate how my battery is charged. I just wanted to share my journey with others and encourage others to try this out if you are not already.
Although there are several different battery charging controllers out there (and more than one named "ACC" which makes it even more confusing) I decided to use the Advanced Charging Controller module developed by VR25. I choose this module because I felt it provided the most customization.
Step 1 - Installation
Installing the module is easy. It is listed in the Magisk repository. Simply browse the available modules and find the one titled, "Advanced Charging Controller (acc) created by VR25 @ XDA-developers". There are several ACC modules, so make sure you install the one by VR25 to follow this thread.
Magisk will flash the module and start it automatically. You don't even need to reboot, although it is the only way to clear the Magisk notification that the module will be started at the next reboot.
Step 2 - Changing the Charging Switch Setting
I found that the default charging switch setting (auto) does not work reliably with our phones. Therefore I would suggest changing it using the commands below. Personally I have choose option 2 (battery/charge_disable 0 1) but I listed all the options with the quirks that I have found with each one.
Step 2.1 - open your preferred command line app - I use Terminal Emulator.
Step 2.2 - type "su" and hit enter to gain root
Step 2.3 - type "acc -s s" and hit enter - this is the command that allows us to select another charging switch
Step 2.4 - type what number of the charging switch you want to use.
Here are the available charging switches and the issues I have found with them:
1) Automatic - this switch tries to cycle through the available switches until if find one that "works".
- Passes the ACC switch test (type "acc -t"): Yes
- Charges and discharges according to the cooldownratio: No - I found that the phone would charge anytime it was plugged in and below the Pause threshold. It did not seem to wait until the battery level was below the Resume threshold.
- Works with battery idle mode (the phone will pull power from the AC power and not the battery when the battery reaches the Pause threshold): Yes
- Begins charging when phone reaches Resume threshold: Yes
- Charging "chime" and battery icons correctly reflect if the phone is charging or discharging: ???
- Suffers from wakelock issues when phone is plugged in but not charging: It does have a "overheat_mitigation" wakelock when on the battery idle mode, but because the phone is not using the battery power, it doesn't effect battery life and therefore I don't concern myself with this issue.
- Other issues:​
2) battery/charge_disable 0 1 :
- Passes the ACC switch test (type "acc -t"): Yes
- Charges and discharges according to the cooldownratio: Yes
- Works with battery idle mode (the phone will pull power from the AC power and not the battery when the battery reaches the Pause threshold): Yes
- Begins charging when phone reaches Resume threshold: Yes
- Charging "chime" and battery icons correctly reflect if the phone is charging or discharging: ???
- Suffers from wakelock issues when phone is plugged in but not charging: It does have a "overheat_mitigation" wakelock when on the battery idle mode, but because the phone is not using the battery power, it doesn't effect battery life and therefore I don't concern myself with this issue.
- Other issues:​3) battery/input_suspend 0 1:
- Passes the ACC switch test (type "acc -t"): Yes
- Charges and discharges according to the cooldownratio: Yes
- Works with battery idle mode (the phone will pull power from the AC power and not the battery when the battery reaches the Pause threshold): No - phone begins discharging from battery when Pause threshold is reached but the phone is still plugged in
- Begins charging when phone reaches Resume threshold: Yes
- Charging "chime" and battery icons correctly reflect if the phone is charging or discharging: No - may show charging icon when phone is really discharging, especially during cooldownratio times and the chime doesn't always ring when charging resumes.
- Suffers from wakelock issues when phone is plugged in but not charging: No
- Other issues: The phone seems to follow the cooldown charge/discharge times even before reaching the cooldown threshold. I find the phone pausing for 10 seconds (my cool down ratio) when the batter level might be a 50% - long before the 60% cooldown threshold I have set in the config file.​4) dc/input_suspend 0 1:
- Passes the ACC switch test (type "acc -t"): NO, so this switch doesn't work with ACC
- Charges and discharges according to the cooldownratio:
- Starts discharging when the phone reaches the Pause threshold:
- Begins charging when phone reaches Resume threshold:
- Charging "chime" and battery icons correctly reflect if the phone is charging or discharging:
- Suffers from wakelock issues when phone is plugged in but not charging:
- Other issues:​5) battery/charge_control_limit 0 1:
- Passes the ACC switch test (type "acc -t"): NO, so this switch doesn't work with ACC
- Charges and discharges according to the cooldownratio:
- Starts discharging when the phone reaches the Pause threshold:
- Begins charging when phone reaches Resume threshold:
- Charging "chime" and battery icons correctly reflect if the phone is charging or discharging:
- Suffers from wakelock issues when phone is plugged in but not charging:
- Other issues:​
Step 3 - Configuration
You can configure the ACC controller using a couple of different methods. You can do everything using command lines, you can use the beta ACC app (see note below), or you can edit a config file that ACC creates when it is installed. Personally I found that editing the config file was the quickest and easiest method to make general changes.
The ACC config file is found at /storage/emulated/0/acc The file is named "config.txt" You can open the file with a text editor. I personally use the app Root Explorer. I long click on the file name, and then press the three dot button in the upper right hand corner. Choose "Open in Text Editor" and the config file will open and allow changes to be made. Saving the file will automatically push the changes to ACC, you do not need to reboot or restart the ACC daemon for changes to take effect.
I won't go into a lot of detail about all of the different configuration options here as the developer's xda thread is the best place to get that type of information. But I will talk about the most basic setting - the "capacity" setting. It is the second setting listed in the config file and it should look something like "capacity=0, 60, 70-80". Here is a break down of what those numbers mean:
- The First Number (0): is battery level were the phone will shut off. The default setting of 0 means the phone will turn off when the battery level hits 0. Personally I don't want my battery completely draining, so I have it set at 5.
- The Second Number (60): is the battery level where the module starts it's "cool down" functionality. Cool down (listed as coolDownRatio in the config file) is where the phone will stop charging briefly and then restart charging. The default "cool down" setting is coolDownRatio=50/10 which means the phone will charge for 50 seconds, and then stop charging for 10 seconds before charging again for 50 seconds, etc, etc, etc. This is designed to keep the battery temps low. A battery with a charge level less than this number (60 in this example) will charge without pausing, but when the battery level gets to this number or above, the phone will charge and pause based on the coolDownRatio.
- The Third Number (70): is the "resume" value. If the phone's battery level is below this resume value, the phone will charge. If the battery level is at or above this resume value, the phone will not charge even while plugged in.
- The Fourth Number (80): is the "pause" value. This is the battery level where the phone will stop charging and should not charge above this value.​
The default settings are set this way because research has shown that a phone's battery will last the longest with the least amount of battery capacity loss if it is charged to a max of 80% of the battery's capacity, and allowed to discharge just a small amount (10%) before being charged again. I realize this goes against the old "wives tale" that our phone's batteries have a very limited number of charges and it is best to limit the number of charges by only charging the phone when it gets to a low level. This is not true in actual battery performance however and if you charge like this, you are actually decreasing your battery's life expectancy and performance.
Obviously the default settings may not be the best setting for you. The default settings are probably only practical for a device that is plugged in 100% of the time. Personally I have changed my capacity setting to capacity=5, 60, 70-90. This means my phone will turn off when the battery level reaches 5% (something it has never dropped to yet), it is charged to a max of 90% and will discharge to 70% before charging again, and the cooldown charging cycling starts when the battery is 60% or higher. Obviously I'm not on my charger all the time, so it is very common for my battery to drop below 70%. However, if the battery is below 70% and I have a charger at my disposal, I am going to charge the phone back to 90% rather than let it the battery levels continue to fall.
Final Notes and Misc Thoughts
There are lots of other options and commands you can use in ACC. Feel free to share any changes you like to make, or post if you are having problems getting the module to work as expected on the 3a. I hope this helps some people feel give the module a try.
There is an ACC app that is available now that allows you to control some of the settings from a nice GUI. I personally did not like using it as I found it would overwrite settings in the config file that I was not intending to be changed.
There is an ACC telegram group if you want to join and have direct communication with the developer and others.
Thanks to @jellopuddingstick for educating me on what the battery idle mode does and why it is beneficial to have it working!

if you want to extend your batteries life, one of the best ways is to not fast charge it. fast charging not only degrades it a bit faster because of the amount of current, but it also tends to heat the battery up more which makes it degrade even faster too. heat is the main reason i tell people not to use wireless charging.

pbanj said:
if you want to extend your batteries life, one of the best ways is to not fast charge it. fast charging not only degrades it a bit faster because of the amount of current, but it also tends to heat the battery up more which makes it degrade even faster too. heat is the main reason i tell people not to use wireless charging.
Click to expand...
Click to collapse
This is why I always use a low current charger unless I absolutely need a quick charge. I have used the Dash charger that came with my OnePlus 5 only about 10 times in 2 years.

As I use my phone more, I realize that none of the charging switches seem to work 100% of the time as expected. I'll continue to do trial and error tests, but please share if you find a switch that works consistently.

sic0048 said:
As I use my phone more, I realize that none of the charging switches seem to work 100% of the time as expected. I'll continue to do trial and error tests, but please share if you find a switch that works consistently.
Click to expand...
Click to collapse
I was having issues with ACC not working before installing the apk. I'll report back if I have any issues.
Nice guide BTW.

I've continued to edit my original post to provide as much information about the different charging switches and the issues I see with each one. Hopefully it is easy to understand.
I still find myself defaulting to the 3rd charging switch option and while it can act a little erratic sometimes, it does work normally most of the time.

I'm just curious if anyone has tried the "auto" charging switch in the latest ACC version? According to the release notes, there was some changes made to the auto system as it may not have been working correctly.
I'll try it here in a little while, but thought I would ask.

sic0048 said:
I'm just curious if anyone has tried the "auto" charging switch in the latest ACC version? According to the release notes, there was some changes made to the auto system as it may not have been working correctly.
I'll try it here in a little while, but thought I would ask.
Click to expand...
Click to collapse
I've been using the apk auto switch, no issues.

Is this working for anyone:
usb/current_max:500000
I have is set in the app as an On plugged option and It is not working for me.

gargleblarg said:
I've been using the apk auto switch, no issues.
Click to expand...
Click to collapse
The phone discharges at the pause threshold and not simply hold the charge at the threshold percentage?
I found the auto setting showed the same tendencies as switch 2 - not discharging below the pause threshold. But I haven't tried it with the new release which specifically mentioned the auto setting bring changed.

sic0048 said:
The phone discharges at the pause threshold and not simply hold the charge at the threshold percentage?
I found the auto setting showed the same tendencies as switch 2 - not discharging below the pause threshold. But I haven't tried it with the new release which specifically mentioned the auto setting bring changed.
Click to expand...
Click to collapse
I'm on 2019.6.14-r1 version.
I charged up to 80% and kept it plugged in to see if it would drop or maintain, it dropped. It took forever.
Edit: 8 hours later and it has only dropped to 78%
@creeve4, I can't get the On Plugged options to work either. I tried "./usb/current_max:500000" and "usb/current_max:500000", I tried unplugging/plugging in the charger, resetting the daemon, still no luck. The settings were saved to the config file correctly. No idea.

gargleblarg said:
I'm on 2019.6.14-r1 version.
I charged up to 80% and kept it plugged in to see if it would drop or maintain, it dropped. It took forever.
Edit: 8 hours later and it has only dropped to 78%
Click to expand...
Click to collapse
Interesting. That's unfortunately not what I experience.
I just tried the auto setting and plugged my phone in and it immediately went into what I am calling a "maintenance charge". It was only charging the phone by about 200 mA. I set the charging switch back to #3, unplugged and replugged in the phone and it is charging at about 1200mA which a pretty normal charging current for me.
It's this same roughly 200mA charge that I have seen previously with the auto setting after the phone reaches the set pause threshold - so the phone charges at normal current levels and then drops to the 200mA current after reaching the pause threshold. Admittedly, I did not allow the phone to reach the pause threshold this time (which would take forever at 200mA), but seeing that charging level at all leads me to believe that the auto charging switch is still not working for me (it should either be fully charging or full discharging). I suspect because the phone was above the resume threshold it defaulted to this maintenance charge (thinking the phone shouldn't be fully charged until it dropped below the resume threshold).

sic0048 said:
Interesting. That's unfortunately not what I experience.
Click to expand...
Click to collapse
What was the battery level when you plugged it in?

sic0048 said:
Interesting. That's unfortunately not what I experience.
Click to expand...
Click to collapse
That is interesting, have you tried updating yet?
I should also mention that I have only changed the percentage to 3% for the phone to shut off, the rest of the options are default.

Is anyone else getting the following message in the acc app after updating to the latest version?

creeve4 said:
Is anyone else getting the following message in the acc app after updating to the latest version?
Click to expand...
Click to collapse
I'm not using the app, so I can't answer your question. I was hoping someone else might chime in if they are using the app.

sic0048 said:
I'm not using the app, so I can't answer your question. I was hoping someone else might chime in if they are using the app.
Click to expand...
Click to collapse
I just needed to update to the latest app version. The module was updated before the app.

Did anyone else lose their config settings when updating the ACC module recently? I updated a day or two ago and woke up to my phone at 100% charge. I started troubleshooting and found that the config file was set to all the default settings. This means the charging switch was set to "auto" which has never worked for me and it explains why the module didn't pause the charging at the default pause setting (80%).
The release notes talked about a lot of changes in the config file, but it never mentioned that users would lose their settings and be reset to default. I was just curious if anyone else experienced the same thing or not.

There's a bit of misinformation / misunderstanding going on here, I think. The best control file for our devices is battery/charge_disable. The "maintenance charge" (ACC refers to it as "idle mode") you're referring to is a good thing! This is explained both in the ACC readme [1] and by the developer of Battery Charge Limit [2][3]. The ping-ponging between the upper and lower thresholds is a fallback, it's not the desired mechanism. Hope this clears things up!
[1] "Charging switches that support battery idle mode take precedence", https://github.com/VR-25/acc/blob/master/README.md
[2] https://forum.xda-developers.com/showpost.php?p=76523599&postcount=1834
[3] https://android.stackexchange.com/a/200037

umm, i would be happy if someone give an advice to me the best configuration for the best battery charging cycle, anyone can help me?

Related

Battery Power Saving Tricks Listing

I am trying to compile a large list of tips and tricks that we users can use to extend the life of our small batteries.
List is here:
http://android-simplicity.blogspot.com/2009/08/bag-of-tricks-1-increase-battery-life.html
On-Going Power saving List
1. Under-clock your cpu(for root users only). Download->over clocking widget->set cpu speed to lowest value
2. Turn off GPS
3. Reduce the number of start up apps
4. Restart phone
5. Lower screen brightness
6. Turn off Wi-fi when you are not around any wifi networks
7. Turn off 3G Mobile Data Network - Settings--->Wireless Controls--->Mobile Networks and check the box that says "Use Only 2G Networks.
8. Disable auto Data Sync
9. Download and install "Power Manager"
10. Disable back ground apps - [~JDBDogg]
11. Turn off keyboard backlight (for Dream/G1 only for obvious reasons) with Backlight Off app. Only works on rooted phones. [~Chahk]
12. Turn off any unnecessary noises or vibrations, such as for on-screen keyboard and games. [~AdamPI]
13. Make sure your firmware and apps are up to date, efficiency may be improved. [~AdamPI]
14. Use headphones. [~AdamPI]
15. Turn off Bluetooth. [~AdamPI]
16. [~Yours goes here]
If you have any tricks that you use to get the most time juice out of your phone, please share them to the rest of us. Thanks.
Disable background apps
Turn off keyboard backlight (for Dream/G1 only for obvious reasons) with Backlight Off app. Only works on rooted phones.
Chahk said:
Turn off keyboard backlight (for Dream/G1 only for obvious reasons) with Backlight Off app. Only works on rooted phones.
Click to expand...
Click to collapse
nice, one ! didnt think of that~
Lower the time it takes for the screen to time out.
Id also say take off any widgets you may have but i guess that falls underneath the "disable background apps" category
Bluetooth isn't mentioned.
Turn off any unnecessary noises or vibrations, such as for on-screen keyboard and games.
Make sure your firmware and apps are up to date, efficiency may be improved.
I'd guess using headphones is better than the speaker, plus no-one on the bus wants to hear your "music".
Has anyone tested decoding efficiency of video and audio codecs? AAC saves space, but does it use more battery than mp3?
up to 15
AdamPI said:
Bluetooth isn't mentioned.
Turn off any unnecessary noises or vibrations, such as for on-screen keyboard and games.
Make sure your firmware and apps are up to date, efficiency may be improved.
I'd guess using headphones is better than the speaker, plus no-one on the bus wants to hear your "music".
Has anyone tested decoding efficiency of video and audio codecs? AAC saves space, but does it use more battery than mp3?
Click to expand...
Click to collapse
Now thats thinking out of the box. Thanks AdamPI
We have now 15 on the list. Lets see how long this can go~
Someone should do a test using all of these tricks and do a comparison, although it will be a very boring phone at this point with everything off.
Don't use a ROM that requires a linux-swap Partition
This causes the phone to die faster because the sd card is constantly being acessed
jf4888 said:
Don't use a ROM that requires a linux-swap Partition
This causes the phone to die faster because the sd card is constantly being acessed
Click to expand...
Click to collapse
SD Cards are so cheap these days that you shoudn't worry about damaging them. In a weird way though, this advice does make sense. Swap = more apps are being kept in memory, thus more work being performed by the phone, which translates to higher power consumption.
But then again, following this logic a similar advice would be to not run any apps at all. Or better yet, just shut your phone off! Maybe then it will last a full day on a single charge
Seriously though, if you're worried about damaging your phone, read up on Lithium-Ion/Polymer batteries and how to prolong their lifespan. The main points are:
Don't let them get too hot. Heat damages battery cells and cause them to lose their capacity.
Deep discharge cycles (letting the battery drain before fully charging them) kill these batteries fast. LiIon/LiPolymer batteries like to be "topped off" once the level gets to 60-70% mark.
Discharge cycles can improve state-of-charge estimation, so only perform those when the battery meter goes out of whack and doesn't tell the charge level properly. This doesn't happen often.
They don't suffer from the "memory" and overcharge issues that used to plague batteries using older technologies (NiCad/NiMH), so it's safe to keep the phone plugged in whenever you can.
The "first-time cycle" is a myth left over from Nickel-based batteries. This means you don't need to charge the batter for 8 hours the first time you use it.
Do not use "fast chargers" since their usage can decrease the lifespan of the battery.
Get an app that turns off your data network completely (like WiSyncPlus). Not just "use 2G only" but COMPLETELY. I can go a whole weekend, with normal use, without charging my phone if I need to. (From one Fri 6am to Sun 6pm give or take was my best)
The one I use (WiSyncPlus, there are others I guess) turns off the network automatically when I unplug the charger from my phone. Txt msgs piggy back the cellular network so no issue there, otherwise, if I want to jump on the internet or check the weather, I hit the toggle switch on my Home screen...in ~3secs I'm all set again. Toggle back off when finished.
Best $3 by far I've spent on an app for my G1.
i use APNdroid for that
No one mentioned using a ROM that allows changes to the CPU scaling.
I'm on Cyanogen 4.1.2.1 and I have it scaled from 245 to 527 with the CPU only jumping up to the next clock speed when it needs it.
So, most of the time, my phone is on 245 and it clocks to 383 and then 527 as needed. I had overclock widget set so it showed me the current clock speed. Once I was comfortable with the frequency and load under which it changed speeds, I removed the widget from the desktop.
I use my phone a lot and it lasts a full day easily.
if youre using a hero rom there is an option to completely turn off mobile networks so there is no data connecion at all.
i have to go with
turn the phone off
get a car charger
spare battery or extended one

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?

[REF] Leo power consumption breakdown

With the HD2's pretty short battery life compared to my previous HTC phones, and also as I was a bit bored , I decided to have a look at how much the different systems drain in the HD2, and did some tests.
So for anyone interested, here are the results:
Base consumptions: (pick the one that suits your situation)
Standby, phone on, WIFI+BT off, no connections active: 5mA
Processor running idle, screen off, connections as above: 55mA
100% CPU usage (Coreplayer benchmark), connections as above: 315mA
USB connected, connections as above: 125mA
Additions: (add this to the base one depending on what you have on)
Connections:
BT on, idle: +1mA
Wifi on, idle: +5mA BUT!! If you enable wifi during standby (with BsB Tweaks or the WifiNoStandby CAB), the processor does NOT go to standby
anymore, so the base needs to be the 55mA above!
Connected to EDGE, idle: not measureable
Connected to 3G, idle: +4mA
Beware those 2 will occasionally and unpredictably send data every now and then, so this doesn't necessarily mean much.
BT transfer (file copy through ActiveSync, 120kB/s, CPU usage ~2%): +80mA
Wifi transfer (file copy with Wifi Remote access, 1MB/s, CPU usage ~3%): +200mA
EDGE/3G transfer: Pretty impossible to measure due to so many variables, but can be extreme (total current consumptions of 850-1150mA, so very approximative 500-800mA draw from the data connection during page loads are common!), and leads to most of the energy draw when using the net a lot. EDGE uses more power than 3G, consumption is higher when network coverage is lower, bad network throughput or congestion also mean lots of retries/overhead and less effective data transfer, using power for a longer time until the data is finally there.
Memory access (large file transfer):
Internal read/write through ActiveSync (speeds 2.5 / 2.1 MB/s respectively): +20mA / +130mA
Card read/write through ActiveSync (speeds 3.2 / 2.7MB/s respectively): +25mA / +40mA
Card read/write in USB disk mode (speeds 7.5 / 5MB/s respectively): +40mA / +45mA
Backlight:
10%: +65mA
20%: +78mA
30%: +90mA
40%: +105mA
50%: +121mA
60%: +136mA
70%: +154mA
80%: +170mA
90%: +190mA
100%:+210mA
GPS:
+95mA
Flashlight (with HTC Flashlight):
Level 1: +32mA
Level 2 (same as camera flash on): +107mA
Level 3 (same as camera "bright flash during shot"): +530mA
And remember the battery capacity: 1230mAh
So with this you can calculate your battery life for various activities. For example:
- Playing a video with full backlight: Let's say the video is well encoded (30% CPU use, for example 720x400 1Mbps DivX), that's about 150mA base, + 210mA backlight = 360mA, resulting in about 3h20 battery life.
- Same at night with only 40% backlight: Life goes up to about 5h!
- Wifi during standby for an 8h night, or a program that somehow prevents the phone from entering standby: 60mA or 55mA respectively, draining about 40% of the battery during that time.
- GPS program, with 70% backlight: Let's assume 150mA for the processor as it has some work to do, 90mA for the GPS, 154mA for the backlight = 394mA, or 3 hours.
- Music through wired headphones, screen off: the 55mA base plus a little 5mA as MP3 decoding is nothing for the CPU = 60mA or 20h.
- Same with a BT headset, with about half the BT bandwidth: 60+40 = 100mA or 12h
etc.
Charging
[EDIT 14.04.10]
This is now a dedicated section as I did some more thorough charging tests.
So, as some of you might know, the HD2 has 2 charging "modes".
- One is USB, that is used if the phone is connected to a PC, or an unknown device. In this mode, the current the HD2 will draw from the port/charger is limited to approx. 470mA, to stay within the maximum of 500mA a USB port can supply.
- The other is "dedicated charger", which is recognised on the original HTC charger (and some others, it's becoming a standard for a "dedicated charging USB port") by shorting of the 2 data pins of the USB connector in the charger.
USB charge
Important to know, during USB charge, the phone will NOT go to sleep, as it's supposed to be connected to a PC, and be running either ActiveSync, Disk drive mode, or modem, and in all 3 cases would be expected not to shutdown. So not only the current supplied to the HD2 is low, but the phone draws some of it for itself, leaving very little for actual charge - so expect loooong charge times.
USB charge with screen on (backlight dimmed, 10%): 285mA
USB charge with screen off (standby): 345mA (which shows the processor still runs and draws the "base USB" current)
Dedicated charger
When used with a charger that has the 2 USB data pins shorted, such as the original charger, the HD2 will draw a current that is proportional to the voltage on the USB power lines. To measure this I have used the original supplied USB cable, a variable regulated power supply, USB socket (with data pins shorted), and 2 meters for voltage/current. Voltages are measured at the "PC" end of the USB cable, so not taking account of losses in the USB cable. Will talk more about this later on.
Current vs Voltage diagrams are attached. Charge current is proportional to voltage, linearly until it reaches the max charge current, approx 830mA. This was measured so that the only draw is charge. If the phone is turned on while at max charge current, it will draw extra, until it reaches about 980mA, and will then stop to respect the 1A rating of the stock charger.
Now, to the influence of USB cables. I initially had some trouble with inconsistant numbers, phone only drawing 670mA from the stock charger, i.e matching neither the ~350mA from USB, or ~830mA from stock charger in "normal" condition. Turns out that to make it more convenient on my workplace I was using an USB extension between charger and HD2 cable. It was a $2 extension I bought on Dealextreme. Removing it solved the problem... and after making those measurements I poked with it again. Turns out that at 1A current, the voltage drop in the extension (which by the way isn't longer than the HD2's USB cable) was 1.8V! Yep, nearly 2 Ohms for a 1.5m extension! Couldn't believe it.
I have a cheap Chinese microUSB cable that wasn't as bad,but still significantly more resistive than the stock one, hence me noting I used the stock cable for my tests. So, quality of the cables, extensions, adapters IS important! Note the phone correctly reaches full charge current a little bit under the 5V USB spec, so everything is well tuned.
Now, important to know, Most 3rd party chargers will not have the 2 USB data pins shorted, and will thus result in the same behavior as mentioned under USB charge, the processor will also be running continuously drawing the "base USB" current.
It is often possible to modify 3rd party chargers by opening them and shorting the pins, speeding up charge. The voltage/current curve behavior is actually helping there, because thanks to it if the charger is overloaded its voltage will most likely fall a bit, and the HD2 will thus draw less and find a nice balance point. This DOES NOT mean there's no possiblilty of damaging the charger, but all 3 I modified did well. One that was really weak resulted in not much more current being drawn after the mod than before (i.e voltage fell very low, approx. 4.4V), however the gain from not having the processor running like in USB mode still sped up charge a little.
Thank you, that is one useful chunk of comprehensive information
Could you please explain the exact measuring method for these tests?
40% backlight at night is a tough example tho, Lumos on my device is set to 10% for 0 sensor value, and only because I can't set it to lower than 10%... nice to know battery drain goes up twice from 10% to 60%!
Also, 100% is usually really necessary under direct sunlight, in a normal lit room probably 40% backlight is more than enough to watch a video... all in all, with your superinteresting info, the battery doesn't look like lasting "too short" now, but more or less "the right amount considering the battery capacity".
My iPaq 210 has a 2200mAh battery, just to make a comparison... that's why I could go for 8 hrs during some bus trips while watching tv series, and I just needed to swap battery and used a little of the second one.
What's your estimate of the drain caused by activating push email? I've recently been doing some rather crude experiments myself, and one provisional conclusion is that push email on a hotmail account uses a lot more battery than push email on an Exchange server.
Excellent stuff, you are to be congratulated.
I have a long held theory and I wonder if you are in a position to to test it?
I believe that battery consumption is greatly increased when an app is run from mem card and would be intrigued to see a comparison between an install to this as opposed to phone mem.
Any chance?
Battery levels
I found that power consumption of the battery got even worse after I went to Rom 1.66.707.1. However, after a few days, I let it run all the way out, switched back on, it ran out after a few minutes. Then after an overnight charge I found the battery (on standby) only went down by about 10 -12 % in 24hrs. I'm hoping this performance will continue.
What did you use for the testing?
pa49 said:
Excellent stuff, you are to be congratulated.
I have a long held theory and I wonder if you are in a position to to test it?
I believe that battery consumption is greatly increased when an app is run from mem card and would be intrigued to see a comparison between an install to this as opposed to phone mem.
Any chance?
Click to expand...
Click to collapse
That would be reasonable as reading from an external media will need energy to access its contents... still, once the app files have been loaded into the device's RAM, it shouldn't matter much
You could also test by comparing:
1) copy say 30mb from one location to another of the internal mem
2) copy from microsd to microsd
3) copy from mem to microsd
4) copy from microsd to mem
ephestione said:
Could you please explain the exact measuring method for these tests?
Click to expand...
Click to collapse
Simply using the built-in current sensor, getting the reads from AEBPlus battery information screen, and methodically turning things on/off once the others are evaluated and can be subtracted from the total reading.
ephestione said:
40% backlight at night is a tough example tho, Lumos on my device is set to 10% for 0 sensor value, and only because I can't set it to lower than 10%...
Click to expand...
Click to collapse
Really? You should force the backlight off then
I love bright images myself, so even in my bed in total darkness if I watch a video or photos I'll force 100% backlight I have Lumos set to force 100% for Coreplayer, Resco Photo manager and HTC album
Of course not for browsing or just messing around, in that case it's 20% for me
Shasarak said:
What's your estimate of the drain caused by activating push email? I've recently been doing some rather crude experiments myself, and one provisional conclusion is that push email on a hotmail account uses a lot more battery than push email on an Exchange server.
Click to expand...
Click to collapse
That's one thing I'd have no idea about... I've never used push email at all. And that's "standby usage", so hard to evaluate, as you never know when it kicks in.
Measuring that would need to be done on a long time. I'd say to leave your phone one night with push email off, one night with Exchange only, and one night with hotmail only, and then check the difference, preferably with a battery at about 80% charge at the start (mine seems to fall from 100% to 90% in a few minutes before becoming more regular, so I'd say the top of the scale isn't that reliable).
And I should really try push email once, that would be nice, but I *think* I have no provider that can do it for me... well I have a gmail account I never use, I should try to see if I can have it check my usual 3 mail accounts, aggregate and push... never really looked into that stuff.
pa49 said:
Excellent stuff, you are to be congratulated.
I have a long held theory and I wonder if you are in a position to to test it?
I believe that battery consumption is greatly increased when an app is run from mem card and would be intrigued to see a comparison between an install to this as opposed to phone mem.
Any chance?
Click to expand...
Click to collapse
Thanks
Well I'd tend to refute that theory, because when I tested the BT and Wifi in use I tried read from internal memory, write to internal, read from card and write to card, and all 4 were identical. I should have mentioned it indeed, but I was mostly interested to seeing if reads (wifi/BT "sending") and writes (wifi/BT "receiving") would have an influence on consumption, which wasn't the case, as well as whether the throughput was different, which wasn't the case either.
But I've done a few more tests, see the updated first post
One intersting thing is firstly that when the HD2 is connected to USB, the current draw grows significantly, so I've made a new "base consumption".
Next, the card is actually faster than the internal memory both in reads and in writes, tested both through activesync for consistency. Writing to the internal memory eats a LOT more than writing to the card. Reading from the card eats a little more than reading from internal memory, probably evens out as the reads are shorter due to faster transfer rate.
I've added some charging tests as well. Apparently, even if the phone "disconnects" from USB when turned off, the processor still runs and uses about the "USB connected" base current.
kilrah said:
Simply using the built-in current sensor, getting the reads from AEBPlus battery information screen, and methodically turning things on/off once the others are evaluated and can be subtracted from the total reading.
Click to expand...
Click to collapse
d'oh aebplus has a battery information screen, checking it right away In that case you'd have to take into consideration aebplus' current absorption anyway... which is not measurable as you cannot check the current intake of aebplus without aebplus being running
I have the cab on the sd already, but didn't install if after noticing that didn't work for button assignments with later versions of the rom... does it work for you on that side? I used the program all the time on my previous ipaq because it was oh so useful but never got around to notice it had a battery info subsection.
Really? You should force the backlight off then
Click to expand...
Click to collapse
Wouldn't have much sense doing it in the dark would it (admitting it's possible altogether on the HD2!)
But I actually used my oooold casio cassiopeia, about 7 years ago, with backlight turned off, while reading ebooks with speed reader plus during train trips, as the neon lights created a reflection good enough on the display so that I didn't need backlight...
in the end, the backlight died altogether and until I bought a new device, I managed to use it with light turned off
A flashing LED (incoming SMS warning, e.g.) seems to add consumption of 1-3mA.
Running FlexMail in background with a push service (IMAP IDLE) adds up to 30mA.
ephestione said:
does it work for you on that side?
Click to expand...
Click to collapse
AEBPlus works fine for me yes... but I don't have a "latest version" ROM AFAIK. I don't like WM6.5.x new softkey arrangement, so I'm staying with 6.5.
Anyway more about Push, I configured that through gmail yesterday, and it works just fine. I left it on during the night, and this morning I had lost 8% battery. So it's pretty much negligible. I received 2 e-mails during the night and was on 3G network.
this is a nice topic! i am interested in how much extra it uses when you are playing a MP3 with the build in HTC app?
maybe it would be a nice idea to make a program that outputs results like you pasted fast and easy (something like a benchmark app) so we can test different rom's fast? too bad i cant write anything otherwise i would try..
OK, seems MP3 uses 120mA screen off, both with Sense player and Coreplayer, so:
Processor running idle, screen off base + 65mA
But it seems to make some pretty big "jumps" once in a while. Maybe they both decode ior fetch from memory by "batches"...
my test,
HD2 rom 1.66
with BT on and BT off (configured but no connection to headset) difference in consumption is 60mA .!
BT is draining my HD2 .!
kilrah said:
OK, seems MP3 uses 120mA screen off, both with Sense player and Coreplayer, so:
Processor running idle, screen off base + 65mA
But it seems to make some pretty big "jumps" once in a while. Maybe they both decode ior fetch from memory by "batches"...
Click to expand...
Click to collapse
OK, I can't confirm the BT issue. Did you observe over a long period of time? The "quiet" current for MP3 I seem to get is 185mA with screen on and backlight at 10%, but sometimes it will climb to 280-320mA for a moment and go down again, both with BT on and off. With screen off for a while it seems to stabilise at the "quiet" level.
BTW, it seems that Advanced task manager isn't reporting CPU usage levels properly. Does someone know of a CPU monitor that works correclty on the HD2?
Yup. review over multiple 6 mins. all baseline(3g/brightness) setting the same. resetting each time for off on BT.
kilrah said:
OK, I can't confirm the BT issue. Did you observe over a long period of time? The "quiet" current for MP3 I seem to get is 185mA with screen on and backlight at 10%, but sometimes it will climb to 280-320mA for a moment and go down again, both with BT on and off. With screen off for a while it seems to stabilise at the "quiet" level.
BTW, it seems that Advanced task manager isn't reporting CPU usage levels properly. Does someone know of a CPU monitor that works correclty on the HD2?
Click to expand...
Click to collapse
Another consideration:
Data connection sucks power when used actively. Badly. As mentioned in the OP I haven't made comprehensive tests due to low monthly allowance, but I've had a look during normal use.
I'm pretty regularly doing 1hr train rides, during which I will be listnening to music , and browse the net at the same time. It's usually bright, so backlight will probably be at 70%. Signal is relatively low most of the time, on EDGE, inbetween small towns. When I'm on a "static" page (reading an already loaded page), current drain varies between 250 and 350mA.
But while loading a page, it will easily soar to 800mA+. Considering it takes 30-60 seconds to read a page, 20 to load a new one, and repeat... you can quickly see that this kind of usage leads to serious drain... in less than 2 hours the battery would be dead.
So be aware of how much power data connection will use. It's directly proportional to the amount of transferred data, and the worse the reception the more power it uses.
I should try using opera mini again, like I was always doing on my Kaiser. I never noticed excessive drain with it, but opera mini easily divides traffic by a factor of 10...
Just wanted to report that the new version of the superuseful BattClock has now a builtin battery current output, even if it's not really update once per second... seems more like one every 10 seconds.
I get ~240mA playing fullscreen stretched Frasier in lowest backlight (but that's with the keypad leds turned on all the time, I don't know why they don't go off, and I don't have keypadledcontrol installed... so that's a problem), and I get a total 630mA with HTC flashlight at maximum.
Good news! Bye bye Batti
Normal about the refresh time, the sensor only updates every 20 secs or so.
Some new considerations I posted somewhere else but should have put here.
After some time the HD2 seems to have better battery life, but usually it's not your battery lasting longer, it's just you not spending your day playing with the thing anymore.
It's always the same thing, the more a device can do, the more you do with it. On my first 1h train journeys after getting my HD2, I was able to kill 50% battery in 1hr. My first thought was "wow, with my Kaiser I would only use like 15%!!"
But then I took a second thought. I used 50%, but I was browsing the web, in bad reception areas, while listening to music the whole time. With my Kaiser, I'd put music on, check 3 webpages, then put it on the tray with just MSN connected and just pick it up to read/type a message once in a while.
On a next trip, I "forced myself" to do the same with the HD2. Just checked the news for 5 mins, then only listened to music and picked up msn once in a while, plus an unexpected 10min phone call. Guess what? I've only used 20% battery during the trip this time
The "problem" is that browsing with the Kaiser was just painful, so I'd just check the news and put it away. On the HD2 it's so comfortable I forget it and just spend my whole trip browsing heavy pages, which obviously kills battery in no time...
exactly my thoughts and findings

[Q] Battery under charge that jumps to higher values

I'm experiencing the following issue:
I discharge the telephone completely and I put it under charge.
I check the phone and it says, for example, that it's charged at 3%. Ok reasonable, I've attached to the charger just few minutes ago.
After a 5/10 minutes I check it back and it's 33% charged!
Today I made a reboot while charged and after the reboot, from 32%, it went up to 66%!
I couldn't charge it to 100%, it stuck at 98%.
I've installed under /etc/init.d/ the script 87calibrator.sh by Brainmaster since I'm using CNA 1.6.0 ROM (with Air Kernel 3.9.5 voodoo standard - gov: lazy; scheduler: deadline - DeepIDLE: on, NO Screen Off Max Freq enabled).
I feel there's something that needs to be fixed... it doesn't behave like this each time... in between the ROM changes I've experienced just a few times...
(Wipe Data/Cache+Wipe Dalvik and if passing from a ROM to another I also format /system).
Is anybody else experiencing this issue?
Android is terrible with actual battery stats, just don't look at it while charging
Sent from my Nexus S using XDA
Issue? I don't see one.
The Nexus S uses a State of Charge method which can be somewhat inaccurate initially, but as time progresses will become more accurate. Often while charging and booting simultaneously, the charge will go up by a fairly large percentage. This is obviously incorrect, but over the next few hours it will settle itself at it's approximate true charge. I'm still unsure if this effects the final charge % as i havn't tested it that much, but it likely does, though it will progressively get better.
Also, it is a hardware restriction regarding charging to 100%. Stock Nexus S only charges to 96% or so without dodgy methods to actually get it up. Anything else that says 100% is purely cosmetic - this cosmetic change can be found in various kernels.
Harbb said:
Issue? I don't see one.
The Nexus S uses a State of Charge method which can be somewhat inaccurate initially, but as time progresses will become more accurate. Often while charging and booting simultaneously, the charge will go up by a fairly large percentage. This is obviously incorrect, but over the next few hours it will settle itself at it's approximate true charge. I'm still unsure if this effects the final charge % as i havn't tested it that much, but it likely does, though it will progressively get better.
Also, it is a hardware restriction regarding charging to 100%. Stock Nexus S only charges to 96% or so without dodgy methods to actually get it up. Anything else that says 100% is purely cosmetic - this cosmetic change can be found in various kernels.
Click to expand...
Click to collapse
Hi, thank you for your answer. I wasn't aware about the dynamic calibration!! Yes the 100% charge it's not physic but cosmetic, I know. It was just to mention that I don't get to full 100%.
So if the battery calibration is "by design", do you know how Brainmaster's script affects this calibration?
It doesn't. That script deletes the batterystats.bin file (somewhere in the /data directory). All this file does is tabulate human-readable battery statistics for you to view when you look at Settings > Battery, so you know how much power has been drained by each app or service, and the graphing over time. This is all it does. A charge to ~90% or higher will automatically delete this file, as you can see by the battery screen resetting itself.
Harbb said:
It doesn't. That script deletes the batterystats.bin file (somewhere in the /data directory). All this file does is tabulate human-readable battery statistics for you to view when you look at Settings > Battery, so you know how much power has been drained by each app or service, and the graphing over time. This is all it does. A charge to ~90% or higher will automatically delete this file, as you can see by the battery screen resetting itself.
Click to expand...
Click to collapse
Ah ok, than that's explaining why they all say that the deleting stats it's not useful to calibrate the device
Thank you very much man!! Much appreciated!
You're welcome mate

is this normal !. Redmi 3s

i don't understand these current flow, voltages, etc... but i am sure it's not possible to charging battery in 3min the values are higher. is this ok ?.
just worried about my battery.
*Custom rom : { Havoc-os v4.19 }.
*Advanced charging controller : { magisk module }>
....... don't know why ?. but. if i use this module charging stops at 70%. and if i remove it will charging 100%. and after 50% the W goes down like 2.0 or 0.1 like that. and time also increase after 50% to 60%.
ACC works by stopping charging at 75% by default to prevent battery wear. If you do not like how ACC stops charging at 75% by default, you can either adjust the charge level to 80 or 85%. Or you can disable and deactivate ACC.
@amn1987 might have better ACC settings for our 3s.
Your "3 minutes until full" might be due to both using a fast charger and the battery wear of your 3s.
aospray said:
ACC works by stopping charging at 75% by default to prevent battery wear. If you do not like how ACC stops charging at 75% by default, you can either adjust the charge level to 80 or 85%. Or you can disable and deactivate ACC.
@amn1987 might have better ACC settings for our 3s.
Your "3 minutes until full" might be due to both using a fast charger and the battery wear of your 3s.
Click to expand...
Click to collapse
I am not using ACC as usually after sometime I experience some issue or the other. The GUI frontends are especially buggy and I am not a fan of using commands to tweak stuff. I am using Termux commands in Tasker to automate this. Best thing with the upgrade to 4.9 kernel was the ability to limit the maximum battery charging voltage which is the one of the best ways to prolong battery longevity. Thankfully even in A12 and A13 ROMs it continues to work. Some charging switch or the other should enable limiting voltage in ACC I think.
aospray said:
ACC works by stopping charging at 75% by default to prevent battery wear. If you do not like how ACC stops charging at 75% by default, you can either adjust the charge level to 80 or 85%. Or you can disable and deactivate ACC.
@amn1987 might have better ACC settings for our 3s.
Your "3 minutes until full" might be due to both using a fast charger and the battery wear of your 3s.
Click to expand...
Click to collapse
How to do that ?. ( by commands ? ). i want to limit it at 95%.
Maheshmahe said:
How to do that ?. ( by commands ? ). i want to limit it at 95%.
Click to expand...
Click to collapse
Root is necessary of course and use only ROMs based on kernel version 4.9.
In any proper file manager like Solid Explorer or Mixplorer etc. simply navigate to sys/class/power_supply/battery/voltage_max which is located in the root partition and open it as a text file after changing the file permissions to rw-rw-rw from the default read-only.
By default the max. charging voltage is set at 4.4V. It’s in milli Volts. So 4400. 4.05V corresponds to 75% battery charge. 4.15V to ~85% and 4.3V ~95%. I wouldn’t recommend going above 4.2V (which corresponds to 90%) as the battery will be at a constantly high voltage (as battery percentage won’t ever decline as long as it’s plugged in) all the time otherwise. Ideal range is 30-80%(15-90% in newer models). If the device will be used plugged in a lot shoot for 60% (3.95V).
su
echo 4300 > /sys/class/power_supply/battery/voltage_max
I kept the battery at around 80% for the first 3 years when it was used as a primary device and afterwards at 60% as it's plugged in most of the time. Probably that's why battery health is still above 80%, 6 years later. Still lasts almost 10 hours during offline video playback (indoors).
P.S. The voltage under voltage_max resets at every boot. That's where Tasker or Macrodroid or even a script comes in handy.

Categories

Resources