yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] mnz2000:
Try changing the control file in Settings. My Moto Z also kept at the max limit all the time with the default battery_charging_enabled file. Changing to charging_enabled made min/max limits work as expected.
[Android Apps and Games] xclub_101:
V1.1.0 with the right configuration seems to be working fine on Pixel2XL and is now correctly acting when the cable is unplugged at the limit.

Just a few usability observations:

- older versions would have a single click on the notification open the app, which was PERFECT; this version requires first to drag a little on the notification to expand the 2nd line of it to get two options from which only one is used in 99.99% of the time, and that is HORRIBLE, please revert to the old approach

- the usability value of the fancy icon in the notification (which is shown when charging and is also shown on the AlwaysOn display) is ZERO, please replace it with something like 65% (or 35C or 95F, but I absolutely favor the battery percentage); please use something as big as possible so it will be also visible on the AlwaysOn display

- the main dialog is not very nice-looking when LARGE fonts are used are very easy to disturb by accident since accessing the bottom stuff requires scrolling.
[Android Apps and Games] hgmichna:
Notification options

Which option is used 99.99% of the time? I sometimes use the first option, to disable the charge limiter, when I need a full battery.

Note that this option, to disable charge limiting only this time, but then not again, is not available anywhere else. This is exactly what I sometimes want and need, so this option is clearly useful to me.

The other option, to open the app, makes little sense to me. I don't remember when I last used it. Why should I want to open the app? It works automatically. In those rare cases when I indeed want to open the app, I might just as well open it from its app icon.
[Android Apps and Games] xclub_101:
Given how it can take 3-4 seconds to expand the notification (sometimes more since you might need to try to frag it down a few times) and pick any option there vs 1 second to click on it + 1 second to have a button with that extra command (or any other commands that other people might want) the USABILITY optimum is pretty clear.

Yes, we might all believe our choice is the most used but that still does not matter when you can have a faster alternative for all choices.
[Android Apps and Games] hgmichna:
Notification options

I agree. There is a little concern though. It is a convention that tapping a notification opens the app.

It would be confusing if this one did something quite different without the user's knowledge, as much as we might like it.

One fair solution I could think of is to make tapping the notification open the app, but also to have a button in the app that says something like, "Continue charging to 100% once." But whether this would be much better than wat we currently have, I'm not sure. Perhaps clarity and explicitness beats saving a few seconds.
[Android Apps and Games] Aduck79:
Hi,

I just read about Asus' "AI Charge" and found this thread/app in a search for something similiar.

Asus offers a way to limit the charge to 80% but before you normally wake up (minus some time to reach 100%) it continues to charge the remaining 20%

This should be a good compromise for saving the battery and still let you have a full charge for the day.

Could this feature maybe be integrated into this app?

A simple take on this could be to have a disable schedule (by every weekday). For example if I know that my phone charges the last 20% in 45 minutes and I normally get up at 7 am, I would set the schedule for 6.15 am for my work days and in the weekend sometime later or maybe not at all (only charge to 80%).

Best regards,

Anders
[Android Apps and Games] Redhawk2000:
That's essentially what the app Battery Warner can do. It's on xda too.
[Android Apps and Games] Game-del:
Nice all works
[Android Apps and Games] hgmichna:
Reducing battery stress

While the attempt by Asus to reduce stress on the battery is laudable, we should not forget that limiting the charge generally to 80% or even lower, as the Battery Charge Limit app does, extends the overall lifetime of the battery much more.

The developers will decide whether including the Asus "AI Charge" method is worth the effort.
[Android Apps and Games] Brenneke:
Working flawlessly on my Pixel 2 XL, thank you!

---------- Post added at 02:52 PM ---------- Previous post was at 02:47 PM ----------

I am personally perplexed with this request and idea - you are using this app but would also like to charge your phone to 100%?
[Android Apps and Games] Aduck79:
I know it's a little "controversial" for this app, since it's main idea is to keep the charge between 20 and 80%. But in my world I can live with a battery that wears if it's only a little. I would like to avoid/minimize the time where my phone is charged to 100% the most of the night, but at the same time have the missing 20% to my usage for the entire day.

I hope I'm clear in my explanation :)
[Android Apps and Games] Brenneke:
Turning your phone off at night does not work for you to prevent overcharging?

Simplicity is beautiful.
[Android Apps and Games] Aduck79:
Not if I leave it in the charger (which would be requested so that I have a full charge when I wake up), that would be the same as not using an app to stop the charging at 80%. Or am I missing something?
[Android Apps and Games] Brenneke:
Nobody said that keeping your phone battery in a certain state of charge range can be accomplished without making adjustments in habits. What I like about using this app is that I can just plug in whenever and not have to worry about overcharging. My phone is always close to 75% at any given time. Unless one is using one's phone incessantly, it is always easy to plug in while doing other things, then shut down with a full battery at night.......whatever your full is. We are all different in our needs of course.
[Android Apps and Games] post-mortem:
We all know it's bad to charge a lithium battery to 100%. The question to be answered is this: Once the battery reaches 100%, how bad is it to let it stay at 100%? Is it really that much worse to let it stay at 100% for an additional 6 hours, once the damage of getting to 100% has been done?

Anyone have relevant data to share?
[Android Apps and Games] hgmichna:
Does the time of high voltage matter?

This is a very good question. I would also like to know.

From my limited knowledge I suppose that the time matters. Otherwise the Asus AI Charge method would not make any sense, but it also does not make much sense from the point of view of cell chemistry that only the process of charging stresses the battery, while staying at 100% does not. If that were so, then laptop batteries should last for a very long time if the laptop is always connected to the charger. But they don't.

Indeed a few laptop manufacturers, such as Lenovo, offer a function to keep the battery at a lower charge, like 60%, when the user selects this for an always-charging laptop.

These are all indications, but no perfect proof.
[Android Apps and Games] post-mortem:
Nothing definitive, but the only relevant point I found in the Battery University page on charging lithium batteries says:

So we should keep the battery at peak cut-off for as short a time as possible, just to minimize overcharging? What if we shut off charging and let it stay at 100%?
[Android Apps and Games] Brenneke:
Also from Battery University:

Lithium-ion suffers from stress when exposed to heat, so does keeping a cell at a high charge voltage. A battery dwelling above 30°C (86°F) is considered elevated temperature and for most Li-ion a voltage above 4.10V/cell is deemed as high voltage.
[Android Apps and Games] hgmichna:
High battery voltage

When you consider that most smartphones charge to at least 4.2 V and quite a few charge to 4.3 V, we must not be surprised that the batteries lose a good part of their original capacity in just two years.

It is a good idea to buy a new battery after a bit more than half the planned lifetime of your smartphone. Why more than half? Because the replacement batteries you buy from Amazon or eBay are of notoriously bad quality. More precisely, some are good, and many are bad or very bad, and I know of no good way to distinguish between the two.

Recommendations:

Buy a replacement battery from the smartphone's original manufacturer (rather expensive).

Buy a replacement battery of an independent battery brand, not one that pretends to be original. These are usually good.

But one very good way around all these problems is, of course, the Battery Charge Limit app. I guess at 80% 3 years are easily achievable, and at 60% 4 to 5 years are quite possible, even with the occasional full charge when needed.
[Android Apps and Games] Brenneke:
More from Battery University:

In terms of longevity, the optimal charge voltage is 3.92V/cell. Battery experts believe that this threshold eliminates all voltage-related stresses; going lower may not gain further benefits but induce other symptoms.

But.......here is what they say about what kind of batteries were used in this study:

The following tables indicate stress related capacity losses on cobalt-based lithium-ion. The voltages of lithium iron phosphate and lithium titanate are lower and do not apply to the voltage references given.

So, questions one could ask are:

1) Is this technology used in mobile batteries today?

2) How old is this study?

3) Is any of this even relevant anymore?
[Android Apps and Games] phantom146:
1.) Yes

2.) Yes

3.) Yes

The study is being updated from time to time, scroll down just before the comment page and check their article updated time stamp.
[Android Apps and Games] Infy_AsiX:
Don't know exactly how bad but think back to the standard recommendation of unplugging when full. Also to ship and store batteries at only a moderate voltage. Suppose you could think of it as a storage state, the same principles are in effect such as duration or ideal temperatures.
[Android Apps and Games] Brenneke:
Interesting stuff here related to this:

https://accubattery.zendesk.com/hc/en-us/articles/212988989?mobile_site=true
[Android Apps and Games] hgmichna:
Li-ion battery characteristics

This seems to be a very good and thoughtful article. Thanks!
[Android Apps and Games] ecsvik:
Effect of topping off your charge

"Charging is done in two parts - a current limited fast charge segment (constant current or CC in jargon), until the maximum voltage is reached. The second part holds the voltage constant (constant voltage or CV), and the speed is determined by how fast current flows into the battery, limited by the battery's chemical process. Choi 2002 shows that the constant voltage part is the most harmful to a battery, charging to 4.2V itself using constant current at 1C doesn't degrade it too badly, but by holding the battery at that voltage for an additional time causes most of the damage to the cell."

So, I have read this article, and now I think keeping constant voltage charging instead of disabling battery charge at the specified maxium level is a bug :)

Can Battery Charge Limit app let discharge battery down to minimum level?
[Android Apps and Games] hgmichna:
High battery voltage

Constant voltage charging is only harmful if the voltage is high. It does not hurt the battery below 3.9 V.

It is not the charging that stresses the battery. It is the high voltage.
[Android Apps and Games] Nightmare[ITA]:
Will this app mess with system partition in any way and possibly break OTA? I have Magisk Root

thanks
[Android Apps and Games] Brenneke:
I pass SafetyNet running this with Magisk root.
[Android Apps and Games] Breathh:
---------- Post added at 07:36 PM ---------- Previous post was at 07:34 PM ----------

[/COLOR]

Hi,

how did you get it working for HTC U11? I have a root with magisk but the charge goes up to 100% every time.

Thank you
[Android Apps and Games] arses:
Yes it's working fine but Not on 98%.

I put it on 97% and works good.

[emoji4]
[Android Apps and Games] freakerload:
What is the best settings now. Not under 50% and to 85% for a long life?
[Android Apps and Games] post-mortem:
20-80% is generally considered to be the best compromise between battery longevity & daily capacity. If you're willing to deal with a narrower range, I would lower the upper limit to reduce the upper voltage. In other words, instead of 50-85%, do 20-55%.
[Android Apps and Games] GalaxyS3only:
trying this on my galaxy S3

i got the Anker-battery with 2200mAh which is 10% bigger than original batterycapacity.

Does the App really use the given percentage of battery, or is it based on standard specs for each phone?

Should i stay @ 80% limit or can I upper it to 90%, cause i got bigger battery?

greetz
[Android Apps and Games] post-mortem:
The operating system (Android) will tell you what percentage your battery is at by detecting the voltage your battery is putting out. While charging, your battery's voltage will increase slightly more slowly than a normal battery, because it has a higher capacity. So, 90% on your battery will be about the same voltage as 90% on my battery.

tl;dr: keep it at 80%. You'll have 10% more capacity than the stock battery on my SGS3 (actually more, since my battery is 5 years old).
[Android Apps and Games] Brenneke:
I think this stuff is more important for those of us with phones where it is more difficult and costly to replace the battery. Realistically speaking, this will likely be the last battery your S3 will ever see anyway.

I also think this it is better to let the standing voltage of the battery (after charging) be your guide, not the percentage - go with what you are comfortable with (voltage-wise) after you have done your research. I hold mine to 4V and lower - this is 68% max on my Pixel 2 XL. Voltage will always be a little higher when charging.

I have set to 68/66% for two reasons - if I am ever in a situation where I leave my phone plugged in for an extended period, it will always be close to my full charge when I unplug and go. The 2% spread is enough to prevent it from always charging. Also, if 10% down, I can always just plug in wherever for a quick top-up and it will charge. If lower limit is set too low (e.g. 20%) then you cannot do a quick top-up without fiddling.

I was honestly very skeptical as to whether this charge regime was going to work for me. I decided to try and can say that I now prefer it. Very few of us never have the opportunity at some point in our day to plug in here and there. (car, office, home etc.) When doing it this way, it takes almost no time to get back to your max when you do plug in for a top-up. Obviously you will have to wait longer to get to your max charge when you cycle your battery down farther, is that convenient?

It does take an adjustment in thinking and habits!
[Android Apps and Games] westhaking:
Has anyone successfully used Tasker to change the charging limit set by this app? I'm not the best with Tasker but I've tried all sorts of combinations to get it to work and nothing does.
[Android Apps and Games] Nordithen:
Voltage control

This is a very useful app. Thanks guys! One suggestion I have is to add a feature where the battery can be set to be held within a certain voltage range, as opposed to a certain percentage range.
[Android Apps and Games] Infy_AsiX:
I've already mentioned it's possible on a device where charging is able to stop and hold a limit by powering through charger mostly. By modifying /sys/class/power_supply/battery/voltage_max the charging profile is limited to that voltage providing improved cycle life too. This edit remains until the device is reset, once again Tasker can be used to automate with root. I know this works on my Axon 7 and by looking at Pixel's files I think they could too. Though no one with a Pixel has reported trying. Seems the main dev has abandoned while users expect the best features to be readily available but don't investigate themselves.

Some of the manufacturers use this already, like Sony I know had at least on the Z3 series after a firmware change (even though that device charging could only stop and not power on charger only and not modifiable using root). I've seen mentioned apparently the GS8 limits to 4.25V.
[Android Apps and Games] junkisz007:
will try this :D
[Android Apps and Games] Nordithen:
I have a OnePlus 5T, so yeah, I'd probably have to try it myself to know if it works. Oddly, the sys/class/power_supply/battery/voltage_max file has a value of -22.
[Android Apps and Games] tassos_chry:
I have a OnePlus 5T also. Please let me know if you find something..
[Android Apps and Games] Squabl:
I have the same - 22 value on my Oneplus 5t as well. If someone figures out how to get it work I would be very interested to know the values.
[Android Apps and Games] Infy_AsiX:
I think I've seen -22 appear in root files as being invalid or something of the like. A kernel dev or Linux expert could probably explain more.
[Android Apps and Games] westhaking:
Figured it out and posting the solution here for others that may want to use tasker to control the service. Change the 75 to whatever you want the upper cutoff limit to be. Changing it to 100 disables the service completely.
[Android Apps and Games] dape16:
I have a HTC Nexus 9 running Lineage OS 14.1. The Battery Charge Limit app does not work with the pre-configured control file. I have found the "charging_state" file at the following location:

/sys/devices/platform/tegra12-i2c.0/i2c-0/0-006b/charging_state

I have tried to manually change from enabled to disabled while connected to a charger, but it has no effect.

Anyone have ideas what to check next? Is there other files that can control the charging?

Thanks.
[Android Apps and Games] LightC:
Lenovo Yoga Book Android

Hi All,

I want support for the Lenovo Yoga Book (YB1-X90F) to be added to this app. I found the necessary files on my rooted Yoga Book but I'm having trouble getting my test edits to the files to stick. Any idea what I could be doing wrong?

The files are located here on this device:

/sys/class/power_supply/usb-main/enable_charging

/sys/class/power_supply/usb-main/enable_charger

I chmoded both files and was able to echo 0 to each file but when I echo the file again, it seems to still show 1 despite the echo command completing successfully.

Screenshots below:

https://imgur.com/a/JAneX

https://imgur.com/a/YKwY6

Thanks in advance for any help.

LightC
[Android Apps and Games] cattolicboy:
What would be the benefit to change the charging limit with tasker instead of the app? In which ideal scenario it would be applied?
[Android Apps and Games] westhaking:
For me, I like starting my day with my battery sitting at a full charge since I don't always have immediate access to my charger throughout the day. All other times I keep the limits between 75 and 65 percent. So I have tasker change the upper charging limit to 99% thirty minutes before my alarm goes off then change it back to 75% when I unplug it from the charger. This workflow works best for my needs.
[Android Apps and Games] vndnguyen:
Nice app, but my phone has not rooted :(
[Android Apps and Games] underskyzx:
I have a Redmi 4x don't understand enough English to read technical article, what I got is that battery should be always between 40 and 80% is that right?
[Android Apps and Games] Galaxea:
App worked perfectly on OP3 but not on OP5T. I have tried all the options in the app.

Any suggestions please?
[Android Apps and Games] danhii:
It works for me on OP5T
[Android Apps and Games] zer0xploit:
Most of the time battery saving features like doze/aggressive doze or apps like Brevent/Greenify/Naptime hinder this app to do it's magic properly... At least for me this was the problem more than once :) next possible solution might be playing a little with the settings like control file, force mode, etc might help - if all this does not help than maybe backup your complete system via TWRP and try a clean flash afterwards just to try if some settings on your and are causing the occuring issues.. After I have all these steps, I could always find the solution as of yet why some precious Oneplus device did not let this app work absolutely fantastic - - just forgot to mention the obligatory reboot, reinstall, clean cache + dalvik which you could probably even try before other steps to provide a working solution + if you are using Magisk do try core only mode as well to see if some of your modules might interfere with battery charge limiter - hope this helps you by any means :)
[Android Apps and Games] Diljinder:
If you have Oneplus One, then install version 0.3 & DON'T update the app. It works perfectly well. I made the mistake of keep on updating the app thinking it'll improve the app & add more features.

Well, the later versions had more features, but the main feature stopped working. The phone will keep on charging & discharging every few seconds & eventually battery would be fully charged to 100% overnight.

My assessment is that since the dev [MENTION=6898873]sriharshaarangi[/MENTION] added the feature of "setting a custom limit below which battery will start charging again" from version 0.5 onwards , it messed up the app, at least for this device. Even if you don't change that stock value, it still won't work.

Link to the version 0.3 - https://androidfilehost.com/?fid=745425885120716170
[Android Apps and Games] wivern:
Is somewhere, a list of supported devices?

or otherwise

Work this apps on Samsung Galaxy S4 i9506 and Samsung Galaxy TAB 4 10.1 ?
[Android Apps and Games] guest4711:
It depends on the kernels used. While it may work with LOS it my fail with stock kernel and vice versa.

Best to try it yourself. It does not harm to install and test it. If you aren't satisfied you may uninstall it...
[Android Apps and Games] Galaxea:
YES! It was being hibernated so now it is working. Thanks.
[Android Apps and Games] beeshyams:
Noob doubt

OP,

Firstly Thanks for this app ! Excellent:)

I have MiA1 with Magisk systemless . Since I get monthly updates, would like that to continue without writing to system and preventing updates

> Q) How does this app work? Does it modify something in the ROM/Kernel to stop charging?

> A) It writes "0" or "1" to a control file that represents some state of the power supply hardware, as simple as that. The file is normally read-only, so you need root to overwrite it.

The change might be automatically reversed by the OS if the power supply situation changes. Anyway, it should never survive a reboot of the device.

From this, I understand that this app writes to system and therefore my monthly updates will fail since system is altered

Is my understanding correct? ( I have already installed this to test since the equivalent Magisk Module doesn't work on my device, so the damage may have been done !!!)
[Android Apps and Games] Skull97:
Nope, even without the app, plug and unplug your phone will still change the control file anyway :D, so go ahead and use it.
[Android Apps and Games] beeshyams:
[MENTION=7248227]Skull97[/MENTION]

:) That's a relief but I have a nagging doubt.

Understand what you say about the file value being changed when cable is plugged or unplugged but my concern is around the fact that we are using root powers to force it so wondering if it amounts to making the system tampered

Being overcautious as I don't understand these things much :)

Edit: Aren't we making the system writeable in this case?
[Android Apps and Games] lklaus:
It's not writing to a file in /system, but in/sys. This is not a standard file system on flash but a pseudo filesystem representing the state of the kennel. That's why it's volatile and does not survive a reboot (except for default values...)
[Android Apps and Games] beeshyams:
Thanks a lot. That makes sense and well explained
[Android Apps and Games] noranyan:
Thanks the dev for this amazing app. :good::good:

Working flawlessly on Pixel 2 XL.
[Android Apps and Games] Mrxyzl:
For anyone using this app on U11 oreo, try changing the control file to /sys/devices/soc/800f000.qcom,spmi/spmi-0/spmi0-02/800f000.qcom,spmi:qcom,pmi8998@2:qcom,qpnp-smb2/power_supply/battery/input_suspend, change 0 to charge and 1 to stop