yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] hgmichna:
Leave a phone always connected to the charger

I hold no official function in this forum. I just write what I have found and believe to know.

There are two different kinds of phones with regard to the Battery Charge Limit app. The most common kind charges the battery and when the app kicks in, the charger is effectively cut off and the phone runs from the battery until it reaches the lower limit set in the app. Then the charger is reconnected, and thus you get charge-discharge cycles.

The other, less common kind charges up to the limit set in the app, then effectively disconnects the battery, so the phone appears to run directly from the charger. This is minimally better, but since short charge-discharge cycles at moderate voltage do not stress the battery much, it does not really matter. Both behaviors are correct. Both can greatly extend the useful life of your battery if the voltage is kept low, particularly below 3.92 V, which corresponds to 60% in typical Li-ion batteries.

What matters is the SoC (State of Charge) percentage. If you only run the phone connected to the charger, set the limit to 40% or 50% to achieve the longest lifetime of the battery. Up to 60% the battery stress is minimal.

The higher you go, the more the battery is aged. I usually charge mine to 60% when I know that I don't move around a lot. If I move around the whole day, I charge the phone to 100% in the morning or whatever I guess I can get away with. I also carry a small lipstick power pack just in case, for the really long days and for travelling.

The general rule is to keep the SoC as low as possible. I just tried to find out what happens at the very low SoC levels, like below 30%, so I asked Battery University. They forwarded my question to the CEO of Cadex Electronics Inc., a company that has lots of experience with Li-ion batteries. Here is what he said:

"Little information is available on depth-of-discharge as a function of longevity. I know of one university that is testing this but it will take years to get results."

We know that Tesla cars limit their discharging to 2% SoC. We also know that the figures we see on smartphones are unreliable. 0% may actually mean 2% or more on the battery manufacturer's scale. We cannot know.

What we do know, however, is that the lowest SoC values are not often reached during daily routines, because we don't like to run the risk of a dead phone every day, and the phones automatically kick in some extreme power saving at the low end, so this does not matter much for normal use.

It may matter for your case though. If you run the phone connected to the charger for long periods of time, the known good range is 30% to 60% with recommended long-term storage values around 40% to 50%, so stick to that.

I am writing about the low end of the charge spectrum also because we just had a discussion about the low charge values here and still have some controversy.
[Android Apps and Games] Infy_AsiX:
Are we sure they run from the charger? Sounds more suited to be charging maintaining Constant Voltage. Needs testing to be confirmed. The current should stay at 0 in a proposed disconnected state. To stay charged a maintenance charge is occurring at some point. If the BMS is not reporting a drop in percentage, how much voltage drop is sensed before requiring maintenance top up? In interest of health, how often, what charge rate and maximum constant voltage is used when topping up? You shouldn't claim one's better unless there's proof of such.

Being from the same source, Battery University you mentioned. Suggests a few times that stopping the charge for several percent and slowing the current during stage 2 is safer. Holding maintaining a higher SOC voltage is less safe. http://batteryuniversity.com/learn/...le/how_to_charge_li_ion_with_a_parasitic_load

Low voltage cut off values are used and can be found in the kernel and ROM.
[Android Apps and Games] hgmichna:
Leave a phone always connected to the charger

This is mostly irrelevant. Whether the battery is physically switched off-circuit or whether zero current in and out of the battery is achieved by other means does not matter. The effect is the same—zero battery current.

"Maintenance top-up" plays not much of a role either. Since the Battery Charge Limit app recharges the battery in most phones with the full charging current, which still hardly harms the battery at lower voltages, any maintenance top-up at a low voltage, if it occurs at all, is the least of our worries.

I don't understand what you want to say. Modern charging electronics work such that they charge with a high current at lower voltages, then charge at constant voltage or otherwise control the charging such that excessively high voltage is avoided.

The parasitic load remarks are obsolete. They refer to ancient charging situations in which the charger could not differentiate between the actual charging current that flows into the battery and the "parasitic load" of the device running and consuming current beside the battery. Modern charging electronic circuits like the ones in our smartphones differentiate between the different electric currents. There is no "parasitic load" problem any more.

Note that apps like Ampere can measure and display the current that flows into or out of the battery alone, without any "parasitic load". Any simpler method would not work well on smartphones, because their "parasitic load" can be very high and would make proper charging impossible.

I find the expression "parasitic load" funny, because that load is the one that matters most, because it powers our phones and other devices. Perhaps it should be called workload.
[Android Apps and Games] Infy_AsiX:
That's why I'm asking if zero current has been monitored? If there's been some measured proof or just some assumptions.

It's a recent article about modern issues and ongoing research. Yes the original term's meaning has changed but the article exists about the problem after all.

I haven't tried Ampere. I think it just reads the current_now file like all others? Yes, the /sys/class/power_supply/battery/current_now value is as expected. But it is in fact directly affected by usage power load and charging current. Can be tested by seeing how the flow is changed by a fast versus slow usb charger and how system load affects it too.

The /usb/current_system_max is the maximum current allowed. If it's modifiable, it can help with testing and seeing the difference.
[Android Apps and Games] roottree:
hey there! I am relatively new to tasker and doesn't understand how to do this. I want to use the broadcast message way to enable limit, but how? I know those two lines go into the send intent there. But what is the profile required to activate that task? I've tried power source set to any but it doesn't work :(

Can anyone give me instructions on how to do it? Thank you :)
[Android Apps and Games] hopelives:
Doesn't work on my Note 4 Exynos with stock-based SimplRom. I set the charge limit between 95%-50% and plugged in before sleep but when I waked up the phone was charged to 70% and even if I disabled the app, it didn't charge until I rebooted the phone.
[Android Apps and Games] jackchua65:
This program is working on XiaoMi Redmi Note 3. However, it always got kill off by the memory manager when it is running at background. How do I make it always stay in the background?
[Android Apps and Games] bombername:
Is this Nice app compatiblewith the HTC 10?

I ment any progress in this case? =)

thx.
[Android Apps and Games] guest4711:
Allow notifications to be displayed. This should help preventing that memory manager will kill it.
[Android Apps and Games] jackchua65:
I have allow it to show notification on status bar. However only when plug in power, the icon will show on. Without plug in power, it will not shown. I believe if it didn't stay on the status, it will get kill.
[Android Apps and Games] jackchua65:
Feature request : The notification icon, keep on at the status bar, either power plug on or off. So it will not get kill off by memory manager.
[Android Apps and Games] tim_h:
Hi, the app worked very well on my Oneplus 3T with stock Nougat software and setting "charging_enabled". Now I updated to the Oreo release and run into problems.

I have seen that charging cuts off at the selected percentage, so in general the mechanism still works. But then the phone behaves strange - the screen lights up shortly again and again, and at some time it seems charging just continues, because in the morning the battery was then at 100%. I have put the app into the exclusion list for battery optimization, but to no avail.

Does anybody else observe this kind of behavior?
[Android Apps and Games] hgmichna:
Rapid charge-discharge cycle

It could be the rapid charge-discharge cycle that on my OPO happens when I use a fast charger like the original one.

You could try a weaker charger, ideally one that delivers only 0.5 A. This is better for the battery anyway, because it keeps its temperature much lower. It is still plenty for overnight charging.
[Android Apps and Games] tim_h:
I do use the proprietary DASH charger, but I did so also under Nougat and everything worked correctly, so that cannot explain the issue.
[Android Apps and Games] blueberry.sky:
If you do add this, please make it optional.
[Android Apps and Games] EriksR:
My notification and notification icon is always on anyway...

That said, the only time I left charging overnight it still charged to 100%. Using batt_slate_mode as default on my d2att.

Also, it's strange that fdroid has version 1.05, but here only 1.04...
[Android Apps and Games] jmb0507:
Is the phone supposed to start draining the battery once it reaches the upper limit and start charging again at the lower limit ?

Mine effectively stops charging at the upper limit (even thought the thunderbolt icon is still active) but it doesn't seem to be discharging afterwards, it just stops there at 80%. I am afraid that it's actually charging but it doesn't show up the notification.
[Android Apps and Games] amplatfus:
Please read #1261
[Android Apps and Games] post-mortem:
Does the app work for you on d2att? The only time the app has worked on my d2att reliably is if it's charging at 500mA. When I charge with a 700mA (or more) charger, it always goes to 100%, after an indeterminate pause at my set upper limit.

And yes, I'm also waiting for 1.05 to be published here.
[Android Apps and Games] EriksR:
I will test more overnight. It works fine while I'm on the phone. But it's likely same as you. Interesting about the amperage...

I tried another app Magic Charging Switch and it was working even worse. It would stop charging, but if I just shut the screen and open again, charging would go on. Though the dev said he was looking to fix it.
[Android Apps and Games] iluvatrix:
Any reason why you guys are not updating to 1.05 from fdroid?
[Android Apps and Games] post-mortem:
Personally, I can't. In attempting to get the app to work for my device, I tried converting it to a system app. I can't upgrade to 1.05, because apparently they're signed differently. I can't convert it back to a user app, and attempts to uninstall fail. In any case, I haven't been using the app for a while, now. Instead, I've been using a different method to simply notify me when the battery hits a certain percentage, so I can manually unplug from the charger.
[Android Apps and Games] cattolicboy:
Would you kindly share this notification method?
[Android Apps and Games] EriksR:
I found it strange , not being familiar with fdroid, that version numbering is different, and size increased from 1.02MB here to 1.20MB there. This led me to conclude that Fdroid is a fake site that took an app and added some bull**** adds to it. :D

Edit: Also, my notification is no longer always on. Now turns on when phone is plugged in.

I had been using Light Flow for battery notifications, but I found it to be a burden on the phone...
[Android Apps and Games] ithehappy:
As far as I know F-Droid is pretty legit.
[Android Apps and Games] Scottay5150:
How to setup for a stock rooted Pixel XL 8.1 Oreo? Sometimes it goes over my 70% setting. Thanks in advance.
[Android Apps and Games] GryTEcHoG:
Is there a way to disable qualcomm quick change also ?
[Android Apps and Games] saenta:
Hey [emoji4]

Theme looks pretty awesome so far!

Could you maybe upload a compiled APK in your GitHub?

Thanks!

Gesendet von meinem LG-H870 mit Tapatalk
[Android Apps and Games] funm@sterz:
Guys any redmi note 3 users here?

Need a help m
[Android Apps and Games] :
I appreciate it! Unfortunately, I do not want to upload anything here because it is not official and I respect developers work. I asked them if I could and they haven't responded - it just seems they are inactive
[Android Apps and Games] TR2N:
It is on Github, so I can't see any problems if you compile an apk basing on your modifications.
[Android Apps and Games] post-mortem:
I've been using the free version of Battery Lifespan Extender. It does not require root, because it only notifies. The nice thing is that my watch vibrates, and I know I can go unplug my phone.
[Android Apps and Games] blueberry.sky:
Really glad to see work continuing! If the original devs have become inactive / otherwise occupied then what can you do but fork. Thankfully sriharshaarangi open sourced it under GPL v3.0 which allows the option.

You could perhaps upload .apk to your github and not directly link to it here. I think many people here aren't able to compile apk.
[Android Apps and Games] :
For those of you who are interested, I will touch up my local branch and build and post an apk there for people to use! But again, it is NOT official and will not handle support here. I can post other means of contact or use XDA PM.
[Android Apps and Games] Redhawk2000:
Would love to see current while charging in the notification if that was something you ever wanted to add.
[Android Apps and Games] :
I have posted an Unofficial build on my Github under the 'Local' branch found here: https://github.com/xdnax/BatteryChargeLimit/tree/local

Again, these builds are unofficial and I just change what I see fit. Feel free to follow along with the commits to see what is changed/will be changed and feel free to give me some requests - I am doing this obviously in my free time for personal reasons so if I do not see it useful, it probably won't be added.
[Android Apps and Games] iluvatrix:
installed & testing
[Android Apps and Games] Redhawk2000:
I feel like an idiot, but when I click on the link (see photo) I get the error in the second screenshot
[Android Apps and Games] EriksR:
I'm unable to change the control file, for example from batt_slate_mode to store_mode. Also other files. Is this same for everyone?
[Android Apps and Games] :
Click desktop version and look for a little download icon to download the app.
[Android Apps and Games] RedSkull23:
Thanks, I'm trying it and it works good! Nice design :)
[Android Apps and Games] Redhawk2000:
Long week. I typed the above previously but had typed "voltage" instead of "current". The above is edited as was originally intended. Would replace ampere for me.
[Android Apps and Games] Redhawk2000:
Doesn't seem to show the voltage or temperature in the notification pulldown unless I manually open the app, go into settings and tap the temperature option.
[Android Apps and Games] :
If you are talking about my build, I removed it. It really didn't make sense because phones don't charge with the same voltage or speeds from 0-100, it's staggered to preserve battery (I believe). And it didn't look like the notification updated often to reflect changes. I like the more simple and easy to use notifications, but I can always add a switch in settings if it's a huge deal.
[Android Apps and Games] Redhawk2000:
OK no worries. I like to have the temp there so I went back to the old build. Thanks for your work though :)
[Android Apps and Games] :
I will see if I can add a setting to display that. I'll get back to you.
[Android Apps and Games] dmgZero:
Soft charging/Trickle charge

Hi!

Can you please try to add "Soft charging/Trickle charge" feature to your app?:)

My topic about implementation "Soft charging/Trickle" charge on Xperia devices and other
[Android Apps and Games] :
I am no expert in this stuff nor would I be able to test... For everyone's safety I'm not going to be adding that. I wouldn't want to ruin any phones either.
[Android Apps and Games] marbertshere:
Hey, I'm not too familiar with GitHub. I click on download/clone button, and it offers a zip to download. I found an apk in the app folder, but it force closes upon opening on my Pixel 2 XL. Not sure if the device is supported or not, but I can get you a logcat if you would like.
[Android Apps and Games] magik666:
i got small issue when charging while the Phone ON, the max charging level is stop at 74% even, i set 98% in the apps. but when phone off- i can reach 100%.
[Android Apps and Games] knojap:
are you kidding? your phone is off and you are wondering about a non working app? ?
[Android Apps and Games] :
Send a log. I haven't done anything to the booting nor has anyone else said it force closes.

You also need to be rooted.
[Android Apps and Games] post-mortem:
Please clarify if you mean the phone is on or off, vs. the screen is on or off.

Also, which phone, which version of Android, etc.
[Android Apps and Games] petrich+:
Hi

Hi, guys. Been using this app for some time, got a problem with charging at the moment. When I turn off the device completely(Samsung t585) battery still drains, even to 0%, and it won't charge more than about 70%. I changed to stock rom, but this doesn't help. Is this PROBLEM related to using this application or is it a HARDWEAR issue?
[Android Apps and Games] blueberry.sky:
When a device is completely off (not just screen off) the battery should not show any noticeable drain even after days. You might have a defective / damaged battery.

If the charge state gets stuck, usually a reboot will even be enough to fix it. A full rom install will certainly restore everything back to normal, as long as you did not reinstall this Battery Charge Limit app again.
[Android Apps and Games] ACiDxCHRiST:
What information do I need to supply to get better support for the Pixel 2 XL. While Battery Charge Limit v1.0.4/v1.0.5 technically work with the Pixel 2 XL, it is not optimal. Right now the only Control File available to select is input_suspend (Xiaomi Mi6). This works but once the phone reaches the charge limit, it rapidly discharges until it drops below the lower setpoint and then charges back up to the charge limit. In a single night, I see around 10 cycles of going from 80-77-80%. This is especially weird as there is no way that the phone should be discharging that fast.

The correct Control File as far as I can tell is:

/sys/class/power_supply/parallel/charging_enabled

1 = Charging

0 = Not Charging

/sys/class/power_supply/battery/charge_disable

charge_on = 0

charge_off = 1

[MENTION=6280728]xdnax[/MENTION] would you be willing to add that Control File configuration to your forked version of Battery Charge Limit?

Or does anyone have any pointers on how I could build a version of the apk that has that Control File setup.
[Android Apps and Games] marbertshere:
I reinstalled it and it crashed the first time I opened it, but not the subsequent times. Strange.
[Android Apps and Games] hgmichna:
Stress from charging-discharging cycles?

I'll pronounce a guess at what's happening here. The only explanation I can come up with is that the percentage values are not the actual battery state of charge values. The phone's logic could easily show values that are a few percent off, possibly because the battery voltage varies as charging is switched on and off.

If I'm right, then everything is good. I would leave the settings exactly as you have them. The truth is probably that the battery SoC moves between 80% and 79%, which is good.

The advantage of several short charge episodes is that the battery does not get warm. Otherwise this does not stress the battery.
[Android Apps and Games] no_name_no:
Hi Guys,

this tool works great on my Samsung Galaxy S7 using batt_slate_mode.

In the folder sys/class/power_supply/battery i have found these two files:

fg_full_voltage (43500) -> 4.35V the maximum Voltage of my battery

charge_control_limit (0) -> somebody knows what this is?

What about limiting the Battery Charge by just not turning on/off at certain percentage points rather than setting a maximum Voltage?

Maybe this would stop charging the battery/decoupling the battery like when using the Phone with 100% and power supply.

My Problem is, i cannot change these Values and do not know what happens then.
[Android Apps and Games] :
I have actually tried to add pixel 2 xl support but have heard from a lot of my buddies (I'm getting it for Christmas) that it works fine using the pixel option config file... The problem with using input_suspend on a pixel is that it will completely stop looking at every USB input. Therefore, if the phone is plugged into the PC and hit your top threshold, the PC will no longer be able to see the phone... Last I heard, taimen worked fine using pixel config files. Once I get it for Christmas, I can add further support
[Android Apps and Games] ACiDxCHRiST:
The thing is I can't select the pixel control file. Every control file in the list is greyed out and can't be selected except for input_suspend. v1.0.4, v1.0.5, and v1.1 (xdnax) behave the same.
[Android Apps and Games] loek2014:
didn't know that was possible. Cool app. for ZTE stood up, thank you
[Android Apps and Games] hopelives:
I tried the app in the night. I never shut down the phone and I always charge at night while I sleep. I tried and in the morning charging was stopped at 70% although I set it up for %95. My phone is Note 4 with Exynos and the rom is stock 6.0.1 based SimplROM. I also use ForceDoze and Greenify. So what is the problem?
[Android Apps and Games] :
Can you confirm that there is a file called charging_enabled in /sys/class/power_supply/battery/ I believe... If it's greyed out, the file may not be being detected... Does the official app work? Afaik from my friends, it works fine for them. I haven't changed anything like that though.
[Android Apps and Games] ACiDxCHRiST:
See the attached screenshots for what the directory/files look like.

Solid Explorer is not showing the symlinked directories/files correctly. Refer to my next post for correct directory/file structure.
[Android Apps and Games] :
Hm, interesting. What version of Android are you on? Later this week I'll experiment and send you some debug apks. Something may have changed.
[Android Apps and Games] ACiDxCHRiST:
Android 8.0

OPD3.170816.023 (VZW 'Nov)

Solid Explorer is being ghey. Here are Screenshots from Root Explorer which is properly parsing the symlinks.

-Edit

I just tested

/sys/class/power_supply/battery/charge_disable

by manually editing both the Battery Charge Limit app settings XMLs in

/data/data/com.slash.batterychargelimit/shared_prefs

and it looks like this control file is a much better option than input_suspend for the Pixel 2 XL. charge_on = 0 / charge_off = 1

Battery was at 58% before plugging in

Set the limit to 60-58

Phone Rapid Charged up to 60%

Has not charged over 60%

Accubattery shows charge current is 14mA (so basically nothing)

Temp looks fine at 27.8C

Battery Icon in Status Bar shows charging

-Edit 2

So the only thing remaining for full working support is getting the Battery Stats Reset to work. Neither automatic or manual resetting of battery stats by Battery Charge Limit is working.
[Android Apps and Games] :
Well PM and we'll try to work stuff out later this week. Again I don't have taimen yet so I cannot test. If you have telegram, message me [MENTION=6280728]xdnax[/MENTION].
[Android Apps and Games] tassos_chry:
Are you perhaps rooted with Magisk?
[Android Apps and Games] ACiDxCHRiST:
Yes. v14.5
[Android Apps and Games] tassos_chry:
Refer to this post https://xdaforums.com/showpost.php?p=73742990&postcount=1071 and note that the script must be given 755 permissions after its placed on the above directory