yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] hansxl:
You could try a simple search in Google and find somethinhg like : https://xdaforums.com/apps/magisk/module-magic-charging-switch-cs-v2017-9-t3668427 :p
[Android Apps and Games] davekra:
Ah, a Magisk module. I was looking in the palystore.

Thanks.
[Android Apps and Games] redhonker:
I don't have root but have TWRP (I can root the device but then I can't use several apps). Is it possible to use it?
[Android Apps and Games] GSDer:
From the very first post: "* This app requires a rooted mobile (Android 4.0 or later)"

In short, no.

Edit: BTW it's worth noting that by using something like Magisk https://r.tapatalk.com/shareLink?ur...&share_sfid=5903&share_fid=3793&share_type=sf it may be possible to 'hide' the fact that your device is rooted from those apps that you require.
[Android Apps and Games] Zycat:
Okay so from what I've experienced so far, flashing a custom kernel (I use Blu spark) fixes this problem everytime. Might want to take a look.

This applies to OnePlus 5T only. Also I only testes with LOS ROM.
[Android Apps and Games] Zeuszoos:
Hi,

I used this on my Rooted Samsung Galaxy (SM-N910T3) Note 4 with KitKat 4.4.4 and it worked brilliantly! I loved it! :)

That phone died, but my replacement is the same phone (also Rooted), except it came with Marshmallow 6.0.1 and now the app says it is "Enabled", but it's not working.

It says it's using the "battery_slate" file, which does exist (I looked for the other files you mentioned, but they don't exist on my phone).

Also, I have MM's built-in "Doze" feature completely disabled.

Is there some common issue and fix for running it on Marshmallow that I'm missing? I would appreciate any help, because I always leave my phone charging overnight. I have a 10k battery (just like in my KK phone that the app worked with).

I did search this thread first for an MM fix, but came up empty.

Right now, it just charges right past the limit I set, although one time it did flash the message that the "charging service was disabled" (or something close to that) and briefly (a minute or two) stopped charging.

Thank You!
[Android Apps and Games] zohar_ml:
Currently I'm with codename Phoenix rom + I replaced my charger to a quick charge 2 (no dash) and using my tasker code.

Since these changes each morning the phone is charged to my set point without any problem.

In my log I don't see these hidden charges any more.

I think that replacing the charger had the biggest impact.
[Android Apps and Games] Zycat:
Well fwiw I'm not using any DASH or quick charger at all. My charger is only 1A.
[Android Apps and Games] hgmichna:
Different chargers - different results

It is peculiar that the app works better with some chargers than with others.

The failure mode I see is the 6 s charge-discharge cycle, which leads to a 100% charge.
[Android Apps and Games] k.stantschev:
White screen

White screen and not loading after starting on Le Eco x626. Any fixes?
[Android Apps and Games] post-mortem:
Do you think if it was changed to, say, 30 seconds, the problem would go away?
[Android Apps and Games] hgmichna:
6 s charge-discharge cycle

Why not 6 minutes?

I believe a primitive workaround should be possible.
[Android Apps and Games] post-mortem:
I've felt for some time that we would benefit by having the timeout period be user-selectable. There could easily be an option in the settings with a number, rather than hard-coding 6 seconds. Do you agree?
[Android Apps and Games] Crescendo Xenomorph:
There's a misaligned design in the status.

The text is overlapping.

Look at the attachment.
[Android Apps and Games] n1Bb135:
Dark mode???
[Android Apps and Games] Sudarchikov:
No one has an idea how to launch this beautiful thing on Asus Z00A?
[Android Apps and Games] Ace42:
Uh...is your phone rooted? The app works on my x727, guessing you have the Le S2/S3 (mediatek?).

That's odd, can't see the extra info on my phone. Which version are you using?

Edit: UI elements seem larger on your phone. Can you shrink text size or something similar?
[Android Apps and Games] k.stantschev:
It's an S3 (not sure about mediatek), rooted. Actually I have installed a different ROM and the about-info changed from x626 to x622 (screenshot below).
[Android Apps and Games] reylantiupliego:
where to find /sys/class/power_supply?battery

I was trying to test my compability of myphone O+ plus ultra 3.0 with the android apps battery charge limit. Please give me some directions how to do it? because there was an article stating that before rooting I can check if my smartphone is suitable on this device
[Android Apps and Games] Crescendo Xenomorph:
I use the one from PlayStore...

And my text size is set to small already, I can't read XS font size... :laugh:
[Android Apps and Games] reylantiupliego:
O+ USA ultra 3.0

This is the brand of my phone sir
[Android Apps and Games] GSDer:
Can you provide a link to that article? I haven't read every post in this thread but I don't remember seeing that.
[Android Apps and Games] Ace42:
Ah, I see! Xdnax maintained separate builds on github, which explains the different color too.

That's odd. But if it's the US variant it uses the SD652. I'm not sure why the model number changed...might be from the build prop, or if the ROM included firmware files from another S2/S3 variant. You should definitely ask the dev for that ROM.
[Android Apps and Games] sriharshaarangi:
Update to version 1.1.1

This is mainly a bug fixing update, with loads of improvements. Should reduce crashes as well.

Download link: https://www.androidfilehost.com/?fid=674106145207486851

The update will be available on Play Store soon[UPDATE: Now available]

Changelog:

Fix charging status layout issues and misc UI fixes [MENTION=6280728]xdnax[/MENTION]

Added (i) Switch to disable toasts on service changes (ii)Add switch to show temp. in notification [MENTION=6280728]xdnax[/MENTION]

Ensuring write permissions on the charging control file [MENTION=6929614]real_milux[/MENTION]

Fixed notification sound on limit reach [MENTION=6898873]sriharshaarangi[/MENTION]

Fixed a bug causing crash

Added Russian translation

Updated Bengali, German and Brazilian Portuguese translations

Added control file for Amazon Tate

Other minor fixes
[Android Apps and Games] Droid_JD:
Are there any other Pixel XL owners out there who are unable to get their phone to discharge while using this app? (while plugged in, obviously)

For instance, the control file is "battery_charging_enabled" and I have my setting set to 80/70.

I've enabled "always handle power events" and "always write ctrl file"

With that, my phone hovers at 80% charged.

Anyone have any suggestions for what I can do to get this to discharge properly?

I'm happy to upload whatever might be needed to help solve this.

thanks
[Android Apps and Games] Ms_Julia:
Translation is not complete :rolleyes:
[Android Apps and Games] sriharshaarangi:
I don't know Russian, it was given by a contributor. I haven't checked the file before updating. I will ask him if he can translate more of them. Meanwhile, if you wish to translate, you can find the relevant file here, and update it accordingly :)
[Android Apps and Games] zpower:
Great work.

Any chance to add a option to force english?

I don't to use in my native language (Portuguese)
[Android Apps and Games] sriharshaarangi:
Yeah, but it is not the top priority. Maybe you have to wait for little longer. I guess you have opened an issue on GitHub as well.
[Android Apps and Games] Ms_Julia:
Not an ideal but more understandable translation
[Android Apps and Games] sriharshaarangi:
Cool! Thank you :)
[Android Apps and Games] sriharshaarangi:
That's a good thing! There are two types of control files. (i)One completely cuts off any power transfer, discharging phone. (ii) The other tries to maintain battery charge, taking required power from connected source. It neither charges nor discharges battery, hence this is better for battery as well(If your phone has control files for both cases, you should choose this one). 'Always handle power events' should be ticked in this case.

In your case, it is the second one. Hence, there is no need to worry!
[Android Apps and Games] zpower:
https://github.com/sriharshaarangi/BatteryChargeLimit/issues/101
[Android Apps and Games] davekra:
Could someone help me with my OnePlus5.

Since upgrading to LineageOS 15.1 Android 8.1 this app, and the others like it, won't stop the charge. It will look like it's stopped but AccuBattery still shows the full 1.4amp charge current going in.

BCL will look like it stops the charge but after a few seconds the phone will start charging again.

I've also had it where it says the charge is stopped, the battery percent doesn't increase, but AccuBattery shows the current going in and the voltage increasing. Disconnect the power and the battery percentage won't change until the voltage drops to the percentage.

Ideally I'd like it to charge to the set point and stop, then If plugged in use the AC power. OR if that doesn't work, stop charging at the set point then use the battery till the low set point and recharge.

I don't leave my phone plugged in all the time and I've been using AccuBattery alarm to remind me to unplug but I'd really like to get back to having this work unattended.

The only time I have it plugged in continuously is on trips where it's plugged into the USB of my carputer.

Any help would be appreciated.

Thanks.
[Android Apps and Games] sriharshaarangi:
[MENTION=6622407]zohar_ml[/MENTION] reported same behaviour, and it happens only with dash charger. That is due to some implementation by oneplus which interferes with the app. What control file are you using? Can you try a different control file and see if it works?
[Android Apps and Games] zohar_ml:
I had the problem with one of my wall chargers (it wasn't a dash one). It didn't happened allways, but it did happen allot.

I changed to another charger (quick charge 2) over a month ago and now I don't have this problem any more.
[Android Apps and Games] Galaxea:
+1
[Android Apps and Games] Crescendo Xenomorph:
the text layout is OK now, no overlapping text anymore ^^
[Android Apps and Games] rfurb:
Charger disconnection not detected

Hello,

I am facing an annoying problem when using this app.

The app effectively limits the charge upon reaching the preset upper level. But, after disconnecting the charger for using the phone outdoor, when the charge goes below the lower preset level the phone starts switching itself to "charging" mode, even when the charger is not connected, then immediately switches back.

That switching cycle keeps repeating indefinitely every 20 seconds, generating a "beep" every time (the system sound for charger connection) which cannot be disabled and thus is very annoying.

I have already tried every possible combination from the "Advanced Settings" checkboxes but none solved this issue.

So far I have found only two ways of getting rid of this "symptom":

1- Disable the app's service and rebooting (which defeats the app's charging limiting function)

2- Setting the lower limit to anything less than the current charge level (which defeats the app's charge sustaining function).

My phone is a Samsung SM-N910F with Android 4.4.4 'stock' rooted with SuperSU, and the used control file is the "batt_slate".

I hope you can help, thanks in advance.
[Android Apps and Games] sriharshaarangi:
Lower limit should be atleast 2% less than upper limit.(78% or below if the upper limit is 80%)

I believe your lower limit is just 1% less than upper limit.

You can turn the 'Notify when limit reached' option off to disable the notification
[Android Apps and Games] Pipodi93:
Is this supposed to be happening? My phone doesn't go to sleep even with forced doze mode. I'm on OP5, tried changing ROM (always OOS-based), but same result. I think that wakelock is app-related and it's draining so much.
[Android Apps and Games] sriharshaarangi:
What're the set lower and upper thresholds?
[Android Apps and Games] Pipodi93:
Max: 80%

Min: 50%
[Android Apps and Games] sriharshaarangi:
The lower threshold should be 2-5% lower than the upper threshold. The app will be active as long as the battery level is between the threshold.

Put the lower threshold to 78%. It should solve the problem
[Android Apps and Games] Pipodi93:
I'm gonna give this app another shot, just because it's the only charge limiter that works for me! :) Thanks!
[Android Apps and Games] iluvatrix:
Yeah bcoz even if it doesn't sleep while connected to the charger & the app is active should be a non issue as long as the app does not hold the phone awake when not connected to the charger.
[Android Apps and Games] rfurb:
"False" charging when charger is not attached

Actually my lower limit is set to 77% and the upper one is set to 80%.

I have never set that "Limit reached" notification on. What I was talking about is that "double beep" sound which Samsung phones 'play' right after the charger is attached.

Altogether with that sound, the battery icon changes to its "lightning inside" version. The problem is the phone/app doing all that when the charger is NOT attached to it.

This symptom ("false" charging) begin when the charge level drops from 77% to 76%. If right at that moment I open the app and change the lower limit to, let's say, 60%, all that things stop for a while, until the charge level drops from 60% to 59% and so on, it is really annoying.
[Android Apps and Games] sriharshaarangi:
Ah! Didn't notice 'Charger not attached'. That's an issue with your ROM/device (blame OEM for this) and it's reaction to control file modification by the app. You can try alternate control files if they are present, but the app can't solve the issue with that control file.
[Android Apps and Games] davekra:
Thanks guys,

Sorry for posting and going 'off-grid'

I'm using a 2amp Samsung charger with the One+ cable on my One+5. Don't really use the Dash charger except in the car or to test a different charger with BCL. AccuBattery reports a charging current of 1.4amps with the Samsung which is a comfortable 1/2C charge rate.

I'm using 'Charging_enabled Universal' control file /sys/class/power_supply/battery/charging_enabled

Is there a list of other files to try?

Thanks.
[Android Apps and Games] rfurb:
I have tried other control files but they didn't work. So for now the workaround I am using is to disable the service when the charger is not attached and reenabling it again when I want to charge, just to use the upper limit functionality.
[Android Apps and Games] redj12:
Hi there. Thank you for the app, works great on Nexus 5x. Can someone explain me how it work ? Charger is a physical hardware so how a piece of code os supposed to stop it ? Thank you.
[Android Apps and Games] niklas389:
Charging can be stopped by software to prevent overheating for example. There is a file which is often called something like "charging_enabled" with values 0 and 1 - 0 means not charging or charging stopped and 1 means charging.
[Android Apps and Games] bikashk204:
The apps use limit 80% and full night change connected any over change problem I am facing ?
[Android Apps and Games] SonicGold:
Thanks for the tip also ! :good:
[Android Apps and Games] Mbadr3:
Please add Tasker integration by implementing profiles or add them in the app activities.
[Android Apps and Games] celoxocis:
I have been testing this app for the past week on my Lenovo P2 with latest Official LOS 14.1 with LOS addonsu but without any additional mods like xposed or magisks mods.

I went through all available control files that is available.

(see attachment). The bottom two don't work at all while the first one when reaching my threshold (75%) shortly shows discharging and simply continues to charge anyway.

Is there something I can do to make it work properly?

My settings can be seen in the attachment.
[Android Apps and Games] marceldossantos91:
Sadly not working with nokia 8 (very close to stock rom, oreo 8.1) it detects charging but doesnt stop it. With an older version it did stop it once but never again, shows service enabled, anyone have tips for me to try? Thanks

(Also please bare in mind nokia 8 have no twrp yet, only managed magisk, so im a little scared to mess with control files :P)
[Android Apps and Games] gonzo1963:
Good afternoon,

Where is the 1.1.1 version download link?

Regards.

Enviado desde mi unknown mediante Tapatalk
[Android Apps and Games] zarere:
https://xdaforums.com/showpost.php?p=76512886&postcount=1826
[Android Apps and Games] davekra:
Never got any answers here...but finally got it working.

Had problems installing the latest nightly from LineageOS and fighting mysterious power drain so I was reviewing BetterBatteryStats dumps and saw that my kernel was a Debug version.

I saw others in the Lineage thread were using the Franco kernel so I decided to give it a shot.

First thing I noticed was incredible battery saving when the phone was asleep AND BCL is now working. The charge stops where it should, AccuBattery indicates it IS discharging, and charge resumes when lower percentage is reached.
[Android Apps and Games] gonzo1963:
Good afternoon,

Thanks a lot.

Regards.

Enviado desde mi unknown mediante Tapatalk
[Android Apps and Games] GSDer:
[MENTION=225651]op[/MENTION] - can I get by with just using ADB to grant 'WRITE_SECURE_SETTINGS' permission to your app rather than having root capability?

Edit: well, that doesn't work because it's not a permission that your app requires. I guess I'm wondering if there's a way to use ADB permissions to grant the necessary access to the control files rather than requiring root (since my device doesn't support bootloader unlocking).
[Android Apps and Games] gonzo1963:
Good Morning,

Can you put it in the first post of the thread to facilitate finding it?

Thank you.

Regards
[Android Apps and Games] zarere:
I can edit only my posts my friend.Only the creator of the thread can edit the first post.
[Android Apps and Games] gonzo1963:
Good afternoon,

Sorry, I did not realize that you were not the developer of the app.

Regards

Enviado desde mi unknown mediante Tapatalk
[Android Apps and Games] mklmkl:
Permissions required but not requested?

I've stumbled across a potential issues regarding permissions "BATTERY_STATS"and "RESET_BATTERY_STATS".

Checking the BCL 1.1.1 permissions within Android Settings shows that no permissions are requested.

Checking BCL with the app "Android Permissions" shows that the permissions mentioned above are denied.

Same result when you check the system log.

Android version is AICP Nougat on a Samsung i9305.

Any solution?
[Android Apps and Games] Brisky86:
Has anyone been able to have this run on rooted Oneplus 6 for longer than 30 minutes?

I use a timer on my charger, no dash charging, and the limiter works for the full 30 minutes of charging, but when I change the setting to 3 hours it quits sometime in there and my phone charges to 100%.

I charge at night so I am not sure a logcat would be helpful by the time I take one in the morning to take one.

Thanks.
[Android Apps and Games] latino147:
Hi, just started using your app and i love it!

There is one thingie though, the icon on the statusbar looks way too much as the telegram icon.

Is there any chance that in a future version we can change the icon so i don't get the false hope of someone finally messaging me? ?
[Android Apps and Games] skyfighter:
Installed BCL v1.1.1 @ BQ Aquaris X with Stock Android 8.1.0 (FW v2.0.0), left all settings default except "Max Limit" which I lowered to 70% (-> lower threshold is automatically set to 68%). After a few nights (I always charge at night): looks like it works as expected. :) To the devs: thank you very much for this app! :good:

Now I have a question regarding the lower threshold: is it ok to set max limit = 70% and lower threshold = 50%? I want to prevent the phone from re-charging only a few percent (too frequently). (On the last pages of this thread I've read the lower threshold should be ~2-5% under the max limit. Just asking because I couldn't find a explanation for this rule...)
[Android Apps and Games] hgmichna:
Lower threshold

There are two good reasons not to set the lower threshold to 50% in your case.

1. Short top-ups, like from 68% to 70%, are actually better for the battery, because it does not get as hot as it would when charging from 50% to 70%. Li-ion accumulators do not mind high numbers of charge-discharge cycles. They only suffer from high voltage and from heat.

2. If you want and need 70%, but then find the battery at 50%, you are not getting what you want. If 50% are enough for your purposes, you might as well set the upper threshold to 50%.
[Android Apps and Games] hgmichna:
App works fine on OnePlus One with LineageOS 15.1

Just want to report this, as the first official LineageOS 15.1 (Android 8.1) nightly is now available for the OnePlus One phone.

My settings are as follows.

Limit charging to 60%. Recharge below 58%.

Control file data - /sys/class/power_supply/battery/charging_enabled, 1.0

Configurable CTRL File Data - off

Enforce Charge Limit - off

Always Handle Power Events - off

Always Write CTRL File - off
[Android Apps and Games] joyha:
Hey guys. I try to disable charging via Tasker shell:

echo 1 > /sys/module/pm8921_charger/parameters/disabled

But the file wasn't changed and charging didn't stop(I have a charger that will show red light when consuming power).

But the profile "Power AC" was indeed triggered, so I guess the file was changed for a small amout of time.

Any help?
[Android Apps and Games] post-mortem:
Just because the OS isn't charging the battery, doesn't mean that there is no draw of current from the charger. I wouldn't trust the light on the charger to determine if the app is working correctly.

Have you confirmed elsewhere that you're using the right control file?
[Android Apps and Games] joyha:
The app is working well, I just want to control the charging from Tasker to have more flexibility.

I think it's the correct control file, I get the file info from this app. The point is, the content of this file can't be changed by the "echo" command.
[Android Apps and Games] zarere:
Here are some examples with people using Tasker

https://xdaforums.com/showpost.php?p=76102724&postcount=1774

https://xdaforums.com/showpost.php?p=76349277&postcount=1797
[Android Apps and Games] joyha:
Thanks! I run the "echo" command twice and it worked!
[Android Apps and Games] lorreca:
The app works fine in Huawei P20 Pro with LOS 15.1 with the setting in the screenshot

Really thanks to devs!

https://i.imgur.com/K2iyTzU.jpg
[Android Apps and Games] amn1987:
I am trying to set the voltage_max to 4200 from the default 4400 but I am not able to do so despite trying various apps and granting root. I have changed permissions to rw-r-r. Is this correct? Redmi Note 3 running LOS 14.1.
[Android Apps and Games] Infy_AsiX:
Your device may not support the function. Firstly the charging setup needs to keep the charge percentage when battery/charging_enabled or similar is 0, rather than stop charging until a lower threshold. If it stays powered, it has the newer ability to power device only.

The permission is already writable. Being read only means the kernel doesn't accept or will generate a new value anyway.
[Android Apps and Games] amn1987:
I did some testing and it seems that after reaching the desired value the phone does indeed charge from AC. I used the phone for ~1.5 hours(data-intensive usage) and the charge % didn't budge from 40. The battery temp. also didn't change much during that time. Accubattery and DevCheck reported that the battery wasn't drawing any power. I found 2 files charging_enabled(always 1) and battery_charging _enabled the latter of which is used by BCL. While plugged in battery_charging _enabled was '0'. After removing charger it changed to '1'.

If I charge it fully IIRC I had observed 4.38V. At 80% it's around 4.32V. But later it falls to 4.14V. So will reducing the charging voltage yield any more benefits or not? Thanks.