yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] Lawnmove:
I have the same issue. The only difference is that it keeps my phone awake even after disconnecting and turning the app off. Therefore I did a factory reset to get rid of the issue. However, even without reinstalling the app, my phone is still facing the battery drain.

I checked my wakelocks and 700000.Ssub is keeping my phone always awake. There are also some side effects like: I can't shut off my phone anymore (auto reboot), the battery icon displays charging (the lightning) even though I'm not charging.

Could those wakelocks be caused by some issues with the app?

I'm kinda clueless what to do, because not even a factory reset helped.
[Android Apps and Games] amplatfus:
Thank you for for this great app.

In my case battery keeps the life limit set percentage while plugged only when plugged to original charger. When plugged in car or USB this not happens and battery is discharge to minim set level and charge until limit charge level.

I am on ONEPLUS 2, 7.1.2 19.01.2018, Franko Kernel 12 Dec.
[Android Apps and Games] Infy_AsiX:
Stopping charge (completely stopping current) isn't as suitable as having reduced current to maintain mains power to the device. Altering charging current gets complicated as effectively an alternative charging profile is preferable. Warm/hot temperature charge limits may be modifiable in system alternatively.

May be my post which can be read upon search. Not upped, default on Axon7 is actually 4400.
[Android Apps and Games] Berta Paneslowski:
My conclusion after using for 2 weeks: Sometimes it works and sometimes it loads up to 100%. No idea why. I am using always the same cable and usb charger (not original).

Oneplus 5. Latest oos.
[Android Apps and Games] hgmichna:
Rapid charge-discharge cycle

The rapid charge-discharge cycle is back. I observe the 2×6-second cycle again that I had not seen for months. Running version 1.1.0 (22).

The effect is that the phone is charged up to the limit, then it charges every other 6 seconds until the battery is at 100%.

As I had proposed already a long time ago, if the app can control 6 seconds, it should just as well be able to control hours. This could be an emergency solution if there is no other way to find out why it behaves that way.
[Android Apps and Games] al_atlantis:
does this app really work on mi6?, because i see in v1.0.4 changelog, the support is only experimental. has it already fully supported mi6 on latest version?
[Android Apps and Games] bam80:
Functionality of lowering charging current dependently of battery temperature seems already included in kernel, but maybe not activated by default. It is called "thermal mitigation". The idea is when battery getting warm/cool (not hot/cold) - different corresponding battery charging current limits may be applied, depending on the desired temperature level.

I can provide precise place in sources if there is interest
[Android Apps and Games] Lawnmove:
Works fine on the BQ Aquaris X Pro! Thanks for the work!

Just one error occured. Whenever I'm rebooting, the battery icon displays the charging symbol (the lightning) - even though I'm not charging.

I can fix it by plugging my charger and deplug right after it. Is that normal?
[Android Apps and Games] Infy_AsiX:
Indeed, it's enabling and setup varies by device. On Sony Z3C stock /system/etc/ thermal files are absent but "thermanager.xml" is made available in AOSP. There still is modifiable /sys/class/power_supply/battery/ temp_warm or temp_cool.

On a ZTE Axon 7 that's instead in power_supply/bms/ temp_warm or temp_cool. It has "thermal-engine-8996-X.conf" but current rate isn't available to edit there.
[Android Apps and Games] bam80:
Still, the current rates are essential parameters here - without them, temp_warm or temp_cool are useless.
[Android Apps and Games] Infy_AsiX:
I've edited Warm on the Axon 7 which changes the threshold when charging is stopped. I rely on a lowered voltage_max with the charge at that capacity to prevent charging the battery, only the device. Search my old post for more info on this.

On the Z3C in AOSP the xml current throttling can be configured independently of warm or cool files. However as that wasn't available on stock when I setup, I configured a custom charge profile with parameters like heat on Tasker. This allows the extra benefit of slowing the current to limit the maximum voltage manually since it doesn't have the charging ability to power only the device.
[Android Apps and Games] bam80:
Maybe it depends on device, but for my Nexus 4, there are different kernel-level thresholds for warm/cool and hot/cold states (not sure how it looks in config files though). The charging doesn't stop on reaching warm/cool threshold - only thermal mitigation begins (if configured). Charging does stop only if emergency things happen: battery hot/cold thresholds reached, overvolt/undervolt battery/charger, etc.

PS:

in extreme cases device powers off immediately - there are also corresponding thresholds
[Android Apps and Games] onolox:
What happens when you change to 4.1? The phone shows 100% charged even if it is charged 80% in "real"?
[Android Apps and Games] Mindrila:
No, mine then charges only to 77%. So it behaves just as an internal limit you set in the app. It will also slow down the charging as the current will be reduced due to the reduced voltage.
[Android Apps and Games] cattolicboy:
On mine, apart che auto reset of the stats (service must be disabled manually), it works.

I'm on asop.
[Android Apps and Games] westhaking:
I've tried playing around with this but can't figure out how to setup the profile to do it. Would you mind telling me how?
[Android Apps and Games] davekra:
I'm still having issues where the app will close mid charge. I've uploaded a logcat to github and would appreciate any help.

If additional logs are needed please let me know.

Thanks,

davidk
[Android Apps and Games] rayparlour:
Also having issues on OP5 oreo, crashes almost every time when left overnight or for any moderate periods of inactivity.
[Android Apps and Games] :
When?
[Android Apps and Games] Alvian_P:
not support in android x86 Phoenix OS, it says device not support yet
[Android Apps and Games] davekra:
I just updated my OnePlus 5 to OOS 5.0.2 and installed BCL 1.1.

The first charge after that and I'm still experiencing a crash of BCL mid charge.

I've uploaded another logcat to github in the hopes someone can help.

Thanks,

davidk

ps. After unplugging and plugging the power BCL completed the charge but then started flashing the "BatteryChargeLimit was granted superuser rights" and "Battery reset.." popups for about a minute. I collected the logcat.log and can upload it. It's a little large but if there are key things to filter for I could trim it down.
[Android Apps and Games] davekra:
The thread I opened on github is now closed with no comments or solutions? Is github not the correct place to request help as stated in the first post in this thread?

So far, the only response I've gotten in this thread is to have someone else say they are experiencing the same issues.

If there's no solution for this app, does anyone know of a different app that would serve the same purpose?
[Android Apps and Games] westhaking:
Check out Battery Warner
[Android Apps and Games] davekra:
Thanks for the suggestion. Just checked it out. It seems to need acknowledgment when the charge is done but otherwise seems to work.

Regarding the thread on github, I think I closed it when I entered my second comment. I thought I was just saving the comment, not closing the thread.

Thanks
[Android Apps and Games] Squabl:
I'm having the same problem after upgrading my Oneplus 5t to Open Beta 3. The app randomly crashes and is not reliable any longer. I have turned off the Oneplus battery optimization for this app but it didn't work.

I know at least two alternatives. One is Magisk module and an other is changing the value in the file that controls charging with Tasker etc. I think it would be possible to use tasker to restart battery charge limit at set intervals as well but don't think that it is the right way to go.
[Android Apps and Games] eried1:
I'm not sure if this app ever has worked for me. Everything seems fine until the screen turns off. I recall this being an old problem. [MENTION=8166801]buriimishka[/MENTION] and [MENTION=6246592]gerlium[/MENTION] also wrote about it at the time of the release of 0.82. [MENTION=4141782]HikingMoose[/MENTION] appears to have had a similar problem using Pixel XL in November.

Edit: I do not think Doze has anything to do with it. However, it does seem related to the screen state. Charging is continued right after the screen is turned off.

It seems I have both battery_charging_enabled and charging_enabled to choose from when I look at my files. I'm guessing it shouldn't matter which one I use? Both display "0" or "1".

Using Lenovo P2.
[Android Apps and Games] gerlium:
It still doesn't work with Oneplus One.
[Android Apps and Games] hgmichna:
OnePlus One

It does on mine with LineageOS 14.1.

I occasionally see a 6-second-charge-discharge-cycle problem, possibly only when I use a fast charger with a high charging current, but otherwise it works reliably for me.
[Android Apps and Games] post-mortem:
You might need to forcibly overwrite both files.
[Android Apps and Games] T.kum1993:
Hi I've been using your app for quite some time and it has always worked for me. I'd just wanted to request a few things if you could add them in the app. For eg. Temp and voltage in the notification area which was available in the previous version(s). And to control the charge rate like 2A or 2.4A etc, thank you.
[Android Apps and Games] appleff4:
for people who are using a samsung device : choose store_mode control file because it forces the phone to power itself directly from the charger regardless of the battery percentage and without charging the battery at all so it's waay healthier than making a small charge cycles by using some other control file , but the problem is that store_mode can't be toggled off without a phone reset. imo just charge it and use it till it needs to be recharged then plug it and make a reboot, and im fine with that on my note 3 n9005?.
[Android Apps and Games] hgmichna:
Charge-discharge cycle

Not "waay healthier", only a leettle bit healthier. Short charge-discharge cycles at moderate voltage do not wear out a Li-ion battery.

What does wear them out are high voltages and high temperatures, not charging in general. They don't count charge cycles.
[Android Apps and Games] appleff4:
dude, why you would make a short charge discharge cycles if you can charge the battery to a specific percentage (4.0v 70%? float charge) and just stop charging it completely without any cycling because the phone will be drawing power from the charger itself. btw battery wear will happen in both cases as you said above.

but also you can think of it as a hidden battery feature in samsung devices :D
[Android Apps and Games] Redhawk2000:
Agree. I wish I could take BCL and pair it with the notification shade from battery Warner. BCL seems to work better, but the notification of BW is more compact and customizable with useful information.
[Android Apps and Games] westhaking:
It also has a nice alarm integration feature where it charges between whichever values you set but takes into account when you wake up and has your phone sitting at 100% to start your day off with full charge. That is an awesome feature.

I've tried to make BCL behave this way with tasker and have asked several times on this forum for help but the github instructions for it are sorely lacking and either no one else knows how to make it work or no one can be bothered to help me make it work. Either way, there are features of both apps that if combined would make for a better app than the two of them as they currently are separately.
[Android Apps and Games] hgmichna:
Charge-discharge cycle

Sure, keeping the battery constant and powering the phone directly from the charger is best. I'm only saying that the advantage is small and that users of phones that cannot do that should not cry themselves into sleep every night.

And if that setup has other disadvantages, like having to reboot the phone every time, you could consider accepting a few charge-discharge cycles instead without harming the battery.
[Android Apps and Games] appleff4:
yup as you said :good: , btw for me using batt_slate_mode file isn't working when the phone sleeps (idk kernel wakelock thing i think?) so the phone continues charging when i lock it or it locks automatically. :confused:
[Android Apps and Games] eried1:
UPDATE:

Hmm. So I've been trying to nail down the problem. When I have Tasker switching charging_enabled respectively battery_charging_enabled from "1" to "0" it works, although not instantly (delay about a minute). Sometimes the command has to be executed more than once. When the screen turns off the value in the file inevitably toggles back to "1". The same thing happen when I use this app.

Upgraded to Magisk 14. Unfortunately no change in charging behaviour.

This is driving me insane.

If I enter sys/class/power_supply/battery/power I have a file which says "control" with the value "auto". I think I should probably change it, but I don't know what else I can type.
[Android Apps and Games] DEVILOPS 007:
I can't seem to get this to work with my oneplus 5t.
[Android Apps and Games] stankyou:
Well that's odd. I've been using it on my 5T. I do however notice that on OxygenOS v5.0.3 it seems to kill the background service somehow unlike the last Nougat firmware and Oreo v5.0.1. I plan to factory reset and see if that fixes anything since I've dirty flashed to the latest firmware update.
[Android Apps and Games] tassos_chry:
+1

Same thing happened also on my OP5 5.0.2 clean flashed. Now happens on my OP5T on 5.0.3 too. Although i dirty flashed from Nougat, i dont think that's the issue. Can someone look into it if we get a logcat?
[Android Apps and Games] DEVILOPS 007:
What control file are you using? It doesn't stop charging for me.
[Android Apps and Games] stankyou:
charging_enabled
[Android Apps and Games] Desierto9001:
Same problem with 5T here fellas. Any progress on this?
[Android Apps and Games] Weetbix:
Works fine on my aging angler :good:
[Android Apps and Games] panni:
I'm experiencing the following very odd issues with my OnePlus 5T on Open Beta 3, using charging_enabled and auto-reset-battery-stats, nothing else:

1. the service, even though running, doesn't seem to notice the device-disconnect when connected to my original oneplus car charger - the device-connect is noticed immediately

2. I haven't nailed down when this happens, but after a certain amount of time the phone won't respond to charger-connected anymore (doesn't charge at all). Only a reboot or toggling battery charge limit makes it work again. This may be related to #1
[Android Apps and Games] woof123:
Hello does it work for Mi Mix 2?Also i usually charge my phones on my Pc usb port.Isn't it the best way for battery longevity?
[Android Apps and Games] Desierto9001:
Haven't used the car charger, but can confirm the second issue...

Sometimes it stops charging at all, or otherwise ignores the limit and goes to 100%. In the OP post it says that battery_charging_enabled should not be used with 1+ devices, is charging_enabled from the latest version the same thing?
[Android Apps and Games] Dazed No More:
I have 5T on RR oreo unofficial (not sure if that makes any difference vs OOS) using the play store version and it wouldn't stop charging for me either using any of the three control files. I chose configurable control file without entering any values and its working perfectly.
[Android Apps and Games] audioralf:
I tested Mate 9 on Oreo Android 8 to get this working

... Found working setting:

Main switch 'Active battery charge limit'

Settings:

Configurable ctrl. File data --> Off

Select control file --> enable_charger Huawei

Other checkboxes seem not to make any difference.

Thank you!

It's there a difference between normal charging and fast charging?

My device: Mate 9 supersu B360 Mediapad X2 GEM 701->703 B205 International(AJ mod)
[Android Apps and Games] Krystalmyth:
Thia is working fantastically thank you.

When am I supposed to reset battery stats with this? There seems to be an emphasis on this feature. I thought stats were to be set at 100% and left alone. Is this not the case anymore?
[Android Apps and Games] post-mortem:
See my explanation here. Ultimately, it's an optional feature.
[Android Apps and Games] audioralf:
Is does not work on Mate 9 with in fast charge modus.

I used 2 chargers for testing. One with standard USB and USB C adapter which works.

The USB C cable and 3 A charger seems to use an additional setting for fast charge, and so it is not stopped by the app. If fast charge is not supported by the power supply the app also works.

My device: Mate 9 supersu B360 Mediapad X2 GEM 701->703 B205 International(AJ mod)
[Android Apps and Games] Teracotta:
I have this working on the Galaxy S7, but it isn't working on the (locked bootloader) Galaxy S6.

After a few seconds, the phone begins to charge again regardless of what the app is telling it too. I would guess the kernel is overwriting the control file constantly?
[Android Apps and Games] audioralf:
Maybe the same problem with fast charge like for me. Have you tested off it works on standard USB connection to pc (no fast charge) ?

My device: Mate 9 supersu B360 Mediapad X2 GEM 701->703 B205 International(AJ mod)
[Android Apps and Games] eddi0:
Keeps charging above 80% on my 2016 Pixel. Does it not work on Pixels or is there a specific control file I need to use for it?
[Android Apps and Games] lSUPERFLYl:
Settings > Set Control File > "charger_control" Pixel/HTC One EXPERIMENTAL
[Android Apps and Games] Teracotta:
I have it plugged in to the PC, so fastcharging doesn't work. It is using a Samsung cable though. I will file an issue on GitHub. When the device got down to 80%, there was rapid charging/discharging enabled.
[Android Apps and Games] zohar_ml:
I have OnePlus 5T, Open Beta 3, with charging_enabled and auto reset battery stats.

Charging stops at 79 when the limit is 80, so the stats never get auto reset.
[Android Apps and Games] Teracotta:
The logcat isn't capturing the data. I wanted to prune out the unnecessary parts, but I'm not seeing the health check and battery status lines captured while the logcat is active, and the display turned off.

In fact, that appears to be the problem.

If I plug in the device, launch battery charge limit, and watch the device, it seems enabled. I watched the device go from 94% to 93%.

But once I turn off the display, the phone starts to charge again despite battery charge limit saying it is "discharging". It shoots up to 96%.

Similarly, in the logcat I don't see any status update.
[Android Apps and Games] Weedalot:
Also notice you have high battery drain off you don't unplug right away after it reached charge level or if you don't disable service mentally after unplugging.
[Android Apps and Games] Teracotta:
I think I've found the problem. The /sys/ folder cannot be written too, even with root. I'm looking at the md5 and on the Galaxy S6 it says unknown (can't calculate), while on the S7 one displays.

batt_slate_mode always reads 1

What do I have to do to enable writing to the /sys/ folder, if I already have su?
[Android Apps and Games] ecsvik:
It works like a charm

Thank you for this brilliant app, I have been looking for like this for ages!

I have a Xiaomi Redmi 4x santoni phone with

- ROM: Cardinal-AOSP-5.3.1-OREO-santoni-OFFICIAL-20180118

- Kernel: LH Kernel for the Xiaomi Redmi 4X (2018-01-25)

On my system Battery Charge Limit app goes beyond my expectations!

I am using Battery Charge Limit 1.1.0.

I set Control File to battery_charging_enabled (Nexus), and set limits between 45% and 55%.

What the app does on my phone is charging battery up to 55%, then it keeps current flow exactly on that level what phone consumes!

Battery temperature keeps on normal room temperature level (27,5C).

Maybe it's a bug, but for me it's a feature! :victory:
[Android Apps and Games] RafalCOM:
Android Auto

I am using this app for a long time and except a short period when it stopped working on my Pixel 2 it's great. There is one thing though I would like to mention. I started to look for an app like this when I bought a car with Android Auto (Chevrolet). As this requires you to be plugged in all the time I wanted to make sure I am not constantly at 100%. And with Android Auto I noticed a small quirk after trying to figure out what's going on for a bit. So it looks like Android Auto does not recognize my phone when it's at max defined charge (80%). It just plainly says "no device". To make it work I need to turn off this app and with a way how Android Auto works I cannot turn it back on while connected. It's definitely not a deal breaker but I am curious if I am missing something or if there is a way to get around it in a better way.

Anyway thx a lot for this great app.
[Android Apps and Games] sozo1976:
Just installed the app from Play Store. It instantly rebooted my phone and has kept going in a reboot-loop since then. Samsung Galaxy S2 running Beanstalk.

Update: After unplugging the charger it was able to start properly but now keeps crashing any app (including the launcher).

Update2: seems like it kept crashing because I actually didn't have root access on this phone. Reimaged phone with LineageOS 14.1 and the addonsu option, enabled root. Then this battery charge limit app installed and works fine.

Perhaps a request to DEV would be to implement some error handling for missing root access?
[Android Apps and Games] zpower:
Same "problem" here.

Set to 80-60% and when reach that keeps charge flow to 80%

Enviado do meu Aquaris X5 Plus através do Tapatalk

---------- Post added at 10:42 PM ---------- Previous post was at 10:40 PM ----------

Same "problem" here.

Set to 80-60% and when reach that keeps charge flow to 80%.

Never discharge.

Enviado do meu Aquaris X5 Plus através do Tapatalk
[Android Apps and Games] Zixione:
Just upgraded to 1.1.0 on my Motorola Defy+. After reboot stuck at bootanimation and there is no charging light when connected to a charger (yes, charging the phone while still at bootanimation). Luckily, the recovery still works. Is there a way to manually uninstall v1.1.0 from recovery?
[Android Apps and Games] Desierto9001:
Yeah, I've tried the same exact setup you have on your screenshot, still charging to 100 :(
[Android Apps and Games] rayparlour:
would it be possible to add the ability to set the notification importance level? it would be nice to be able to set it to low so the notification size is smaller
[Android Apps and Games] Dazed No More:
Disregard my previous post.....while it did stop charging according to the animation as well as the app switching from charging to discharging, I noticed something was not right at all. It would stay at 90% for almost an hour of use which tells me it was charging higher than my 90% limit. I've since said screw it and decided to just use my device and jot worry about the battery. The phone is such a beast and will last for years that when the battery dies I'll just have one plus replace it.
[Android Apps and Games] sa3e1:
Working fine on Nexus 5 :good:

Just tried it according your instructions, and it is working form me on Nexus 5 Dirty Unicorns RC-v12.0-20180128 ROM also. Thanks!
[Android Apps and Games] audioralf:
Will there be a solution for fast charge?

I guess there is a setting which enables fast charge. This must be disabled when limit is reaches. The app works with normal charge on Mate 9.

My device: Mate 9 supersu B360 Mediapad X2 GEM 701->703 B205 International(AJ mod)
[Android Apps and Games] suvam69:
Any way to disable the notification when we unplug charger before reaching the desired %?
[Android Apps and Games] Glassed Silver:
fast charging puts a lot of wear on your battery, might as well not use this app then.
[Android Apps and Games] onolox:
The temp shown in notification is broken in v1.1.0. In the 1.0.4 is showing.

If I toggle to Fº it shows, but it don't update anymore.
[Android Apps and Games] BunkerBert:
ezz all :)

which configfile should i use for the htc u11