yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] dynospectrum:
No issues here. OnePlus 7 Pro / OOS Pie
[Android Apps and Games] georgiapi:
You doubt eh? I hope you don't serve on any jury trials.
[Android Apps and Games] Jul2019:
Pocophone f1

Will this work in pocophone f1 running miui 10.2.2.0 android 9? Should i use the latest or the old first version apk?
[Android Apps and Games] palmbeach05:
Whatever happened to the days of testing things out to see what will work? I guess its so hard to install or uninstall an app?
[Android Apps and Games] sebastiandg7:
Hi, did you managed to enable this feature? (BTW, how is that feature called?)
[Android Apps and Games] post-mortem:
This "feature" depends on your kernel. It's not something you can choose to enable.

Either the app works this way, or it works that way, or it doesn't work at all. You can try another kernel or ROM, but you won't know until you try it.
[Android Apps and Games] aRnonymous:
I know it is not part of the app (which works perfectly btw) But i was wondering if there is a way to disable/enable quick charge (QC) by (other) software?

The ideal situation would be that when i connect the phone to a charger, it would ask when i am going to unplug it, and lower charging speeds based on that, or just disable QC if there is sufficient time
[Android Apps and Games] hgmichna:
Slow charger

Not a direct answer to your question, but I thought about that too and bought some extremely slow chargers (made in Thailand for or by a Chinese company, I believe) that charge only with about 250 mA. I use one of these when charging overnight.

I could find them on amazon.de, but not on amazon.co.uk or amazon.com. It seems to be very difficult even to get a charger that charges with 500 mA. All I've tried that advertise 500 mA on Amazon actually charge with more than 1 A. I am still looking for a charger or cable or adapter that signals to the phone that it is a computer USB port that can only deliver 500 mA. I am not sure how modern phones recognize this. I know how they did it 5 years ago, but things have apparently changed.
[Android Apps and Games] sandrager:
Hi All ,

FYI running this app on oneplus 6T charging to 75% using slow charger for the last month. Works perfectly. Using XXXnos XXX rom and smurf kernel. Dropping to about 35-40 once a day and charging to 75% so dod of about 30%. Plan to have the phone more than 2yrs and very happy with it.

Thanks Sand
[Android Apps and Games] sebastiandg7:
What I have in mind is that this app just enables/disables charging to keep the battery SoC in a range (78% ~ 80% by default).

If we want to have this "battery disconnection at certain percentage" feature of course the Kernel should have to play in here. But maybe hardware needs to play a role too. The board circuits should permit the direct current flow from the charger without actually using the battery. At least that's what common sense tells me.

Do you have any further idea about this? Do you know a device which can enable this without having it as a oem feature?

I didn't thought about the quick charge! Thinking of a traditional scenario without using this app, does it have the same effect as disconnecting the charger during quick charge at, for example, 65%?

[MENTION=618730]aRnonymous[/MENTION] if this app had that feature what would the correct moment to disable quick charging? 80% of the configured top charging %? Eg. If the top % is 80, quick charge should be disabled at 64%.

[MENTION=2893530]hgmichna[/MENTION] is 500 mA the ideal value for a slow charge? [MENTION=5346813]sandrager[/MENTION] what mA does your slow charger delivers?
[Android Apps and Games] hgmichna:
Slow charger

You can calculate that for yourself. Example: If you have a 4,000 mAh battery, then a 500 mA charger would charge it from entirely empty (0%) to completely full (100%) in 8 h.

Assuming that you sleep for 8 hours, 500 mA is more than you need, because your battery will usually not be completely empty in the evening, and you don't want it to be completely full in the morning.

On the other hand, 500 mA certainly wears out the battery less than a quick charger. But then, again, you will probably not find a charger that really charges only with 500 mA. I cannot find any.
[Android Apps and Games] sebastiandg7:
Correct me if my analysis is wrong, but according to this you get more of your battery by not setting this 80% (this app default setting) limit when charging your battery.

[IMG="Battery analysis"]https://i.imgur.com/KiIUVhq.png[/IMG]

I was based with the data of this capacity retention depreciation graphic.

[IMG="Capacity retention depreciation"]https://www.batteryuniversity.com/_img/content/DST-cycles-web2.jpg[/IMG]

(Tooked from https://batteryuniversity.com/index.php/learn/article/how_to_prolong_lithium_based_batteries)

EDIT:

The example was made with a 3700 mA battery.
[Android Apps and Games] post-mortem:
You need to clarify what "battery used per cycle" means.

Also, you'll notice in the graph you posted that the best outcome (the highest line) is with the shallowest depth of charge/discharge (i.e., 75%-65%). Deep cycling decreases battery longevity. Deep cycling is the same as greater change in voltage (percentage).
[Android Apps and Games] sebastiandg7:
What I mean by the used capacity per cycle is the amount of battery capacity the phone has available to consume in one cycle.

I used 2 common cases I have found. My conclusion is:

N mA = your battery total capacity.

After 3000 cycles (4.1 years of 2 cycles a day, if you can live with that).

Case 1:

Battery cycle: 25%-80%

Percentage used in each cycle: 80% - 25% = 55%

Battery capacity retention: 87%

Usable capacity per cycle: (0.55)(0.87N) = 0.4785N

Capacity in remaining 25% = (0.25)(0.87N) = 0.2175N

Case 2:

Battery cycle: 25%-100%

Percentage used in each cycle: 100% - 25% = 75%

Battery capacity retention: 82%

Usable capacity per cycle: (0.75)(0.82N) = 0.615N

Capacity in remaining 25% = (0.25)(0.82N) = 0.205N

It's simple math. In case 1 you will end up using 47.85% of your initial battery capacity in each cycle (charge). In case 2 you will use 61.5%.

61.5% < 47.85%

If we add the capacity in the remaining 25%.

61.5% + 20.5% > 47.85% + 21.75%

82% > 69.6%

Case 1 result:

Your phone will have 47.85% (+ 21.75% backup) of your initial battery capacity available to consume in each charge.

Case 2 result:

Your phone will have 61.5% (+ 20.5% backup) of your initial battery capacity available to consume in each charge.

Yes, the 65%-75% cycle will give you the best battery health over time, I'm not saying the opposite. Case 2 against case 1 will give you a healthier battery. BUT, what is your purpose at the end? Taking the most out of what your battery can give you as long in time as you can.

So the best battery longevity scenario is were your get the higher capacity by the passing of time, even if that means a more deteriorated battery.

PD.

I didn't take into account an important variable. I supposed 2 cycles per day usage during 4.1 years (that is 3000 cycles). However, the smaller the cycle range, the less battery capacity available, the more cycles needed in an amount of time, the faster you reach the 3000 cycles... I think you get the idea.

PD 2.

Very simplified analogy: what's the point of having a super car which you will only drive it at 150 km/h when you can take the **** out of a regular car at 200km/h?

Super car: healthy battery used in 25%-80%: 47.85% capacity used.

Regular car: non healthy battery used in 25%-100%: 61.5% capacity used.

You could answer: "Well, I could speed up my super car whenever I want and go beyond 200 km/h". You're right! In our battery example you will use 65.25% of your initial capacity, just 3.75% more than who has been usually using 13.65% more battery compared to you.
[Android Apps and Games] aRnonymous:
So what you suggest is lets call it option a, i.e. fixed charge speed percentage.

Like mentioned above option b can be that depending on how much time is available to charge (set in advance) the app will calculate how many hours of QC to use.

I would imagine i plug in the phone, and it gives me a question when am i going to unplug (or based on time of day/night) after 10 seconds the question defaults to QC. But of i tell it i have 8 hours. It will just do the limited charge cycle (up to 80%) and also at a slower charge speed without QC, but only if enough time is available.
[Android Apps and Games] sebastiandg7:
There are two topics in discussion. First, how much to charge the battery. Second, the quick charge usage. For the first one, I'm suggesting to go straight for the 25%-100% cycle, you will end getting more benefit from your battery despite it's being more deteriorated.

About the QC, supposing you are always going to charge to 100%, the best option seems to be what you say: an app that ask you how much time do you have planned to let your device charge (or it could also take into account the time of the day, you could set up your sleep time, create a wake up alarm in the app so it knows how much time does it have, etc) and given that it can device how much current will flow in that charging process. That will help to take care of the battery and you are also getting a good amount of benefit from it.
[Android Apps and Games] post-mortem:
It all depends on what you want out of your battery. If you want to get the most power out of your battery, then charge it fully, and use it until you reach 0%. In that case, you don't need this app; just do what everyone else does.

If you want your battery to last as long as possible before needing to be replaced, then what you really want is to minimize wear and tear on the battery. This app is useful for that scenario. Decrease temperature extremes, decrease voltage extremes (high/low charge percentage), decrease rate of voltage change (you should charge & discharge slowly).

If you plan on replacing your phone in 1 or 2 years, then you probably don't care if the battery deteriorates, and you are in the first camp. I used a Samsung Galaxy S3 for 6 years on the original battery, until I finally replaced it with another device. For me, longevity is important. If, like me, you are in the second camp, you may find this app helpful.

:good:
[Android Apps and Games] Sedhadi:
The app used to work on my Xperia Z5 (7.1.1 - stock ROM - Magisk).

But it's been a while that it doesn't stop charging on the preset percentage every now and then. What can be causing the issue?
[Android Apps and Games] hgmichna:
Does not stop charging

Some versions of Android kill background apps.

When your phone does not stop charging beyond the set state of charge, check whether the app is actually running.
[Android Apps and Games] Sedhadi:
I noticed the app wasn't running but I don't know why. It's neither in battery optimization nor Greenify hibernation list.

I'm using below macro as a workaround for this issue. (Fortunately, Macrodroid doesn't get killed!)
[Android Apps and Games] fassal:
BUG report "not stopping charging"

I noticed that while on an USB powered connection (Laptop) on an S4 mini the app works flawlessly. But as soon as I charge the phone with an adapter (electricity net) the app tries to disable charging but somehow fails to do so. Maybe the charging current is too high (makes no sense to me though).
[Android Apps and Games] Tencloudy:
thank you for making this app!

thank you for making this app!
[Android Apps and Games] JochenP:
great app - works on HTC U11 Venom Rom (charging_enabled universal and last 3 settings active)
[Android Apps and Games] rybshik:
"voltage_max" vs "voltage_max_design"

Works well on my Samsung Galaxy S7 Nougat rooted with SuperSU, with both wired and wireless chargers.

On Moto G6 Oreo rooted with Magisk, works only with Control File "charging_enabled".

On Oreo, in Battery Optimization settings, is it necessary to set BatteryChargeLimit as "Not optimized " ?

On Moto G6, I have 3 files, which contain the followings settings:

/sys/class/power_supply/battery/voltage_max 4400
/sys/class/power_supply/battery/voltage_max_design 4400000
/sys/class/power_supply/battery/voltage_now 4033637

I am wondering about "voltage_max" vs "voltage_max_design". Which one does actually set the charging voltage?

"voltage_max_design" appears to be read-only, while "voltage_max" can be overwritten

I have another question, not related to charge limit.

I would like to see discharge current in "mA" when the screen is off.

Let' say, I am listening music or running any sound/voice app, which does not need a screen. So the screen goes off (black).

How to achieve that?
[Android Apps and Games] reaverclan:
Stupid question time. On tab s4 when it runs says will stop at 80% like I set. But I also have it set to charge at below 53% so if it's at 65% and you plug it in should it not charge till it sees its below this? It's just charging and saying it will stop at 80%.

Malcolm
[Android Apps and Games] post-mortem:
If the app is working properly, it shouldn't charge until it drops to 52%.
[Android Apps and Games] reaverclan:
Charged to 80, it stayed, and now if you unplug and plug it in it won't charge, I'm gonna use it till 50 and see what happens. The notification is still there stating the threshold but if says if unplugged disable service so should it still be up there or only show up when plugged in? Either way it appears to be working. Next question if I reboot on next plug in will it auto launch the service?

Thanks.

Malcolm
[Android Apps and Games] post-mortem:
Yes, it should auto-launch on reboot.

To make testing easier, raise your lower charge limit for now. Make it 77-80% and watch it start and stop charging.
[Android Apps and Games] reaverclan:
Seems good, I guess it has go to the limit to restart the Guage each time you change a setting.

Malcolm
[Android Apps and Games] Zaxx32:
Feature Req./Question: I have an unrooted Moto G5 Plus on stock Oreo.

Does your app have any settings for non-rooted phones? With ADB maybe?

I'd be content with just a simple sound being played at 80% or 90%. I've found a dozen non-root/non-adb apps that will play the notif. sound of your choice...at 100% charge ONLY! None have option to change trigger %. Seems it'd be easy to code...but maybe not. Not even with ADB. or so it seems.

Tia for your time...

Edit: Took another look and found one with adj. level notif.! Lol...
[Android Apps and Games] rybshik:
I just checked Moto G6 Plus XT1926-7 with stock Pie rooted with Magisk.

It works well with the "battery_charging_enabled" profile.

When charging reaches the set limit, it then keeps showing Status "Charging and ma flow: +3mA.

Which I think is almost perfect. Battery is not discharging and +3mA is not that much (close to zero). It may be not a good idea to leave charging by 3mA for a week, but for a night is ok

UPDATE: I left the phone charging for 12 hours with the upper limit set to 80% and lower limit set to 70%. After 12 hrs, the battery was 78%, Status "Charging and ma flow: +1mA.

The battery history showed that the device quickly went from 80% to 78% , and then was staying at 78% for the rest of the time (with the upper limit 80% and lower limit 70%).

Then, I reconnected the charger and the device started rapidly charging from 78% to 80%

It would be helpful if an app records and ads up battery's incoming current flow (when battery is being charged) and, separately, battery's discharging current flow. So, over a period of time, we will get two numbers: battery incoming charge,say, 1500mA*h and battery discharge, say, -500mA*h.

Is such battery statistics available? How to get it?
[Android Apps and Games] Fujyoshi:
You can use FK Kernel Manager in the Play Store.
[Android Apps and Games] rybshik:
In the picture, it shows electric current, but I need electric charge (and discharge) over a period of time
[Android Apps and Games] hgmichna:
Charge-discharge log - AccuBattery app

The app "AccuBattery" does that, Check its History panel.
[Android Apps and Games] Fujyoshi:
Yep !
[Android Apps and Games] rybshik:
When BatteryChargeLimit runs, battery might be (rapidly) oscillating between the limits , so it's important to measure discharge. Not sure if the hardware even provides such measurements

BTW, does the Pro version of AccuBattery have any advantages over the free version as far as our needs for current and charge measurements?
[Android Apps and Games] Fujyoshi:
Not so much, just some cosmetic features and overlay options you can enable via root (sorry to spam the thread with screenshots).
[Android Apps and Games] JochenP:
" Starting Activity com.slash.batterychargelimit.IntentHandleActivity with a SEND intent, using mime type "text/x-battery-limit" and supplying the percentage as String with Intent extra "android.intent.extra.TEXT" (Intent.EXTRA_TEXT)

Using an Intent to Broadcast a message of type "com.slash.batterychargelimit.CHANGE_LIMIT", again with the percentage in Intent extra "android.intent.extra.TEXT" (Intent.EXTRA_TEXT)"

Can someone help me with tasker send intent to get this working please? I have tried much but now i'm resignating. App is working great as standalone but i want to start service if a special app is starting (trigger should stop charging ) and if special app stopps, values for BatteryChargeLimit should restored (for example (90% / 75%).

Great would be an tasker send intent example with real numerical values.

Thanks in advance
[Android Apps and Games] amn1987:
Have you tried the per app CPU usage in Accubattery Pro? I remounted /proc with hidepid option disabled as mentioned but only Accubattery's own CPU usage is shown. Setting SELinux to permissive didn't allow access to other apps usage either.
[Android Apps and Games] JochenP:
tasker send intent

okay: try and error and hints in Post #519 were helpful to send intent and set values in Battery Charge Limit

Also helpful to take a look into AndroidManifest.xml of this app (contains receiver of possible actions).

Thanks again for this great app (because no proper Root for tasker on M5 to edit value in enable_charger file directliy)
[Android Apps and Games] magarto:
Did you manage to use adb commands to grant permission to use your app?
[Android Apps and Games] CarloHD:
There Is a way to activate / deactivate the app from Tasker?
[Android Apps and Games] JochenP:
Yes. Use search (hint: 2 posts before...)

Sent from HTC U11
[Android Apps and Games] rybshik:
Failed to stop at 80%, for the 1st time

I have been continuously using the app for 2-3 weeks on Moto G6 plus.

The app has been constantly running ON, with upper limit 80% and lower limit 70%

The app has been working very well except the last night incident.

Last night, for the first time, it failed to stop charging at 80% and the phone was charged to 100%.

The interesting fact is that in Accubattery History there is no record of charging period to 100%

As if the phone was not aware of it.

My explanation is that such behavior was caused by the fact that I connected the phone to the charger during phone reboot.

BTW, I reboot the phone from time to time, but last night was the 1st time when I connected charger during reboot.

Could it be just coincidence?
[Android Apps and Games] post-mortem:
You are correct. The app should be launched when the device is put into charging state. Alternatively, you could wait for the boot to finish, then use the notification to disable then enable the app. It will then continue to work as expected.
[Android Apps and Games] onolox:
Just for people to know, the github has updates, but there is not a new released apk.

Then people that wants new features and bug fixes compile from the github.
[Android Apps and Games] Tuxshine:
Deleted
[Android Apps and Games] Tuxshine:
On LineageOS 16, Android 9, I cannot disable the notification of this app. There is still appearing an error message.

Reinstallations didn't improve the situation.

Any helpful ideas?
[Android Apps and Games] Apex Predator:
At bottom left of notification draw click manage notifications, scroll down to battery charge limit and untick show notifications.
[Android Apps and Games] Tuxshine:
Nice. I found the setting in the general notification menue and unticked as described.

Thanks a lot :good:
[Android Apps and Games] tomlbr:
Thank you for this very usefull app !
[Android Apps and Games] Vovodroid:
Hi,

I flushed Resurrection Remix Marshmallow 5.7.4 on Galaxy S3 I9300, but install of Battery Charge Limit causes to Play Store app crash and then phone enters to endless reboot loop - it goes to starting apps and reboot again.

The only way to break this is to boot to safe mode and remove Battery Charge Limit.

It worked excellent on stock 4.3 and even on RR Nougat, and I would be like to use it now.

I'm ready to fully participate with problem solving - logs, debug, whatever needed. In the past we already solved some problem in such way.

Thanks.
[Android Apps and Games] post-mortem:
It's probably a kernel incompatibility. Try flashing a different kernel first, then rebooting and installing BCL.
[Android Apps and Games] Vovodroid:
Anyway it's strange how BCL could crash even without root granted.

What kernel would you recommend for this ROM/device?

Thanks
[Android Apps and Games] Vovodroid:
I flushed boeffla-kernel-5.3-CM13.0-i9300-UNOFFICIAL.recovery.zip, version 3.0.101-CM, the same crash and reboot.
[Android Apps and Games] post-mortem:
The kernel incompatibility was just a guess. I think now we need better data. Get a logcat to find out what exactly is happening.
[Android Apps and Games] Vovodroid:
How exactly can I collect log (including last line before crash)?

Actually I guess it's more custom ROM (or general Marshmallow) problem, because it must not crash anyway, taking into account that BCL even doesn't ask for root permission. But it would be great to make BCL compatible.
[Android Apps and Games] WillLeung:
Good job! Wish I find this tool years earlier! I would suggest changing notification icon to a meaningful one, if I should be any criticizing
[Android Apps and Games] who ah way:
First off, thank you for this superb utility, which installed perfectly (OnePlus 7, not Pro, root with Magisk).

I have two questions. I'm sure have been answered before… But I hope one of you will empathize with my anxiety at the idea of reading the previous 236 pages of posts to find the answer. ;)

1. What is a recommended range these days (OnePlus 7 phone)? The default is 80-78, does that make sense for this device, or do you guys use a higher threshold, and perhaps a wider range (e.g. 90-80)?

2. Anything I should be aware about using this on OnePlus 7? The top post says "Check that the control file you selected is NOT battery_charging_enabled". It looks like the file is actually /sys/class/power_supply/battery/charging_enabled, I'm assuming that's okay?
[Android Apps and Games] Vovodroid:
In general for all lithium batteries lower charge and narrower range provide more battery life.