yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] hgmichna:
Running the battery down to zero does not harm it, unless you leave it there for weeks or months. The electronics prevent a damaging deep discharge.
[Android Apps and Games] FPSUsername:
The battery does have a safe build in so you can not completely empty it (0% still leaves some juice in it)

Android helps you with it by shutting down itself with an extra safe above the safe level of the battery so you won't lose any data. It is fine to drop it to 0%, but it may wear out the battery just like pumping it to 100%.

If for some reason the battery is undercharged, it may be dead for ever, thus it won't charge anymore.
[Android Apps and Games] GerGa00:
This app is awesome but I hope the Nividia Shield K1 tablet will be supported at some point.
[Android Apps and Games] post-mortem:
Anyone get a chance to see these logs?

BTW, can we get the option for a permanent notification? I feel like it would solve my issues, while also giving you something to put in the settings :) .
[Android Apps and Games] dmyn1993:
This app doesn't work on my device, I have been limited to 80%, but it still continue to recharge.
[Android Apps and Games] InsaneCat77:
Ver 0.9.2, MiMax Pro, Nitrogen OS.

Enabling USB-modem mode leads to "BCL service disabled" and continue battery charging over limit.

Simple running BCL again (or switching mode via widget) - "BCL service enabled" and charging off (if battery volume over limit, of course)

This is bug or feature? :)
[Android Apps and Games] swa100:
Does resetting battery stats work for others with magiskSU installed?
[Android Apps and Games] Ace42:
Yes, it works fine. Using v12 Magisk on 7.1.2 (omni). The app automatically clears the stats when I unplug at my set limit of 80%.
[Android Apps and Games] swa100:
That's weird. Another person here had the same problem with magisk and resetting battery stats. He had a Nexus 5 (if I recall correct) and I have a Nexus 6p. What phone do you have?

---------- Post added at 08:34 PM ---------- Previous post was at 08:32 PM ----------

Are you also on the may security patch?
[Android Apps and Games] Ace42:
I have the Le Pro 3. The security patch is May 5th (7.1.2).
[Android Apps and Games] swa100:
Thanks for your reply! I'm curious what de dev thinks of this issue. Seems like not anyone has it. On SuperSU it worked great, but with magiskSU it doesn't​. While it works for you..

Edit; does anyone know if this app works on Android O preview too? Since the first beta will be released tomorrow.
[Android Apps and Games] bamtan2:
[MENTION=6898873]sriharshaarangi[/MENTION] FYI: Testing on Galaxy Nexus with CM12.1 and BCL says 'device not supported'. Thanks for your work still :)
[Android Apps and Games] sriharshaarangi:
There are various control files in different devices(due to OEMs), and toggling the values in them(0 and 1) makes it possible to enable and disable charging via software(might not be possible in every device), though cable is physically connected.

Since I don't have every device, it is not possible for us alone to add support for all devices. We could support a lot of devices due to information provided by testing possible files on different devices by the community here.

Hence, for support to be provided to other devices, you need to do some detective work to find the files on the respective devices.

Please refer to this file for control files of currently supported devices, so you can know where they are generally present: https://github.com/sriharshaarangi/...aster/app/src/main/res/raw/control_files.json

If you can find the file, then it will be added to the app.
[Android Apps and Games] sriharshaarangi:
Please see the above post :)
[Android Apps and Games] sriharshaarangi:
In the first log, OS killed the app in line number 137

In the second one, I don't see anything wrong, it might be due to this: https://xdaforums.com/android/apps-...arge-limit-t3557002/post72218650#post72218650
[Android Apps and Games] swa100:
Wiping battery stats doesn't work in the O dp2 with magisk either unfortunately..

Edit: setting charging limit does work correctly fortunately
[Android Apps and Games] sriharshaarangi:
Wiping stats is not working for some people with Magisk, may be a log should help us understand the reason.

Can you take a log of it? (Press the reset stats button in the app before you take the log)
[Android Apps and Games] post-mortem:
I saw that too, but I couldn't figure out why. Bizarre.

I would really like to try a permanent notification for this app.
[Android Apps and Games] swa100:
You've got the log in your inbox!
[Android Apps and Games] sriharshaarangi:
Can you run this in the terminal on your phone and see if it resets the stats:

dumpsys batterystats --reset
[Android Apps and Games] tassos_chry:
MagiskSU user here. First command without, second command with su
[Android Apps and Games] StonebridgeGr:
Is there any way to use this application without root my device ? I have a s7 edge and I don't want to root because i will lost the warranty and the Knox .
[Android Apps and Games] Skull97:
No, since this makes changes to system.
[Android Apps and Games] StonebridgeGr:
Another app like this that don't need root ?
[Android Apps and Games] AssToast:
There isn't one. Your best bet would be to download something like accubattery to notify you when the battery hits 80%
[Android Apps and Games] sriharshaarangi:
Thanks for the info.

The above command is what precisely resets the stats, and is what run by the app. I don't know why it is broken with new builds(with May security release) on MagiskSU, and couldn't find any solution :(

From what I understand, dumpsys command is broken

[MENTION=6929614]real_milux[/MENTION] any thoughts?

May be some ROM developer or Magisk developer should be able to help us
[Android Apps and Games] tassos_chry:
On May security release with SuperSU works fine, so i think it's a MagiskSU's bug
[Android Apps and Games] swa100:
Yeah I don't get it. I can't get it to work with magisk v12 or magisk v13.

But someone mentioned earlier that it works for him with may security patch and magisk v12:

---------- Post added at 07:33 PM ---------- Previous post was at 07:31 PM ----------

[MENTION=4470081]topjohnwu[/MENTION], do you have any idea why the command won't work with magisksu, but it does on SuperSU?
[Android Apps and Games] Midomad:
Magisk v13?!
[Android Apps and Games] :
Unstable builds from GitHub
[Android Apps and Games] swa100:
Yes it works great on O dp2.

The only thing I can't get to work is resetting the battery stats. On may security patch it worked with SuperSU but it didn't with magiskSU. On O dp2 it also doesn't work with magiskSU. According to people in the magiskSU threads, batterychargelimit app should be updated to work with magiskSU. I hope this helps. Would love to use the wipe functionality again, but I have to pass safetynet.
[Android Apps and Games] sriharshaarangi:
Can you try the above command with a magisk compatible terminal? If it works, then app can be updated to work with magisk.

And it seems this problem with magisk and dumpsys has occured before:

https://www.reddit.com/r/tasker/comments/69ulrk/magisk_and_dumpsys_root_commands/

https://groups.google.com/forum/#!topic/tasker/Tc6HoFgthlg
[Android Apps and Games] PLSBX:
White screen on Huawei P8 Lite ALE-L21.

EDIT: Just SuperSU stopped working - it's fine now.
[Android Apps and Games] swa100:
---------- Post added at 12:36 AM ---------- Previous post was at 12:35 AM ----------

[/COLOR]

It seems the problem is not magisk. My old n5 running darkrom (Android 7.1.2 may security patch) can run the dumpsys command that resets battery stats, while rooted with magisk. Any clues?
[Android Apps and Games] Midomad:
[MENTION=6847351]harsha139[/MENTION]7 , [MENTION=6929614]real_milux[/MENTION]

What is the purpose of Automatically reset battery stats function?

Should we enable it?

I'm using Charging_enabled(Generic) mode on a OP3T?
[Android Apps and Games] 24imelqui:
It will automatically reset battery stats in setting when your limit is reach and charger removed. Normally it would reset @ 100% w/o app.
[Android Apps and Games] Midomad:
So we should enable it,right?

Because it's disabled by default.
[Android Apps and Games] 24imelqui:
yes, it's safe
[Android Apps and Games] skeeter123:
Just curious as to why this would be beneficial for partial (<100%) charges?
[Android Apps and Games] 24imelqui:
So you stats at Setting-Battery is accurate while you are using your phone/discharge or proof of bragging rights for some.
[Android Apps and Games] skeeter123:
Ah. That's makes sense....thanks!
[Android Apps and Games] post-mortem:
Actually, the OS automatically resets battery stats if the current battery level is at 90% or higher, and the device is unplugged from the charger.

When using this app, there is no need to tell it to reset battery stats if your set point is at 90% or higher, as the battery stats will end up getting reset twice.
[Android Apps and Games] gerlium:
Yes, but it's the only App whose foreground process get killed by Android. I've plenty of RAM.
[Android Apps and Games] hgmichna:
Endless charging on and off loop on OnePlus One, Lineage OS 14.1

I just had a case of the already mentioned endless charging - not charging loop. My charging limit is set to charge to 60% and begin charging again below 59%.

While the app was looping, the charge indicator remained at 60%, so it should not start charging again.

And anyway I propose to change the app such that it waits for some time before switching on or off again, I think at least a minute.
[Android Apps and Games] sriharshaarangi:
Please set the threshold to atleast 2% (58% or less), and test. When the threshold is 1%, the 59-60 and 60-59 transitions are not exactly 1%
[Android Apps and Games] hgmichna:
Endless charging on and off loop on OnePlus One, Lineage OS 14.1

Thanks. Will do and observe whether it will happen again.
[Android Apps and Games] Fabiocrummy:
Hi everyone i have a problem (xiaomi mi5 xiaomi.eu 7.5.11 developer)during the night the app limit the battery charging (set in 85%) but when the charge reach the 82% value, the app restart charging and doesn't stop untill 100%. It seems that works well Just One time, and if i leave the cable plugged, the second time It don't works. Someone knows why?. Thank You for replies
[Android Apps and Games] RedSkull23:
Definitely useful, I'll test it later... Meanwhile, thanks in advance!
[Android Apps and Games] Syntr@nic:
HTC One m7

HTC One m7 Lollipop / cm 12.1:

echo 0 > /sys/class/power_supply/battery/charger_control

Works great with Automagic.
[Android Apps and Games] Midomad:
[MENTION=2893530]hgmichna[/MENTION] Do you still recommend you're theory?
[Android Apps and Games] hgmichna:
Slider setting

It always used to work, but once it didn't. But it is still entirely unclear whether the problem was caused by the setting or by something else.

If you want to be on the safe side, leave the slider in its default setting, i.e. two percent steps below the limit, two steps from the left end. Example: If you set the charge limit to 80%, set the slider to recharge below 78%, which, if my memory serves me well, is the default setting.

This is not what I earlier recommended. It needs more testing.
[Android Apps and Games] Tiger Valentin:
Can anyone tell me what it is and how it will work in easy wording?:D

Thanks in advace
[Android Apps and Games] Midomad:
Everything is well explainded on OP!
[Android Apps and Games] Tiger Valentin:
Since when I installed and enabled it in app Status is Discharging and my phone is not charging what I did I diabled it, Uninstall it and restarted my phone and now its charging back.I also tried 2 settings which were possible to do but nothing worked.

Help me

Got it
[Android Apps and Games] cattolicboy:
No please, quoting all the op first thing in the morning
[Android Apps and Games] grujea:
Hello and congrats on the really great idea of an app!!

I just installed it on my rooted Nexus 5, but unfortunately I gota message that it doesn't support my phone (yet)...

Do you have any ETA on that?

Many thanks!
[Android Apps and Games] sryu99:
So good.
[Android Apps and Games] post-mortem:
I would like to have the option of a permanent notification. Would that be easy to add?
[Android Apps and Games] hgmichna:
Permanent notification?

What for?
[Android Apps and Games] Sn0wFl4keZ:
anyway to use on non rooted ? like using ADB
[Android Apps and Games] sriharshaarangi:
Can you please answer the following:

1. Which ROM are you using?

2. What is the security patch level?

3. Using superSU/MagiskSU for root?

4. Are the following files present?

/sys/class/power_supply/battery/charging_enabled

/sys/class/power_supply/battery/battery_charging_enabled
[Android Apps and Games] minwan:
Thank you so much. I have been searching a long time an app like this.

Will give it a try.

Thanks again.
[Android Apps and Games] post-mortem:
As has been discussed previously in this thread, mine is one of the devices where the OS seems to randomly kill the app. I believe a permanent notification might prevent the app from being killed.

So, would it be easy to add the option of a permanent notification?
[Android Apps and Games] grujea:
1 & 2. I'm using stock ROM, you can see more info in the attached screenshot

3. superSU

4. None of the two files are in the specified folder...

Once again, thanks!
[Android Apps and Games] AhmAdDev99:
Your Device Is NOT Supported Yet!

This is what i get on my I9100G - 4.4.4.

Those files NOT FOUND

/sys/class/power_supply/battery/charging_enabled

/sys/class/power_supply/battery/battery_charging_enabled

View attachment 4169002
[Android Apps and Games] Gregbol:
Hello.

The application does not work properly with my 3 phronesis v6 and lsskernel v3.9 note but works with phantom kernel.

In fact it stops the charge but then impossible to recharge the phone it must restart.

When I use the 2nd mode the battery locks to the desired value and then goes back 1% and then starts charging and aisi on.

Do you have a solution.

Thank you

Envoyé de mon SM-N930F en utilisant Tapatalk
[Android Apps and Games] tombraga:
Charge limiting on Lenovo Yoga Tab 3 Plus

I tried to use your app on my Lenovo Yoga Tab 3 Plus.

It seems to work fine and stopped charging at 80% when i tested the first time.

Any tecnical reason from your side against using it on the Lenovo with the new LineagOS rom installiert?

This is the rom installed on my Lenovo:

https://xdaforums.com/thinkpad-tablet/development/unofficial-lineageos-14-1-lenovo-yoga-t3561457
[Android Apps and Games] themakersmarketandroid:
Working perfectly on a rooted S4 running Wicked X v.11.0. Thank you!
[Android Apps and Games] matroskin74:
Please add meizu m2 mini support.
[Android Apps and Games] @sumit@007:
If anyone can confirm this method is safe or not it would be very helpful.

https://xdaforums.com/android/general/battery-unplug-reach-assigned-level-t3616495
[Android Apps and Games] chenrp:
this app works with oneplus 3t?
[Android Apps and Games] Skull97:
Yes, but check the FAQ in OP first.
[Android Apps and Games] Rolerzzz:
Hey, I have been looking for an app like this. Looks nice, especially I like that it offs itself when not used. Too many apps think they need to run 24/7 in background doing god knows what...

I can not get it working tho, because all other control options are grayed out.

I am using Lineage os 14 with Arsenic kernel on OnePlus X

[IMG="SS"]https://u.nya.is/ibwuty.png[/IMG]

Maybe it is because when I tried to changing the value to 0 in battery_charging_enabled I got an error saying not enough space in storage. I have root, as you can see in the ss.

Any idea why is this happening?
[Android Apps and Games] blueberry.sky:
I'd suggest adding this to the FAQ.

Might reduce the posts from users asking for their device to be supported who don't realize that they need to help search out the control file first.
[Android Apps and Games] AhmAdDev99:
I have searched & founded the that change from 1/0 while connect to charge, It will change to 2 if connected to PC. I think this file might be Correct one.

This is the location

/sys/class/power_supply/ac/online

But it's linked to

/sys/devices/platform/pda-power/power_supply/ac/online

Founded another one

/sys/devices/platform/i2c-gpio.7/i2c-7/7-0036/power_supply/battery/batt_charging_source

Running on 4.4.4 - OmniRom - Galaxy S II (I9100G)

Thanks.
[Android Apps and Games] Rolerzzz:
Ok I fixed it, i just had to chmod 7777 for the charging_enabled file.

But do you guys still think it is better to constantly cycle from 87to90 and back than to just stop charging at 100 and feed the power from AC?

Maybe there is a way to make the phone to disconnect battery and eat all of its power required from the ac adapter?
[Android Apps and Games] eginugraham:
It works
[Android Apps and Games] m0_onriver:
too bad, doesnt support my device ?
[Android Apps and Games] @sumit@007:
Don't feel sad.

Until dev finds a way.

Try this.

https://xdaforums.com/android/general/battery-unplug-reach-assigned-level-t3616495
[Android Apps and Games] m0_onriver:
wow.. thanks for this bro, will check it
[Android Apps and Games] :
The OP from this thread has given a general caution against keeping the phone plugged in even after it reaches the assigned level. Why?
[Android Apps and Games] origin4lcr8n:
Loo 8899899ï8
[Android Apps and Games] @sumit@007:
Warning updated.

& I didn't tested by letting it plugged for a long time.

the charger was plugged in phone after it stopped taking charge the max i can go was 3 hours after that i removed it from cable.

I don't think it can create any problem to phone.

But it will be good to play safe.;)
[Android Apps and Games] :
Thanks man ?
[Android Apps and Games] @sumit@007:
Instead of typing you can click button :good::silly:
[Android Apps and Games] tombraga:
Working fine with my Lenovo Yoga Tab 3 Plus and LineageOS 7.1.2

Battery chargings stops at limited percent number

https://vimeo.com//220774475
[Android Apps and Games] m0_onriver:
if i want my batt not to drop 40% and charged until 80%, am i doing the right way? see my attached screenshot.. anyway, thanks for this sir.. ?
[Android Apps and Games] @sumit@007:
Actually you have to select 80,100 or any value greater then 80 so that battery don't take charge after 80%.

Prevent Battery from dropping that method not found yet buddy:D
[Android Apps and Games] m0_onriver:
i have followed the 80,81 on your screenshot but my charging went up to 85%, have i done wrong?

my phone is also rooted
[Android Apps and Games] @sumit@007:
Sorry for inconvenience this method isn't working anymore don't know why.
[Android Apps and Games] DEVILOPS 007:
Someone's hungry?
[Android Apps and Games] @sumit@007:
:D
[Android Apps and Games] m0_onriver:
hope there will be newer version supporting my phone.. ?
[Android Apps and Games] @sumit@007:
Mine also:(
[Android Apps and Games] Syamsyung:
It's still only work when screen on. when phone screen off, the app get kill.

Im using samsung galaxy J5 6.0.1 and been whitelist from optimize battery usage
[Android Apps and Games] hgmichna:
Samsung

That may be your punishment for buying Samsung. The phone has probably so little RAM and so much Samsung bloatware that there is absolutely no room for another app.

I'm only guessing though. Could be something else. But most of us do not have this problem, and there is not much that the app author can sensibly do about it.
[Android Apps and Games] hanataka:
I searched about this for days and found out that using this app is quite unnecessary.

Modern batteries are good enough to last several years.

Many people prefer charging over night to 100% than leave it 80% when they get up.

If my battery has a problem, it is time to buy new phone or new battery instead.

The easy way to maintaining battery life should be unplug your cable when reaching 100%, and quick charge when u get up then go to work.
[Android Apps and Games] marbertshere:
It might be true that batteries should last several years, but my 6P battery just hasn't held up. And it's extremely difficult to replace the battery in this phone. But this app doesn't cause any harm and may extend the life of your battery as well.
[Android Apps and Games] hgmichna:
Should the battery last two years or four?

A Li-Ion battery that is charged to 100% every day or night will show significant capacity degradation after two years. So it depends on what you mean by "several years".

Limiting the charge when you know that you don't need a full battery does not cost you much, so you can easily stretch the life of the battery to three or four years by limiting the charge on most days to 80% or even less. (I use 60% without any problems, and my phone, a OnePlus One, is already three years old.)
[Android Apps and Games] Username already in use:
This app is awesome! Installed it on my Galaxy s4+ (GT-i9506) with Android 7.1.2 on it. Have been looking several years for something like this. Thank you so much!
[Android Apps and Games] m0_onriver:
i am now doing the 40-80% mark.. ???
[Android Apps and Games] tombraga:
Same happen to me and i don´t have Samsung and have lot of empty space. Mine is Lenovo Yoga Tab 3 Plus.

Sometimes charging stopps at defined 80%, sometimes pass it and charge to 100%, don´t understand why.
[Android Apps and Games] AhmAdDev99:
I think you Should add an option Custom_Control_File_Location (EditText), So we can search for control_file by our self and type the file_location in it.

That would be AMAZING.
[Android Apps and Games] hgmichna:
Charges to 100%

When the charging is interrupted while the app has stopped the charging, it then charges to 100% when the electricity comes back.

I have this problem in the car. When I stop for a break, charging is interrupted. When I go on driving, it charges towards 100%. I believe this is a problem beyond the app author's control.
[Android Apps and Games] tombraga:
I observed that the app stopps really the charging 1t 82% and let it discharge until 79%, then the tablet returns charging. This is working well.

When i am present i usually switch off the recharger then and continue using my tablet normally.

But when i do the charging and leave the home or charging during the night, then it´s charging until 100%.

But the electricity is always existing, the charging cable is locked and the charger also.

So if i understand you well, the app stopps the charging at highest limit (in my case 82%) and let it discharge until the lower limit ( in my case 80%), then the app comands the tablet to return charging, when getting level under limit (in my case 79%).

But then there is no app-control more of the 82%, right?

And it´s charge until 100% then.

[IMG="charging limiter"]http://downloads.magoarte.com/Forum/battery%20split.jpg[/IMG]
[Android Apps and Games] hgmichna:
Charges to 100%

That is a different problem. My previous reply does not refer to your situation. I don't know what causes your phone to keep charging to 100%. My phone does not do that when permanently connected to a charger.
[Android Apps and Games] tombraga:
I think i found out something now. When i enable the battery charge limit app first and the connect the charging cable, it´s not working correctly.

But when i connect first the charging cable and the open the app and enable it, it´s working.

somebody can confirm the same?
[Android Apps and Games] hgmichna:
Charges to 100%

Not on my phone. I have the app permanently enabled, and it works just fine.

Apparently this is a problem associated with your phone type.

At least you have a workaround now.
[Android Apps and Games] tombraga:
No phone, tablet (Lenovo Yoga Tab 3 Plus) rooted and with LineageOS 7.1.2 unofficial.

Hans Georg, kann ich dich auch irgendwie sonst kontaktieren (pm oder mail)?
[Android Apps and Games] iluvxda:
Hi dev, any way to make this work for xiaomi mipad1? It says my device is not supported at the moment.