[GUIDE][ROOT] Limit battery charge level with Tasker for OP5T - OnePlus 5T Guides, News, & Discussion

Reference Thread: https://forum.xda-developers.com/pixel-xl/how-to/guide-limit-battery-charge-level-tasker-t3668059
attached are the xml's that works for the OP5T Oreo. ive been using this for a week now and its seems reilable. you can change the values of battery level and wait times.

oops, mods please move to appropriate forum. thanks

Thank you. I was looking for it.

The battery don't charge more after unplugged and plugged again with 72%

Charging enable has a wait time of 1 hour. You can change this if you want to enable charging sooner. Wait time thats too short will toggle charge and discharge quickly if device is left plugged in. Not sure what that will do to the device. ?

jonahmt21 said:
Charging enable has a wait time of 1 hour. You can change this if you want to enable charging sooner. Wait time thats too short will toggle charge and discharge quickly if device is left plugged in. Not sure what that will do to the device.
Click to expand...
Click to collapse
OK. Great.

How should i use this ? ?

repulse said:
How should i use this ? ?
Click to expand...
Click to collapse
I didn't get it work either but as no one hasn't given any answers yet I'm going to try... This is what I tried:
1. Import the tasks to Tasker
2. Create a new profile. Select State -> Power -> Power. The source should be kept as "Any".
3. This one is a wild guess but I think you should use the Charge disabled task as the primary one.
4. Add an exit task to that newly created profile. I think it's the Charge enable task.
I left my phone plugged in to a charger and the charging stopped when the desired battery level was reached. However, it never started to charge again. My phone was plugged in for a couple of hours and I had to use my own task to edit the charging enabled file. Did I do something wrong? Any help would be much appreciated.
Edit. Got it working. The charge enable task was somehow corrupted in the import process.

jonahmt21 said:
Reference Thread: https://forum.xda-developers.com/pixel-xl/how-to/guide-limit-battery-charge-level-tasker-t3668059
attached are the xml's that works for the OP5T Oreo. ive been using this for a week now and its seems reilable. you can change the values of battery level and wait times.
Click to expand...
Click to collapse
Could you please explain why actions 1 and 4 are needed in the charge disable task?

Please read the reference thread. It was already explained there. Thanks

How to change battery level? Do I need to edit the xml file or I can do it at tasker?
Thanks.
jonahmt21 said:
Reference Thread: https://forum.xda-developers.com/pixel-xl/how-to/guide-limit-battery-charge-level-tasker-t3668059
attached are the xml's that works for the OP5T Oreo. ive been using this for a week now and its seems reilable. you can change the values of battery level and wait times.
Click to expand...
Click to collapse

lyrebird said:
How to change battery level? Do I need to edit the xml file or I can do it at tasker?
Thanks.
Click to expand...
Click to collapse
You can edit it with Tasker. Just change the percentage to your liking:

This doesn't seem to be working on OB9. It will stop charging at set level but it will enable charging again after a few seconds. Anybody have an idea why?

jonahmt21 said:
This doesn't seem to be working on OB9. It will stop charging at set level but it will enable charging again after a few seconds. Anybody have an idea why?
Click to expand...
Click to collapse
Have you tried narrowing down the issue? What happens if you manually edit the control file?
It's very unfortunate if Oneplus has started editing the charge control file periodically. I haven't upgraded to OB9 yet and will wait for results before upgrading.

A little more testing...
Removed the charge enable exit task to see if the charging will be permanently disabled, but the charging still enables after a few seconds. Seems like the device is detecting that the device is plugged in and the battery is not at 100% so it enables charging again. Not sure how to get around this. ?

Crap, nevermind, i had a magisk module messing up with tasker. Original tasks still work. Please disregard previous replies. Whew!

Work only on oos or custom rom too
?

Thanks, that's one fewer app.
Running on Liquid Remix.

Duduzinho16 said:
Work only on oos or custom rom too
?
Click to expand...
Click to collapse
Rom version shouldn't make any difference.

Related

Tips on Getting the Most out of your Battery

Anybody have any tips on getting the most out of your battery. I'm currently rumming WM6 business edition and just want to know how I can get more out of my battery. I have read to turn off wi-fi and gprs when not using it.. is there anything else that can be done. I have all the battery patches but i dont feel as if they are working..any help would be greatly appreciated
turn IR beam off too...
is that set on by default?
Turn off your phone overnight. You can get an app to do this by schedule (I cannot remember the name, sorry).
PaulMdx said:
Turn off your phone overnight. You can get an app to do this by schedule (I cannot remember the name, sorry).
Click to expand...
Click to collapse
Do you mean turn my phone off when i recharge? I ususal recharge during the night
i pretty much never run out of battery and i am running windows mobile 6, all i do is just make sure the screen is off (the button on the top right) and it really helps the battery out
jawnsixteen said:
i pretty much never run out of battery and i am running windows mobile 6, all i do is just make sure the screen is off (the button on the top right) and it really helps the battery out
Click to expand...
Click to collapse
Do you do this during the night or throughout the day. Thus having the phone set to turn off after 5 mins of inactivity
by the way, how the heck can i disable "gprs always on" thing? i don't need gprs often, so it just hangs out there without a real purpose, and probably draining my battery a bit...
banannq said:
by the way, how the heck can i disable "gprs always on" thing? i don't need gprs often, so it just hangs out there without a real purpose, and probably draining my battery a bit...
Click to expand...
Click to collapse
You can use NoData. Works well for me. Needs registration to the website:
http://www.modaco.com/index.php?showtopic=246171&st=0
that just lets you turn it on and off. is there any app that turns on only when needed ie you try to access the internet or get a mms messaging
k2e15 said:
that just lets you turn it on and off. is there any app that turns on only when needed ie you try to access the internet or get a mms messaging
Click to expand...
Click to collapse
WM6 should do this after a standard install...by default! Make sure you have GPRS AlwaysOn turned off (Using a Registry Editor search for "Always" and find your matching Internet Connection. Set the value of the AlwaysOn DWORD to 0, not 1.)
Let me know if you need any other help.
i press the button on the top right whenever its not in use. And of course at night.
i set the display to the 2nd bar from the left. it saves way more battery then having the bar in the middle. i turned off the beam. i set power off to 2mins and backlight out @ 30secs. i push the power button (top right) during any phone call to turn the display off. my battery can last me all day and i talk/txt alot.
Buy an extended battery?
aNiMeMaN14 said:
Buy an extended battery?
Click to expand...
Click to collapse
lol I have done that!! but I know that there has to be away to save battery.. THx guys I'm going to try these suggestions!
k2e15 said:
Do you mean turn my phone off when i recharge? I ususal recharge during the night
Click to expand...
Click to collapse
I meant turn it off if you leave it overnight without charging it. My point is moot if you charge it overnight anyway.
I charge mine at work mostly, so I don't charge it overnight. Generally I do so every couple of days.
hpspec said:
WM6 should do this after a standard install...by default! Make sure you have GPRS AlwaysOn turned off (Using a Registry Editor search for "Always" and find your matching Internet Connection. Set the value of the AlwaysOn DWORD to 0, not 1.)
Let me know if you need any other help.
Click to expand...
Click to collapse
Found it..but there is not a way to actually turn off gprs if I use it for direct push correct?
ok..not to start something but if uve gone as far to buy a ext battery and ur still not happy w/ batt life sell ur device and buy a nokia they are great on battery.. u cant expect to get good battery life out of this thing..i mean look what it does...
What kind of battery life are you seeing with the WM6 BE rom? I installed it a week ago and so far I've been AMAZED as the battery life. With my reg-tweaked Cingular 2.25 stock rom I'd end the day between 45-55%. Now It's 75-80% solid.
Also, it seems that Wifi uses less power in this rom too...
As of right now I'm not using my extended battery because i wanted to go back to the original battery that came with the phone for a short time since the other battery is bulkier, I only like to use it during the weekends when I'm not close to a power source. I've used all the tips in this thread and they have all worked as my battery has been going strong. thx

camera flash when battery is low

does anyone know of any tweaks or registry edit to enable flash even when the batery is low?
how low before it stops working? My phone had about 6% left the other day and the flash didn't work... I didn't really think twice about it because I'm sure a dual LED uses a lot of power.
crisisinthecity said:
how low before it stops working? My phone had about 6% left the other day and the flash didn't work... I didn't really think twice about it because I'm sure a dual LED uses a lot of power.
Click to expand...
Click to collapse
It stops working at %20 but I think there's a tweak for it.
Found the solution. I've made the change but haven't tested it yet as my battery is above 20%.
Its a registery tweak.
HKEY_LOCAL_MACHINE\Drivers\BuiltIn\Battery\
change the default "0" value of "FlashlightpowerUnavailable" to 1, followed by a Soft Reset.
doesn't it seem like it may become an issue to enable the flash while the battery is that low. Seems like phone may die when in the process of taking a picture. Glad I found this post though because a few nights ago I had the same issue and thought that I had busted the phone.
kcaj32 said:
Found the solution. I've made the change but haven't tested it yet as my battery is above 20%.
Its a registery tweak.
HKEY_LOCAL_MACHINE\Drivers\BuiltIn\Battery\
change the default "0" value of "FlashlightpowerUnavailable" to 1, followed by a Soft Reset.
Click to expand...
Click to collapse
I did that. But when i have 12% batt left and I open my camera, still won't let me use flash. any ideas?

[Q] Nexus 4 phone gets switched off when battery reaches 30%

HI All,
My Nexus 4 just gets powered off when battery is around 30% and now its starting get worse, it gets switched off when its around 40%.I haven't rooted my phone. It is weird first the network goes off and then when i lock my phone and unlock it just doesn't come up and when I put it for charge it shows as it is charging from 0%. This is being happening since 2 weeks. Anybody has faced the same problem?
voltage :-4.3V
avg voltage :- 4.0V
temp :- 34.7 C
avg temp:- 33.1 C
Anyone has a solution pelase
praveenpk said:
HI All,
My Nexus 4 just gets powered off when battery is around 30% and now its starting get worse, it gets switched off when its around 40%.I haven't rooted my phone. It is weird first the network goes off and then when i lock my phone and unlock it just doesn't come up and when I put it for charge it shows as it is charging from 0%. This is being happening since 2 weeks. Anybody has faced the same problem?
voltage :-4.3V
avg voltage :- 4.0V
temp :- 34.7 C
avg temp:- 33.1 C
Anyone has a solution pelase
Click to expand...
Click to collapse
I'm having similar problems, please check my thread too!
praveenpk said:
HI All,
My Nexus 4 just gets powered off when battery is around 30% and now its starting get worse, it gets switched off when its around 40%.I haven't rooted my phone. It is weird first the network goes off and then when i lock my phone and unlock it just doesn't come up and when I put it for charge it shows as it is charging from 0%. This is being happening since 2 weeks. Anybody has faced the same problem?
voltage :-4.3V
avg voltage :- 4.0V
temp :- 34.7 C
avg temp:- 33.1 C
Anyone has a solution pelase
Click to expand...
Click to collapse
japmeet said:
I'm having similar problems, please check my thread too!
Click to expand...
Click to collapse
Hi guys! You have two answers:
- It is not a real problem but a bad representation of your battery level. Batterystats.bin is a file under /data/system. In this file the phone saves information about your battery level and capacity. Using the saved values, system can create the battery icon, making a level or another. This file is auto-generated, so if u delete it, you are cleaning the battery information in your device. If the saved information isn't real maybe you seem to have 30% battery but the real battery charge is 1%, so my suggestion is:
1. Download an explorer (I would recommend Root Explorer)
3. Charge the phone until the top, let it discharge until the phone cannot reboot
4. Charge it till 100%, unplug it from charger
5. Reboot and connect it back to the charger till 100% again. Unplug it
6. Go to /data/system and delete batterystats.bin
7. Use the phone normally​
If the problem isn't solved in 1-2 days then...
- It is a real problem, may be caused for who main reasons:
The kernel isn't making a good management of the energy. Flash another kernel and set up proper CPU Values to get a good battery life . Configure the cpu frecuencies using an app for so, like trickster mod, cpu master, franco kernel updater, you have a lot... Also undervolt your phone if u think it is necessary too.
Your hardware is broken somewhere, maybe a bad battery, or something overcharged or wrong there. Contact Google SAT and praise for it to be a factory bug lol
I am sorry for this big bible, but hope it is useful for you and the community
luiseteyo said:
Hi guys! You have two answers:
- It is not a real problem but a bad representation of your battery level. Batterystats.bin is a file under /data/system. In this file the phone saves information about your battery level and capacity. Using the saved values, system can create the battery icon, making a level or another. This file is auto-generated, so if u delete it, you are cleaning the battery information in your device. If the saved information isn't real maybe you seem to have 30% battery but the real battery charge is 1%, so my suggestion is:
1. Download an explorer (I would recommend Root Explorer)
3. Charge the phone until the top, let it discharge until the phone cannot reboot
4. Charge it till 100%, unplug it from charger
5. Reboot and connect it back to the charger till 100% again. Unplug it
6. Go to /data/system and delete batterystats.bin
7. Use the phone normally​
If the problem isn't solved in 1-2 days then...
- It is a real problem, may be caused for who main reasons:
The kernel isn't making a good management of the energy. Flash another kernel and set up proper CPU Values to get a good battery life . Configure the cpu frecuencies using an app for so, like trickster mod, cpu master, franco kernel updater, you have a lot... Also undervolt your phone if u think it is necessary too.
Your hardware is broken somewhere, maybe a bad battery, or something overcharged or wrong there. Contact Google SAT and praise for it to be a factory bug lol
I am sorry for this big bible, but hope it is useful for you and the community
Click to expand...
Click to collapse
Thanks, I'll try it out
Edit: I'm using franco r191, Cpu max at 1Ghz, -150mV undervolt. I just had a question. Don't the battery calibration apps like BatteryCalibration do the same thing?
japmeet said:
Thanks, I'll try it out
Edit: I'm using franco r191, Cpu max at 1Ghz, -150mV undervolt. I just had a question. Don't the battery calibration apps like BatteryCalibration do the same thing?
Click to expand...
Click to collapse
Yes, they do, but since everyone has a downloaded root explorer I think is easier this way. You don't have to download any app
luiseteyo said:
Yes, they do, but since everyone has a downloaded root explorer I think is easier this way. You don't have to download any app
Click to expand...
Click to collapse
That app didn't do anything, however I'll try it your way too, and update
japmeet said:
That app didn't do anything, however I'll try it your way too, and update
Click to expand...
Click to collapse
How do u know it didn't do anything?
luiseteyo said:
How do u know it didn't do anything?
Click to expand...
Click to collapse
battery stats didn't reset, plus phone still died at 34%.
I'm charging my phone right now and it goes from 34% to 100% in a few minutes but when I reboot it , the battery %age comes back to 34-35%, what should I do in this case?
Edit: the voltage its showing right now is around 4.3V, so is the 100% correct?
japmeet said:
battery stats didn't reset, plus phone still died at 34%.
I'm charging my phone right now and it goes from 34% to 100% in a few minutes but when I reboot it , the battery %age comes back to 34-35%, what should I do in this case?
Edit: the voltage its showing right now is around 4.3V, so is the 100% correct?
Click to expand...
Click to collapse
Yes, it is correct. If you are rooted you shouldn't have any problem deleting it. Cannot reset, because don't exist. Charge the phone for 8h tonight. When you get up delete it and report.
I won't be very dissapointed if you thank ANY of my answers lol!!
luiseteyo said:
Yes, it is correct. If you are rooted you shouldn't have any problem deleting it. Cannot reset, because don't exist. Charge the phone for 8h tonight. When you get up delete it and report.
I won't be very dissapointed if you thank ANY of my answers lol!!
Click to expand...
Click to collapse
lol, don't worry, trust me I am very thankful for your help, I'm clicking on those little thumbs up now
---------- Post added at 03:36 PM ---------- Previous post was at 03:20 PM ----------
luiseteyo said:
Yes, it is correct. If you are rooted you shouldn't have any problem deleting it. Cannot reset, because don't exist. Charge the phone for 8h tonight. When you get up delete it and report.
I won't be very dissapointed if you thank ANY of my answers lol!!
Click to expand...
Click to collapse
Question, restart after deleting batterystats.bin file?
japmeet said:
lol, don't worry, trust me I am very thankful for your help, I'm clicking on those little thumbs up now
---------- Post added at 03:36 PM ---------- Previous post was at 03:20 PM ----------
Question, restart after deleting batterystats.bin file?
Click to expand...
Click to collapse
It isn't necessary
luiseteyo said:
It isn't necessary
Click to expand...
Click to collapse
Alright, thanks, this time when it hit a 100% I restarted it and it stayed at around 97-98%, let it charge all the way up to 100% and deleted the batterystats file, lets see if this fixes my problem!
Thanks for your support
japmeet said:
Alright, thanks, this time when it hit a 100% I restarted it and it stayed at around 97-98%, let it charge all the way up to 100% and deleted the batterystats file, lets see if this fixes my problem!
Thanks for your support
Click to expand...
Click to collapse
It's ok!
Don't charge it till 100%, because if the file is corrupted it isn't a real 100%, do you understand? Let it charge some hours to grant it is fully charged!
Bye and good luck!
If you have any question more, just quote my post

Battery 🔋 Calibration

Hiii guysss...!!!!
Now Days Rooting is our daily part of life
after lot off customization and custom Roms
some times our battery gives some problems such as battery drain all other
so i found one solution on it......
Battery Calibration ......!!!!!
No Need Of Any App For It Just Follow this simple steps ....
We will start with a basic necessity for good battery performance CALIBRATION.
Calibration is the process where you get your battery to hold as much charge as it can and the battery meter to display the correct reading. I think when you do this, you will be suprised how much more charge your battery takes than the phone thinks it needs.
1. Charge your phone 100% while it’s on.
2. Use root explorer, astro, or file manager of choice and go to /data/system and find batterystat.bin. Delete it. Then use your smartphone as usual ?
After total use You can power it off on 15% also (beetter to use till shutdown ) but not upper on that .....!!!
3. power off and allow charge it up to 100%. (This may take longer than you think)
4. After Full Charge Power it on, and use it....
5. Go back to step 2 and repeat one more time.
6. After doing this procedure 2-3 times your mobile ? will give you cool ? battery ? backup surely
It's works on every version 4.0 kitkat -6.0 marshmallow
Thank You ...
ViksAndroiD
Hope it's become helpful to everyone
It's useless. batterystat.bin file recreated itself when fully charge your phone!
Alexey71 said:
It's useless. batterystat.bin file recreated itself when fully charge your phone!
Click to expand...
Click to collapse
It's not useless.
This is how you calibrate a lithium-ion battery.
JonnyBorneo said:
It's not useless.
This is how you calibrate a lithium-ion battery.
Click to expand...
Click to collapse
batterystat.bin deleted and create automatically, each time after charging
Alexey71 said:
batterystat.bin deleted and create automatically, each time after charging
Click to expand...
Click to collapse
The file doesn't have anything to do with calibration.
It's just a log file. By deleting it you create a blank log and it starts anew.

Help me for improve battery life

My best SOT is 2h and this is so bad. I saw other guys having 4-5h SOT. Can someone help me for improve my zenfone5 battery life. (My english is not good enough sorry if i did mistakes.)
Have you checked the consumption of apps in settings? You can try "Greenify" in google play (maybe root needed)
Blak3n said:
Have you checked the consumption of apps in settings? You can try "Greenify" in google play (maybe root needed)
Click to expand...
Click to collapse
Screen is first on battery consume, android system and mobile standby next. I don't understand to how to use greenify i tried but it didn't help.
Blak3n said:
Have you checked the consumption of apps in settings? You can try "Greenify" in google play (maybe root needed)
Click to expand...
Click to collapse
Try to use PROJECT SKYNET Genesys TX7
Link http://forum.xda-developers.com/android/software-hacking/android-l-booster-1-soon-t3030796
rhizhalt said:
Try to use PROJECT SKYNET Genesys TX7
Link http://forum.xda-developers.com/android/software-hacking/android-l-booster-1-soon-t3030796
Click to expand...
Click to collapse
are there any guide for install this ? thank you
Try to calibrate your battery, https://www.androidpit.com/how-to-calibrate-the-battery-on-your-android-device, you will find the method to half article.
Just do it once time and see.
Codseus said:
are there any guide for install this ? thank you
Click to expand...
Click to collapse
Flash using twrp and reboot, open terminal emulator, type "su" then "menu"
Blak3n said:
Try to calibrate your battery, https://www.androidpit.com/how-to-calibrate-the-battery-on-your-android-device, you will find the method to half article.
Just do it once time and see.
Click to expand...
Click to collapse
I'm calibrating my battery now. I will feedback about that next day.
Recalibatre battery asus zenfone:
1) Wipe cache data
2) Turn on your phone, charge until 100%, use it until the battery drains to 0% and turned off.
3) When the phone turned off, plug in the charger and charge it to 100%
4) Turn on the phone, with the charger still plugged in, when ASUS logo appears, remove the charger.
5) After tuning on, do not use for 5 minutes.
6) Do this when you change upgrade / downgrade rom.
Calibrating changed NOTHING :/ or I didn't do it well.

Categories

Resources