Limit battery charging (root is required) - Lenovo P2 Questions & Answers

Since Lenovo P2 has an incredible battery life you rarely have to make full charges. I've been searching a long time for a method to set a charging limit, for instance at 80%, to preserve the battery health. It is possible to use the BCL app, Tasker as well as the Magisk Charging Switch module.
The path of the battery files responsible for the charging is /sys/class/power_supply/battery where you'll find two interesting files, battery_charging_enabled and charging_enabled.
There's only one problem; as soon as the screen turns off any limit set by you will be ignored. Now, there has to be a way to force the charging to stop while the phone is in idle state. Any ideas? I've already tried the obvious solution to whitelist BCL, Tasker respectively Magisk in the battery optimization settings, but it didn't work.

RR-O-v6.2.1-20190130-kuntao-Unofficial + battery charge limiter
RR-O-v6.2.1-20190130-kuntao-Unofficial + magisk + Battery Charge Limit works for me

I guess your limiters go to sleep when the screen goes off. Try to force that the screen stays on. Try to exclude them in the battery saving options. If you try the app Battery Charge Limit than it is working for me with a normal charger but not while chargeing through a PC.

Related

Life of a Battery

Hello guys, I am experiencing some troubles with the battery of my beloved Desire. I am using Oxygen 2.3.2 right now. The problem: every time the battery reaches 20% of charge the phone dies. But when I plug it and it start charging it says it's at like 2-3%. Now, one of my friend suggested that since the battery is quite old (I charged it every day since april 2010), it can have problems when it reaches low voltages, so I should change it. Do you have the same opinion or you think it's just a calibration problem?
Calibrate. If there is no change, replace the battery. Isn't that simple enough?
via xda app
Install spare parts . Go to Battery information . Check Battery health . If it doesn't say "Good" then you need to replace the battery .
Also try a calibrate as stankyou suggested .
I'm having the same issue. Tried calibration a few times and my battery health says good. Glad that my new ROM is better on battery so I don't get down there as often, but it is still annoying.
Hello,i had the same problem with my desire's battery,it went down at 20%.
what i did was to follow an tutorial from Oxygen rom forum,an user called paschadee posted this:
Advanced Battery Calibration (tested and verified on Oxygen + bravoGSM)
Intro:
This will actually calibrate your battery, unlike other methods out there. After calibration, empty will be at 0% not some arbitrary value like 18%. For added comfort, you can perform steps 1-5 until you are comfortable with the routine; on the first run stop at step 5, don’t plug in and watch where your battery dies to give you an idea of the time window available – then on the next run you will know when to plug in. This ensures a smooth and error-free routine. You don’t actually need to do this since the app will tell you when to plug in. Once you’ve done a dry run, plug in, charge for a few minutes until the phone doesn’t shut off when you disconnect the charger, and repeat the process.
Caveats:
When entering the values for the battery registers, pay particular attention that the entered values are the correct ones which are shown below. Failure to enter these values correctly could result in your battery being permanently bricked. You have been warned!
Pre-requisites:
• _thalamus kernel >= 2.6.35.14_r2 RC1, installed (check kernels section)
• A functioning brain (ask your parents about this)
• Patience
• Jon Richards’ “Nexus One Battery Calibrator” application a.k.a. NOBCAP (available on android market), installed
• An almost dead battery (that is mis-reporting its capacity) with what you think is about ~2% remaining – i.e. if your battery dies at 18%, get ready at about 20%
• AC battery charger at the ready
Process:
1. Set your screen time-out to 10 minutes.
2. Run NOBCAP
a. If General tab displays fields but no values, kernel is wrong, see pre-requisites
b. If General tab displays fields filled with values, kernel is right, enable airplane mode on the phone
3. In NOBCAP, menu --> settings -->
a. Check: GPS polling, ACR adjustment, advanced options
b. UNcheck: Airplane and Wake lock. Go back.
4. Go to LearnPrep tab
a. Set age: 100% --> save
b. For
i. OEM batteries ; Set mAh: 1452 --> save
ii. Aftermarket batteries ; Set mAh: 1650 --> save
c. Register: 0x66
Value: a4 --> save
d. Register: 0x65
Value: 06 --> save
e. Register: 0x10
Value: 04 --> save
5. Go to LearnMode tab
6. Scroll down and Set Detect Learn Mode to ON.
7. When Real-Time Voltage (µV) <= 3201000, i.e. when the battery is “empty”, the app will prompt you to quickly plug in your charger.
8. If you were successful here, the learn-flag LEARNF will now be lit and your battery charging.
9. LYPTFA - Leave your phone the .... alone.
10. When charging completes, the CHGTF flag will be lit, Battery Status Register 0x81 displayed, your battery calibrated.
11. Unplug. Reboot.
Supplementary:
The application monitors the battery chip registers. As charging nears completion the pulse current (mA) sent to the battery gradually diminishes in amplitude. This will tail off at about -20mA which the battery interprets as “charging complete” and the battery registers are stamped with its newly determined capacity values. Activating the screen, or any function which subsequently draws current pulls the charge current above -20mA and which the battery detects as charge complete – this is why you should LYPTFA. It’s okay to set an extended screen-timeout and occasionally touch the screen to reset the screen-off timer (i.e. keep the screen on) to keep an eye on charging without affecting charge current.
As an additional experiment, install JuicePlotter, run it once, and enable graphing. This will also monitor dis/charge cycles and give you an idea of the memory effect that the battery suffers from.
Click to expand...
Click to collapse
I did everything said there and now my battery dies at exactly 1%.
It also appears to last much longer than it used to.
All credits for what i qouted goes to paschadee
Good Luck!
I just tested it and my learn flag turn of after a couple minute? does it mean that it's not working? Also, in "message" it's telling me " -to re-calibrate your battery..."
Thank for answer.

Long charging, short battery life

Hello.
I have bought a used desire a couple of months ago, and one thing has been really bothering me.
I need to charge the device for like 12 hours via AC, to get it to 100% (yes, I have tried several chargers), and after that, the battery life is like ~12 hours if I use it only a little. I have also bought a spare HTC genuine battery, nothing changed. The warranty is not valid in my country, so that's not an option. Anyone have any suggestions?
I also have ordered a battery charger from ebay (that would charge a battery without the phone), I'll post when I receive it.
How long does it take the charger to get to 90%
Sent from my Desire using XDA App
It's about 10%/hour, and there is no difference what the percentage is.
Check battery health:
Type *#*'4636#*#* in dialer, > Battery information.
A full charge here takes ~ 3 hours. Till 90% nearly 2 hours, the rest 10% "need" the last hour.
Are you using a custom rom as some of these may drain battery FAST!
I'd check the running apps
reset phone to factory
if you are using clockworkmod recovery, then try clearing battery stats
---------- Post added at 01:09 PM ---------- Previous post was at 01:01 PM ----------
oh, also try getting one of those $15 brand new batteries from eBay.
I got one, and it's been working like a charm for 3 months now
charges in less than 2.5 hours, and lasts for 1.5 days (average calls, SMS, music player...)
stormleader said:
then try clearing battery stats
Click to expand...
Click to collapse
Some enlightenment for you.
What settings do you have for data connection? Wifi, sync etc
These can effect not only battery life but charge time also..
I use a custom ROM with juice defender ultimate..knocks the data off when the screen is off,, but with a sync'd check every 30 mins
Sent from my HTC Desire using XDA
erklat said:
Some enlightenment for you.
Click to expand...
Click to collapse
lol thanks
You should do this procedure every time you replace the battery (tested working on HTC Desire GSM):
Advanced Battery Calibration (tested and verified on Oxygen + bravoGSM)
Intro:
This will actually calibrate your battery, unlike other methods out there. After calibration, empty will be at 0% not some arbitrary value like 18%. For added comfort, you can perform steps 1-5 until you are comfortable with the routine; on the first run stop at step 5, don’t plug in and watch where your battery dies to give you an idea of the time window available – then on the next run you will know when to plug in. This ensures a smooth and error-free routine. You don’t actually need to do this since the app will tell you when to plug in. Once you’ve done a dry run, plug in, charge for a few minutes until the phone doesn’t shut off when you disconnect the charger, and repeat the process.
Caveats:
When entering the values for the battery registers, pay particular attention that the entered values are the correct ones which are shown below. Failure to enter these values correctly could result in your battery being permanently bricked. You have been warned!
Pre-requisites:
• _thalamus kernel >= 2.6.35.14_r2 RC1 or CyanogenMod kernel.
• A functioning brain (ask your parents about this)
• Patience
• Jon Richards’ “Nexus One Battery Calibrator” application a.k.a. NOBCAP (available on android market), installed
• An almost dead battery (that is mis-reporting its capacity) with what you think is about ~2% remaining – i.e. if your battery dies at 18%, get ready at about 20%
• AC battery charger at the ready
Process:
1. Set your screen time-out to 10 minutes.
2. Run NOBCAP
a. If General tab displays fields but no values, kernel is wrong, see pre-requisites
b. If General tab displays fields filled with values, kernel is right, enable airplane mode on the phone
3. In NOBCAP, menu --> settings -->
a. Check: GPS polling, ACR adjustment, advanced options
b. UNcheck: Airplane and Wake lock. Go back.
4. Go to LearnPrep tab
a. Set age: 100% --> save
b. For
i. OEM batteries ; Set mAh: 1452 --> save
ii. Aftermarket batteries ; Set mAh: 1650 --> save
c. Register: 0x66
Value: a4 --> save
d. Register: 0x65
Value: 06 --> save
e. Register: 0x10
Value: 04 --> save
5. Go to LearnMode tab
6. Scroll down and Set Detect Learn Mode to ON.
7. When Real-Time Voltage (µV) <= 3201000, i.e. when the battery is “empty”, the app will prompt you to quickly plug in your charger.
8. If you were successful here, the learn-flag LEARNF will now be lit and your battery charging.
9. LYPTFA - Leave your phone the .... alone.
10. When charging completes, the CHGTF flag will be lit, Battery Status Register 0x81 displayed, your battery calibrated.
11. Unplug. Reboot.
Supplementary:
The application monitors the battery chip registers. As charging nears completion the pulse current (mA) sent to the battery gradually diminishes in amplitude. This will tail off at about -20mA which the battery interprets as “charging complete” and the battery registers are stamped with its newly determined capacity values. Activating the screen, or any function which subsequently draws current pulls the charge current above -20mA and which the battery detects as charge complete – this is why you should LYPTFA. It’s okay to set an extended screen-timeout and occasionally touch the screen to reset the screen-off timer (i.e. keep the screen on) to keep an eye on charging without affecting charge current.
As an additional experiment, install JuicePlotter, run it once, and enable graphing. This will also monitor dis/charge cycles and give you an idea of the memory effect that the battery suffers from.
I'm trying the guide above me, thanks.
In the Nexus One Battery Calibrator app you can see charging current in miliamps, could you please tell me what is the value for you guys while charging?

Battery test,monitor, usefull apps for saving battery

Hello guys.
I've made some tests for optimizing the battery and i've decided to share the results. I've also tested an extedend battery 2400mah. This battery needed a calibration which I'll explain here. Everything is free except for an app.
My device and settings are:
Xperia Arc S rooted, Doomkernel v22, Fw.62 GB
Governor smartassV2 1.4Ghz no overclocking
IO Scheduler Noop
I've also undervolted my CPU with -100mV for each frequency
Original Sony battery
You must have root privileges for your device.
I had the same problem with the 1% battery staying for hours with the 2400mha battery but you can solve this with a simple free application you can find on GooglePlay . The aplication name is "Battery calibration". I use the DoomKernel v22 and official android GB 2.3.4. I've made no supplementary kernel modifications for the battery calibration. Read the inside app indication for callibration.
If you have this reading problem with your battery you can use this app.
--------------------------------------------
Now lets start.
I recommend you to install the "CurrentWidget" free widget to see the current discharge rate on your screen and the voltage of the battery.
At approx. 3.5V the battery is completed discharged and the phone shuts down itself. Maximal value is 4.2V meaning the battery is fully charged.
To set up the "CurrentWidget" app, go into settings of the app and set the followings:
Update interval - 5 sec
Display Options - Widget Type -Clear Text
Display Options - Views - select Electric Current (mA) and Voltage (V)
Display Options - Customize - deselect Show last Update time and Show update now button
This widget also shows you when your battery is charging and when is discharging. The thunder sign goes green when charging and white while discharging.
This color detail is very important beacause the battery can show charged 100% but the battery is still charging for reaching the maximum capacity. Test for yourself and see.
Remember this thunder color conditions. You will be surprised.
I've attached a screenshot to see the widgets.
With the CurrentWidget you can easily optimize your android to save battery. I'm also using the free app System Tuner Task Manager Option to see the apps that are consuming Cpu and shut them down if dont needed, or uninstalling them. This is for idle mode.
I've managed to get -80mA -85mA battery drain in aireplane mode with wireless on, phone at idle and the brightness screen at 15%.
Idle means Cpu at 245Mhz and CPU load less than 5%
The -80m value you can see it on your screen if you set up the CurrentWidget widget app.
I've searched for days for such an app and it's perfect for seeing on the screen the battery drain every 5 seconds.
See attached file
I'm also using Temp+Cpu Pro Widget app for seeing the Cpu Frequency and the Cpu Load every 5 sec.
It is not recommended for the above widgets to set the update interval less than 5 sec because it is cpu consuming, resulting in higher battery drain.
With this combination of widgets you can easily find aplications that are battery friendly.
For example I've tested various movie players and there are differecies. For example Vplayer and QQplayer are not battery friendly.
You can test all the apps you use and alternatives to chose the ones that are battery friendly.
If you want , post your battery drain in aireplane mode with wireless on, phone at idle and the brightness screen at 15%.
Maybe we can save more battery.
(sorry for my english)
That's all.
What value do you have after wake up ? I have 2-5 mA. And when screen is on 60-90mA
after wake up I have 0mA even with wireless on but in airplaine mode
Can you also specify the kernel and firmware you use? I've never reached -60mA,
only -69 with wireless of, screen at minimum and in airplaine mode
Please specify the kernel and firmware if you post your results here
i will give this app a try and give u my commends guys
thanks

Most efficient way to save battery life on Nexus 7 in between charging cycles?

I want to conserve the maximum amount of battery life between charging cycles and specifically when I'm not using the tablet. What's the best way to do this?
So essentially I want to do the following before putting the tablet down (not actually turning it off, but putting it into a deep sleep mode that some ROM's allow you to when the power to the tablet is disconnected - this is for a car install and the car is turned off) - turn off Wifi, BT, GPS, Gmail sync is off, and anything else that "wakes" the tablet to do something. Also looking for information on what else to turn off to save more battery life.
As soon as I turn power back on, I want all the above to come back "on" automatically.
I've done some reading and it appears that tasker is good for the second part (although I have no idea how to use Tasker, so that would be a steep learning curve, unless someone can point me to a pre-built script that does this that I can simply copy).
Thanks in advance.
The Xposed module "DS battery saver" really works well on my phone. I have it wake up once per hour. However I have not tried to intall xposed framwork for nexus 7 yet but if you have, try the DS module.

Question Automatic shutdown according to battery percentage app or Magisk module.

As the title says, is there any app or Magisk module that can automatically shutdown your device according to battery percentage?
ahhh we have almost the same issue but my issue is whenever my battery percentage reach 20% wifi get disconnected i need to to setting and wifi and click scan again for it to get reconnected i think it is some sort of battery saver
i hate it whenever i'm playing it disconnect me
Actually, I'm not asking about an issue.
I'm asking if anyone knows of an app or module for Magisk that can shutdown the device accordingly to battery percentage.
I'd really like to set my phone to shutdown when the battery hits 15%.
Nemix77 said:
Actually, I'm not asking about an issue.
I'm asking if anyone knows of an app or module for Magisk that can shutdown the device accordingly to battery percentage.
I'd really like to set my phone to shutdown when the battery hits 15%.
Click to expand...
Click to collapse
Macrodroid can (with root). It's like a simpler tasker app. I'll pm you my telegram link, i can send you a quick video if you like...?
Nemix77 said:
Actually, I'm not asking about an issue.
I'm asking if anyone knows of an app or module for Magisk that can shutdown the device accordingly to battery percentage.
I'd really like to set my phone to shutdown when the battery hits 15%.
Click to expand...
Click to collapse
ohh you don't have my issue?
reg66 said:
Macrodroid can (with root). It's like a simpler tasker app. I'll pm you my telegram link, i can send you a quick video if you like...?
Click to expand...
Click to collapse
I do at 20% although 30% or higher be better.
After 20% there's a lot less usable power available and charging from that low is more stressful on a Li especially if fast charging.
I'll do 20% shutdown and 90% battery charging stop.
That's 70% usable power, I can't do anything better than that.
Nemix77 said:
I'll do 20% shutdown and 90% battery charging stop.
That's 70% usable power, I can't do anything better than that.
Click to expand...
Click to collapse
I generally do 40 - 70% or so. On my device it's 3 hrs on SOT and take 15 minutes to fast charge.
Li's like frequent midrange power cycling; use it if it fits your needs.
Nemix77 said:
As the title says, is there any app or Magisk module that can automatically shutdown your device according to battery percentage?
Click to expand...
Click to collapse
Magisk module : Advanced Charging Controller (acc)
https://forum.xda-developers.com/t/advanced-charging-controller-acc.3668427/
It has features as:
Shutdown at set percentage, eg. 20%
Stop charging when reach a percentage, eg. 75%
Cool down charging, so the device and battery won't be very hot using temperature detect on battery.
Charging voltage/current limitation.
Charge cool down as set, eg. 50 seconds charge and 10 seconds cool down without charging, then repeat.
Read the README in github.
ACC app has some issues. Module is working better and updated.
The module will need you to manually edit the settings profile, and you need to use command line.
If you just want to stop charging at certain percentage, Battery Charge Limit is enough.
On F-droid
https://f-droid.org/en/packages/com.slash.batterychargelimit/
Play store
https://play.google.com/store/apps/details?id=com.slash.batterychargelimit&hl=en&gl=US
Both need root.
I use Battery Charge Limit already on my Mi Pad 4.
Advanced Charging Controller seems to have a lot more features.
I haven't been able to get ACC with ACCA (GUI) or Battery Charge Limit to work on the Poco F3 with Xiaomi.EU rom and root.
None of the control files work on both apps.
AccA is faulty.
Use the Magisk module.
You might want to ask cutsom ROM developers because they had managed to get smart charge working, so there's definitely control file that works.
I got Acc with AccA working!
I was testing the charging switches without plugging in the charger, my bads...
Some how Battery Charge Limit does not work, it's a simpler app and I used it with my Mi Pad 4 so I thought it would just work with the Poco F3.
Nemix77 said:
I got Acc with AccA working!
I was testing the charging switches without plugging in the charger, my bads...
Some how Battery Charge Limit does not work, it's a simpler app and I used it with my Mi Pad 4 so I thought it would just work with the Poco F3.
Click to expand...
Click to collapse
Check ACC control config what control file your phone uses, then see in Battery Charge Limit if you can select that control file manually.
I think it can also manually write the control file, but not quite sure.
pl1992aw said:
Check ACC control config what control file your phone uses, then see in Battery Charge Limit if you can select that control file manually.
I think it can also manually write the control file, but not quite sure.
Click to expand...
Click to collapse
Yeah I figured that, but since I have Acc with AccA working there's really no need to go back to Battery Charge Limit.
Nemix77 said:
Yeah I figured that, but since I have Acc with AccA working there's realy not need to go back to Battery Charge Limit.
Click to expand...
Click to collapse
Just to clear the things that you've already said
You mean ACC with AccA is working properly? If not, is there any problems with using ACC with AccA app?
I used ACC with AccA app before on my raphael times with EvoX Custom ROM, works well and haven't encountered any problems with using with ACC via AccA App

Categories

Resources