yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] real_milux:
This could be true, every ROM can change the internals that we are relying on - freely. The more different the ROM is from AOSP, the smaller the chances that it works. Are any of the supported 4 control files present, or is the new version terminating immediately?
[Android Apps and Games] Freezy202:
The generic one is present and the app is terminating it correctly. I was told to try it manually with a root browser, but everytime I try to change the file I get an error or the file contains numbers like 1 or 2 regardless of charging or changing.

My HTC m8 thinks it's a special snowflake haha.
[Android Apps and Games] DainnCrowley:
So far so good on my Mi Mix. All app functions are working as designed and the I'm loving the addition of that recharge slider. Keep up the great work.
[Android Apps and Games] real_milux:
Maybe the file is read only for your ROM. Could be that the hardware doesn't support the power cut by software. Otherwise a different ROM/kernel *might* help.

Is any other file present, except the generic one?
[Android Apps and Games] Freezy202:
I have already tried everything. New rom, kernel. It doesn't work.

I have to accept the fact, that htc won't work.

There are some other files but same result: can't edit / error.

Maybe I have to modify the permission of the file?
[Android Apps and Games] nik80:
Im still not able to locate control file on my device (cubot cheetah 2 android 6.0 mcu MT6753 - any suggestions are welcome)

so in the past few days I stop the charging manually, but I notice strange behaviour - the battery percent keep droping compared to voltage

for example

- initialy the phone charge up to 4.2 volts was around 80% and discharged to 15% the battery was arounr 3.7 volts

after few days charging to 80% and discharging to 15% including several short charges while I transfer something with usb cable

- now the phone charge to 4.2 volts around 65% and discharged to 1% and still 3.7 volts and keep going for a long time without percent drop and voltage almost the same for hours

Im reading that the percentage is calculated by coloumb counter, but it look like it is not working properly when the phone is not fully charged/discharged. probably because now Im using the batter in the most efficiend range, and the counted energy in/energy out is not as the counter expect in the full charge range

this is what I think happen - for the full battery charge on 1Ah battery for example 80% efficiency, it is required 1.2*battery capacity (Ah) to charge

but for 80% charge the battery have 90% efficiency and the required charge is only 1.1 times the capacity, but the counter still expect 1.2 and think that it is less charged than it actually is, and therefore the error build up over time and percents keep droping

anyone else noticed similar behaviour? deleting batterystats.bin didnt help at all

is there any tweaks for this counter? I couldnt find anything on internet
[Android Apps and Games] Nitrooo84:
Can you make it compatible with Nexus 4?

It is controlled by /sys/module/pm8921_charger/parameters/disabled on that device (0 is charging, 1 is not).

Thanks
[Android Apps and Games] buriimishka:
Unfortunately, this release stopped working. The application closes with a message stating that the device is not yet supported. But after all version 0.3 worked (albeit with reservations. Did not detect wireless charging. ). Installed while the old version.

[IMG="charging_enabled files exist"]http://pp.userapi.com/c639920/v639920570/1af11/c8ur4LSxeaY.jpg[/IMG]

tested on yotaphone 2
[Android Apps and Games] sriharshaarangi:
Thanks for the feedback, we will have a look at it
[Android Apps and Games] sriharshaarangi:
Sure, in the next release
[Android Apps and Games] sriharshaarangi:
Can you check for any of the files mentioned in the app in the /sys/class/power_supply/battery folder, or can you find a file in the folder which can control the charging?
[Android Apps and Games] blueberry.sky:
Could you also add support for Amazon Fire tablets? The file used is /sys/class/power_supply/battery/device/Charging_Enable (1 = charging enabled, 0 = disabled). Tested on Fire 7 (5th Gen 2015), model number KFFOWI

~edit~

While that file works fine, the true file appears to be at /sys/devices/platform/battery/Charging_Enable
[Android Apps and Games] nik80:
just found something different for disabling charger

which I do have on my phone, unfortunately it doesnt work :(

from shell: setprop persist.usb.chgdisabled 1

I do have this property, and it is setting 1 properly, but the charging continue :(

also found that when the phone is off the charger is executable file located in /system/bin/kpoc_charger

which is called by start/stop kpoc_charger

it look like these are common on mediatec devices

also got some other shell lines in init.mt6735.rc

service kpoc_charger /system/bin/kpoc_charger

class charger

init.rc :

on charger

class_start charger

Im not good in linux, can anyone recognize something usefull to disable the charger?
[Android Apps and Games] ash001:
I do t have charging_enabled file but instead these are the files i have..
[Android Apps and Games] real_milux:
I don't see anything useful there, what's in the device folder that's located in there?

---------- Post added at 06:53 AM ---------- Previous post was at 06:34 AM ----------

Interesting... Could you maybe provide the access permissions of the file?

The new version tries to observe the files by creating a java.io.File instance and calling exists(). Would be interesting to know how/why this approach fails when the file is clearly present...
[Android Apps and Games] blueberry.sky:
I should have mentioned that while /sys/class/power_supply/battery/device/Charging_Enable works fine, the true file appears to be at /sys/devices/platform/battery/Charging_Enable , on the Fire 7 at least.
[Android Apps and Games] buriimishka:
Of course, I hope this will be enough
[Android Apps and Games] ash001:
Here are the files in devices folder
[Android Apps and Games] real_milux:
Sadly nothing enlightening here as well. :(

Sorry.

---------- Post added at 04:23 PM ---------- Previous post was at 04:00 PM ----------

Thanks. Now I'm even more confused, because the file is world-readable, just as I expected. I wonder how this cannot be detected. Maybe we need a shell-based detection.
[Android Apps and Games] buriimishka:
0.3 - working, 0.5 - not.

pure magic -_-
[Android Apps and Games] HikingMoose:
0.5 works fine on my 6P. It even wipes stats on automatically!

Oh, and it works on my Note 8.0 but I don't think it worked on my Galaxy SIII. I charged past 80 last night on the SIII.
[Android Apps and Games] xytill:
Using this for a while now. Still on 0.3 and not seeing the need to update it. Works flawlessly. Thank you so much. :)
[Android Apps and Games] phantom146:
Well this is just sad.. everything workd on my n6p but not the automatic stat wipe :(
[Android Apps and Games] dennyk23:
Thank you so much for the Ability to select recharge limit(Range: 10%) feature!!
[Android Apps and Games] GasLoop:
You did the impossible; works on my OnePlus One, thank you!

EDIT: Left my phone to charge overnight; woke up with 100% :(
[Android Apps and Games] hgmichna:
0.3 -> 0.5

A little argument is that testing new versions and reporting on them helps development.

But most users do that anyway, so no big deal.
[Android Apps and Games] HikingMoose:
What ROM are you on? I wonder if that can have any impact on it. Not to ask the obvious, but you did re-grant root permissions right? I had to re-grant them, or it wouldn't work, even though I installed it right over the last one. I've charged twice and both times it reset them. I'm on SAOSP with Flash kernel.
[Android Apps and Games] phantom146:
Im on krexus with fk.

I have already granted root permission twice. Ill try it again and update. Krexus is pretty bare and bones so i know its not with the rom.
[Android Apps and Games] HikingMoose:
Oh cool. I haven't heard of krexus. Are they not on XDA?
[Android Apps and Games] phantom146:
They arent for nexus 6p because of some reasons but he is the best developer ive talked with and probably the best rom i have used.

You should check out his g+ just type krexus google plus and you will see s grest community.

Ppl like char.g, billblandford, and the guy who hardmod the nexus 5 uses his rom as a dailly driver plus a lot of other developers. Also because of his rom, other legacy devices more than 10 actually asked for his rom including caf devices and oneplus. Each has different builders voluntarilly maintaining the best rom.

Check it out and you wont be disappointed
[Android Apps and Games] mauam:
Works perfectly on Honor 5 X (RR 5.8.2). Thank you very much for this app:cool:
[Android Apps and Games] kos25k:
hello.I remember I had problems with first initial version on my moto x play.it was charging ok till 80% but when I wanted to recharge afterwards I couldnt.I had to reboot.has this issue been solved?thanks.
[Android Apps and Games] Galaxea:
I was REALLY hoping that this would work on the S3 mini, but it tells me it is not compatible.

PLEASE make it work some time.

Thanks.
[Android Apps and Games] t0per666:
Is it possible to add recharge if 20% left and discharge if reach 90%? Thank you awesome work!
[Android Apps and Games] hgmichna:
Charge/discharge limits

Why would you want that?

I cannot imagine any situation in which a large difference between the lower and the upper limits makes sense. Please help me there.
[Android Apps and Games] buriimishka:
Further tests showed that even though version 0.5 closes on manual start with an error about an unsupported device, not giving anything to change in the settings, it still works remarkably well in automatic mode if it is installed over the configured version 0.3 (-: Version 0.5 Even reacts to wireless charging.

i can change settings in version 0.3 and then use version 0.5 (-: strange, but i can live with it.

thanks
[Android Apps and Games] t0per666:
I use this phone to "AFK" leveling in Ragnarok Mobile its an MMORPG game. I want to keep my phone on 24/7 without sacrificing my batteries life. Its just me thou if he cant make it its fine i dont force anyone just asking.
[Android Apps and Games] Benny Bosser:
Awesome app! Working fine on my note 4 running a note 7 mm port!

Thanks for creating this, was looking for it for a long time already.

The app is perfect for me. If it's not too much work, it would be cool if you could make it compatible with tasker. I'd like to set location based charging limits :) in either case, thanks again for this amazing app!
[Android Apps and Games] hgmichna:
Unnecessary settings epidemic

OK, but you could just as well set it to something like 50%, which would serve the purpose perfectly. It would actually make your battery live a lot longer.

My point is that the author could, of course, extend that setting according to your request, but it would serve no purpose.

In fact, I think that the lower bound setting already serves no purpose in any case. It could be fixed to a few percent below the charge stop setting, and nobody would have any disadvantage.

The reason why I write this is that I keep seeing lots of settings everywhere, not only in this app, that confuse users and that serve no meaningful purpose or that could be automated because the app knows better than the user what a good setting should be.

Therefore I greatly appreciate that the setting for the device-type-specific control file has now been automated in version 0.5. That is definitely a step in the right direction.
[Android Apps and Games] HikingMoose:
I used to disagree, but I have changed my stance recently. If I want to be plugged in all the time, I'd just set it to 60% which is where the batteries want to be. You could then set the lower limit to 50 if you choose to. There shouldn't be any I'll effects for the battery with this setup.

However, I dislike how we can't change the chargeing file. Because it seems to be choosing the wrong one for one of my devices, and I can't change it. Previous, it still automatically selected the file, but allowed you to change it if you needed - watch is obviously ideal.
[Android Apps and Games] realista87:
just 2 questions:

- why to jump from 0.3 to 0.5 version?

- is it really important to autoreset battery stats? i sincerely don't understand what is supposed to do the stat...... i've always read that to reset it, just simply recharge the phone while off, turn on...wait 1 min, then UNPLUG the cable. stop

https://www.xda-developers.com/goog...-battery-stats-does-not-improve-battery-life/

possible bug: i have the same big on 0.3 and 0.5 .... when i press the 3 dots upward, i see settings but when i press it... NOTHING OCCURS. is it a normal behavior? what settings am i missing?
[Android Apps and Games] aamadorj:
It's not a bug. Dev wrote this a while ago:
[Android Apps and Games] hgmichna:
Reset battery stats?

I also have doubts about the usefulness.

I guess this app has been developed from a standard template, which has this menu. But since the app shows nothing else but its settings page, selecting settings only takes you to that very same page, so the menu choice has no effect.

No big deal. Perhaps the menu can later be expanded to cover additional functions.
[Android Apps and Games] realista87:
i tested a strange behavior on my setup. nougat RR 5.8.1.

it seems that using charging_enabled setting the phone when arrives at the choosed %, just stops being charged, and continue to recharge when the down threshold is touched.

BUT........... using the battery_charging_enabled (nexus/pixel) ( yes... i have both file on my rom... this and the previous one) seems that the phone tries to keep the max% all the time... without to unplug the power.

I noticed with an usb meter, that when i turn offche display... the ampere drawed by the charger is 0....... but when i activate the displòay returns to draw only 200...250mah ... the precise amount consumed in that moment by the phone.... JUST TO KEEP IT AT THE DESIRED UPPER THRESHOLD.

To me... it seems to be a better way of working, am i wrong? all phones by default keep on charging also at 100% or at least the ampere are so few 0,02 to just keep the 100% for an undefined time.

i don't think that the behavior to arrive to xx, stop, wait to xy, start rechargeto xx...... stop.... is great for battery life.

maybe you people can do further tests......to prove my same behavior. in this way it could be USELESS to set a lower threshold..... just because the upper one is ALWAYS MANTINED
[Android Apps and Games] HikingMoose:
You guys are missing the point. It's not resetting the phone's battery calibration. It's resetting the phone usage. Because you're not charging to 100%, they never reset.

If they don't reset, you'll never know if there's something went with your phone and your battery life is starting to suck do yo a rogue app or something. You have no baseline to just your kernel efficiency.
[Android Apps and Games] realista87:
ah ok. never had this problem because limiting to 90%.....it does automatically reset my stats... but maybe under 90% stats are not formatted
[Android Apps and Games] Freezy202:
I have checked the file. The app should work, since the file exists. But I don't understand why it's "0", even after I deleted your app and did a restart.
[Android Apps and Games] sriharshaarangi:
It is 1 as default for me, when it is made 0, the phone doesn't charge even when connected to charger.

So, for me

1: Charging enabled

0: Charging disabled

Try this once: Make that file 1(using any root file manger/terminal) while connected to charger, and see if charging stops.
[Android Apps and Games] kos25k:
https://www.wirelessdesignmag.com/b...hould-stop-fully-charging-your-smartphone-now
[Android Apps and Games] kos25k:
maybe a widget???thanks!!
[Android Apps and Games] sriharshaarangi:
Didn't get you. Can you be more precise? What is the functionality you are expecting from the widget?
[Android Apps and Games] Freezy202:
Still no luck. Tried different kernel, another rom. I tried to modify the mentioned file with a root Explorer, but I got an error message. Maybe it has something to do with the error, why your app can't change the file.
[Android Apps and Games] kos25k:
just to set on-off more quickly!another thing is that yesterday I dissabled the charge limit and my phone didnt charge.I had to reboot.so the widget could do all this process for us ?
[Android Apps and Games] AdroitAdorKhan:
Same as Sony's Charging Optimization! ?
[Android Apps and Games] sriharshaarangi:
Thanks for the feedback! The will be on my todo list. I wonder why it didn't charge after disabling it !?!
[Android Apps and Games] kos25k:
I dont know!can anyone confirm this?I will test again!

just confirmed!it was 83%,pulled charger off,disabled limit,put charger again and dont charge!but there is the thunder icon on battery...http://cloud.tapatalk.com/s/58a70e88aa063/Screenshot_20170217-120110.png?

I dont know if this has to do with this mod...but this popup appears always to me!!what is it???
[Android Apps and Games] sriharshaarangi:
Which mobile are you using?

I tried what you said, but it was charging for me and connecting charger without rebooting.

Try the same thing once more, and just after disabling limit, and before charging, check this file:

/sys/class/power_supply/battery/battery_enabled

It is changed to 1 when disabled(It should work like this). If It is 0 for you even after disabling, then that's the reason it is not charging.

That supersu access request is not related to this app. Do you have xposed and whatsapp extensions installed? Refer this link: http://android.stackexchange.com/questions/166211/why-are-zygote-and-whatsapp-asking-for-root

http://android.stackexchange.com/questions/168550/why-is-zygote-asking-for-superuser-permissions
[Android Apps and Games] kos25k:
thanks!I have a moto x play 6.0.1.yes I have also this module.ok I ll test it when I am not busy and report back!dude one more favour.I remember somewhere there...u can edit ?something that allows our mobile to shut down only when battery goes to 0%.Now my phone shuts down on 2-3% bartery sometimes.can u find this please?
[Android Apps and Games] B!Gguy:
Works great with OP2. 'Settings' won't open though. Few suggestions.

1.Make app icon + notification icon much better(Material design).

2.Add some graphics to cover the empty space on the main layout.

Keep up the good work!
[Android Apps and Games] Younex:
Anyone know why ?
[Android Apps and Games] StonebridgeGr:
Very very good application, that's I wanted all this time , but PLEASE , let us set it to 100% or even 99%, I know from 95 to 100 there is no much 'battery' but it looks better for those who want to have their phones charge full. Sorry about my English. Plus, I can't enter on the settings, try to tap on the settings but nothing happens. Thank you

John

---------- Post added at 09:38 PM ---------- Previous post was at 09:37 PM ----------

For those who have XIAOMI MI MAX 6'44 WORKS PERFECT. TRY IT. YOU WON'T REGRET IT.
[Android Apps and Games] Sunn76:
Download not working?
[Android Apps and Games] chancex:
Is work!!! Awesomeeee!!!
[Android Apps and Games] logosA:
I am sorry to report that in Samsung Note 2 with android N 7.1 it dosent seem to work. It keppes charging over the limits set( 80)
[Android Apps and Games] StonebridgeGr:
There is no way to charge more than 80, try the above instructions with the root browser , go to the file, and change the value to 0 and then again 1. See and try it.
[Android Apps and Games] logosA:
ok i will try it once more
[Android Apps and Games] Vorlon8472:
For me stats only reset if I charge to 99-100% so this auto reset thing is really nice!
[Android Apps and Games] HikingMoose:
Same here, I have to fully charge for them to reset. That's why the auto reset is probably the best feature of the app, aside from the main function of the app itself.
[Android Apps and Games] hgmichna:
Resetting battery stats

What is the advantage of resetting the stats?

Why does Android not reset them if resetting is so good? Why does it keep them at all?
[Android Apps and Games] Vorlon8472:
To get more accurate power consumption values since last charge. That way usage app and hardware statistics don't get added to the previous charge cycle.
[Android Apps and Games] HikingMoose:
Exactly. I like to monitor my screen time each charge just to make sure everything is up to snuff. If one day I only get half of the usage I normally get - I know something is wrong.

Android does reset these when you charge to 100%, but we're not charging to 100% with this app.
[Android Apps and Games] real_milux:
This is nothing new to us.

The different semantics of charging_enabled and battery_charging_enabled are well known, with the latter being superior whenever it works. Just dig through all the old posts since the early times. ;)

---------- Post added at 08:06 PM ---------- Previous post was at 07:48 PM ----------

Hey, could you please check out this experimental build and tell me if that one works for you:

https://mega.nz/#!h18wVALY!WDgIYSIXhIcF_D6d9SMfBX9l3ULKHmHZKsZpjzzyvHs

If you want to compile it yourself, it's based on this fork: https://github.com/milux/BatteryChargeLimit
[Android Apps and Games] iperov:
thanks!

works perfect with 'generic file' on xiaomi redmi 3s
[Android Apps and Games] 24imelqui:
/sys/class/power_supply/battery/charging_enabled I have this on my root folder. I set the limit to 80 but it doesn't stop charging at the limit. My phone is Zenfone Selfie, auto reset stats work btw.

PS When it reached 80 the value was changed to 0 but it still continue charging. When I removed the charger the value change to 1.

How to make this work? Thanks
[Android Apps and Games] buriimishka:
It works! Thanks (-: Starts and stops correctly, even responds to wireless charging.
[Android Apps and Games] savvymatthew:
With 0.5 with battery set to 85 with recharge at 75.... I have been noticing my display always being on and not going into sleep mode when it hits 85 and starts to discharge screen stays on?

OnePlus3 7.1.1
[Android Apps and Games] realista87:
ok so it's better to use the battery_charging_enabled file.........the only one difference is that the lower threshold becomes USELESS, because using that method it continuosly tries to keep the max threshold setted. right?
[Android Apps and Games] KBay:
Are your sure that prolong the battery life? Battery life depend mostly on two factors:

1. Number of charge/discharge cycles.

2. Changing speed. Slower is better.

This your app you are not changing charging speed, but you increase number of charge/discharge cycles. So there are no benefits for the battery.
[Android Apps and Games] hgmichna:
This is not correct. The only thing that matters primarily is the voltage. High voltage, above approximately 3.92 V, i.e. roughly 60%, stresses the battery. Between 60% and 80% the battery suffers a little, above 80% it suffers a lot.
[Android Apps and Games] fernseher:
My LG G5 charges normal till 80% (that's the set limit) then jumps immediately to 90%, then slower till 100%. Now it shows a charge of 100% and stay at this for till now 30 minutes. I think that's not normal, isn't it? :(
[Android Apps and Games] iperov:
problem is Battery Charge Limit not autostarting after reboot, even in MIUI where locked programs autostarting.
[Android Apps and Games] geraldalcos:
QS Tile Request

[MENTION=6898873]sriharshaarangi[/MENTION] Thank you for this wonderful app. Seems working fine on my S7E (though I just installed it recently). Maybe I am asking too much, but is it possible to add a QS tile? :)
[Android Apps and Games] iperov:
[MENTION=6898873]sriharshaarangi[/MENTION] can you please make app active after phone reboot? autostart for this app not works
[Android Apps and Games] fernseher:
Now it works fine on my LG G5. Only thing is that the termination of the app after charging is not working. Has anybody a solution for that?