yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] Ollibolli85:
Hello!

I use it on my Samsung Galaxy Tab S2 and almost everything works perfect!

When i plug in the AC, the device start immediately to charge to the Max.-Limit and starts again under the Min.-Limit, like it should be!

But is there a way the device just start by reaching the Min.-Level first, so it do not start immediately after plug in the AC?

Best regards!
[Android Apps and Games] rfurb:
Hello,

I have observed a similar problem in a specific Android version. In Android 5, everything works perfectly. On the same phone with Android 6, after charging correctly till the chosen limit, if I disconnect the charger, use the phone for a while and then reconnect the charger, it does not charge at all anymore. The temporary solution I have found is to reboot the phone every time before connecting the charger.
[Android Apps and Games] vickylahkarbytes:
After much hunting, i found the control file for Samsung S Duos GT-7582

It is /sys/class/power_supply/ac/online

Set it to 1 for enabled and 0 for disabled
[Android Apps and Games] mea_pulpa:
Since the app is fairly old , I am not sure if it is still being maintained .

It would be nice to see the following functionality in the app :

-The option (toggle) to charge past the limit , from a certain set hour . Maybe even attached to daily schedule , or else simply a manual toggle .

Explaining :

How it is now : Put the phone on the charger at 9PM . It will reach its set limit of 80% at 10PM . Then maintains battery between the 2 set values (75-80) until you take it off the charger in the morning .

Extra function I am talking about : At a certain hour set in the morning , for example 7AM , it will charge as slow as possible (less heat) past the 80% set limit to 100% , in order to be ready for a busy or long day . So then at 8AM when you take it off the charger to leave home , it will be fully loaded for the day (100%) .
[Android Apps and Games] mea_pulpa:
doublepost
[Android Apps and Games] deechte:
This app still works on Android 14. But you need to find the working file for your device.
[Android Apps and Games] mea_pulpa:
I have the same issue on a galaxy tab A6 after the developer of a ROM implemented the lineageos "charging control" function in battery settings .

see

LineageOS 19.1(+) for SM-T580 (gtaxlwifi), SM-T585 (gtaxllte), SM-P580 (gtanotexlwifi), and SM-P585* (gtanotexllte)

This is LineageOS 19.1, which is based on Android 12L, for variants of the Samsung Galaxy Tab A 10.1" (2016), which have models and codenames as follows: SM-T580, with codename gtaxlwifi SM-T585, with codename gtaxllte, along with SM-T585N0...

xdaforums.com

Did you manage to find a fix for it ?

Edit :

Also found this on reddit

https://www.reddit.com/r/LineageOS/comments/ztp16o
Seems it caught the attention of more people , yet .. no fix for it ?
[Android Apps and Games] mcichy10:
Hey people. Is it possible to give needed permissions to this app via adb? I don't have root and don't want to, but I'd love to use this app.
[Android Apps and Games] rodken:
In accordance to the OP, this app requires root.
[Android Apps and Games] gtrain2024:
Pls, i need help for poco f5pro.

Rom Evolution android 14. APK dont worki.

Everyting you now about this? Tnx
[Android Apps and Games] totalz:
The app doesn't follow the set range. I know the input_suspend file works, because I can test it manually, but the app kicks in and changes the value within the don't-charge range. It feels like the app need sometimes to "settle-in"!?
[Android Apps and Games] weilunt0219:
I'm also wondering if there's an update. Does anyone know of anything being actively maintained? The control file for my OnePlus 9 Pro hasn't been consistent since the A14 update. I tried ACC, but that's also not consistent, and issues are ignored there, not to mention the telegram community seems kind of elitist off-putting, and downright rude and unwelcoming.
[Android Apps and Games] deechte:
No update is needed, the app works perfectly, also on Android 14. But you need to find the correct file for your device. People have posted files in this thread that work for them. Start with those, preferably from the same brand as yours.
[Android Apps and Games] weilunt0219:
OnePlus 9 Pro. Used `/sys/class/oplus_chg/usb/chg_enable, 1, 0` successfully in the past. On this phone. After A14, it is not consistently successful. Have also tried all other OnePlus control files on this thread.
[Android Apps and Games] deechte:
Try this one. Works on my Oneplus 11 with Android 14.View attachment 6112033
[Android Apps and Games] weilunt0219:
I appreciate you. I want so badly for this control file to work, because it feels like every other OnePlus Device uses it, but it doesn't work on my OnePlus 9 Pro.
[Android Apps and Games] rodken:
You can try this suggestion from another well-known project.
[Android Apps and Games] weilunt0219:
If you mean trying to boot into the Bootloader to reset the PMIC, I went ahead and gave that a shot today... it doesn't seem to have fixed anything...

If you meant disabling the smart charging, I've had that disabled before.... I'm afraid that doesn't seem to change much.
[Android Apps and Games] HikingMoose:
It will go away once you're before 78% I believe. I unplugged before 80 the other day, and the notification went away once the battery dropped below 78 (or maybe it was 77).
[Android Apps and Games] Ace42:
Y50-70 (Lenovo). Battery wear is still 0 or under 5% currently, bought it back in 2015. My Asus from 2013 has around 15% wear and doesn't have a way to limit its charge.
[Android Apps and Games] nik80:
hello

great app, just what I was looking for, unfortunately doesnt work on my device - cubot cheetah 2

/sys/class/power_supply/battery/charging_enabled do not exist

I got other files, but not this one

I did check a few, but cant locate which one indicate charging

any chance to make it working for me?

currently the battery is charged to 4.36 volts and Im a bit worry about the safety, it is not only killing the battery but it could cause fire
[Android Apps and Games] real_milux:
Mine (Moto X Style) can be charged until 4.4 V. This is normal and safe, yet not perfect for battery longevity, see previous posts.
[Android Apps and Games] hgmichna:
Charging from higher percentage

I just found this wonderful app, which I had sometimes dreamed about.

I have installed it on my OnePlus One with Android 7.1.1 (Lineage OS 14.1), and it works very well when I charge from a lower percentage. I have set the limit to 60%.

When the phone had already been charged beyond 60%, for example, 70%, 80%, or 90%, I would expect that the battery is not charged, that the percentage goes down slowly, as the battery charge is used up, and near the target, 60%, it should start charging and keeping the battery at or near 60%.

However, this is not what I observe. The battery appears to be charged, it stays at the higher level and does not go down to 60%. Could this be a bug in the app?

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

Oh no, not more settings please. Particularly not settings that serve no purpose.

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

What would be the purpose of such a setting? I fail to see any meaningful sense in this.
[Android Apps and Games] nik80:
if many companies overcharge their batteries just to show a few more hours standby time in their advertising doesnt mean it is not damaging the battery, which advertising doesnt say that they just make you to pay more for a new battery or phone sooner than you expect, it doesnt mean that this phone is completely safe and will not burn your house while you sleep inside

everything above 4.2 is damaging the battery

everyting above 4.35 is dangerous, therefore built in boards with safety cut off circuits are designed to cut off at 4.3 volts

which is not a charging voltage, it is fail safe cut off, which is designed as a second protection, if the charger dont stop at 4.2

I have seen many chinese cheap toys charged without a proper charger circuit, just using the battery fail safe cut off board, but thay are all crap chinese products, reputable brands should avoid such approaches
[Android Apps and Games] hgmichna:
Li-ion battery voltages

Everything above 3.92 V (approximately 60% charge) damages the battery. The damage increases from very little at 3.92 V to quite a lot at 4.3 V.
[Android Apps and Games] nik80:
well.... the damage up to 4.2 is considerably low, all general purpose bateries capacity/cycle life are rated at 4.2

where the battery is safe to use, and the life is long enough to cover the normal life span of the device

for example - battery rated at 600 cycles up to 4.2 volts to maintain 80% of its capacity - that mean you can charge it almost every day for 2 years, and you will end up with 80% capacity

so that damage is acceptable

I got old phone which still hold charge as new on its original battery(battery manufactured 12 of january 2012), but the android 2.2 is useless now, slow, many apps require newer android version, so its life span is near ot its end, I was using it heavily everyday in the past 4 years, but the battery still hold charge as new, so this is well maintained battery

the problem with voltages above 4.2 volts is that the capacity gain is very low, but the damage is high, cant remember the exact numbers but for example - 4.3 volts provide 9% more capacity and reduce the life of the battery in half

forcing premature damage/wear/lack of support in all new devices is often practice

the big boys will be happy if we buy new device every year.... or every month... even better....
[Android Apps and Games] blueberry.sky:
On some devices the charge disable file will only disable battery charging, and the device will continue to power itself from usb. The battery is not used to run the device so it doesn't drop. Whereas most devices seem to cut off all usb power when "charging" is set to 0.

There may not be anything the app can do.
[Android Apps and Games] buriimishka:
Thanks for the app, but what about wireless charging? The app will work with it? Because on my experience the phone is still trying to charge.
[Android Apps and Games] toskala:
Collaboration with Tasker

Hey there,

the app works great, big thanks for all the effort, it really fills a gap, but I do see room for improvement ;).

Basically I use Tasker to accomplish the following:

Whenever the phone is charging _and_ is flipped face down the ringer profile is set to alarms only.

The problem is, that whenever the charging limit is reached Tasker thinks the power cord is unplugged and the defined profile is no longer true and therefore the exit task fires. In case of the silent mode on my bedside table it is a bit annoying if some messages cause notification sounds because of the task toggle :). The current workaround is to only use orientation "face down" as profile, so the phone will trigger silent mode even if no power cord is attached. This unfortunately leads to unwanted silence when the phone is in my pocket.​

When the phone is plugged into the car dock and is charging, enable the developer option "stay awake"

The issue here is that tasker toggles between "stay awake" true/false depending on whether the the charge limit is reached or the battery is drained enough to keep on charging. In that case it seems there is no real workaround, since display timeout can not be set to more than 30 minutes in Ressurection Remix for the Oneplus 3T.​

The above problems do not occur if Battery Charge Limit is disabled. The reason for this is obviously the continuous charging which is what we all are trying to avoid here.

So in short: Is there any other way to provide information about the presence of a plugged power cord to Tasker?

Cheers, toskala
[Android Apps and Games] blueberry.sky:
There should be, depending on your device. I'm not familiar with with all the options tasker has. Start with looking for alternate tasker usb present, ac present, usb current options. If you can't find any then look in /sys/class/power_supply. Depending on your device you may find a file /sys/class/power_supply/ac/online or /usb/online that will signal when usb is really connected or not. File reads 1 when connected, 0 when disconnected. Tasker should be able to watch the file for changes then read it to confirm.

Tasker really should be able to detect usb presence separately from charging or not. If it truly can't, submit a tasker bug report.

---------- Post added at 05:05 AM ---------- Previous post was at 04:50 AM ----------

But is the battery percentage still increasing?

Your normal charging indicator will continue to show charging even when charging has actually been disabled by this app. Also, you did not mention what device you have, this app does not currently work with all devices. Use the thread search function to find mentions of your device.
[Android Apps and Games] hgmichna:
Should the battery last two years or four?

I see your point. There are different interests here, users aiming for different things.

My purpose is to stretch the battery lifetime to 4 years. One reason is that I regularly give away used phones when they are two or more years old, and I want them to work well for another one to two years.

One obvious solution would be to swap the battery for a new one after two years. Unfortunately, two unpleasant facts work to our disadvantage:

It is not easy to swap batteries in newer smartphones.

If you want to do it anyway, when you buy a replacement battery, you either pay a very high price to the manufacturer of the phone or you invariably get a cheap, bad, Chinese imitation battery that does not have the full capacity and dies after half a year.

If you limit charging to 3.92 V most of the time, then the battery will last for thousands of charge cycles, 2,000 or even more.

There are days when I need a full battery charge, particularly when I am not at home, but travelling (or skiing, hiking, driving, and recording all my movements, things like that). So I am not following the charging limit religiously. The nice thing is that a few days with 100% charge in the morning reduce the battery life span only minimally. The bad thing is charging the battery to 100% every day or night.
[Android Apps and Games] nik80:
all interests are resolved with one single option - choose a charge level, which is provided in this app

also noticed that some samsung updates provide that option, on the phones that was recently blowing like popcorns

unfortunately on my phone doesnt work

I dont have any such file - charging enable or similar

I found one file in another folder - AC/status

which indicate plugged charger

but when I set it to 0 manually it reboot the phone

here is my battery folder, and one file - uevent - which provide some kind of summary

the phone is cubot cheetah 2

dont have much knowladge on smartphones, is there such phones where the charger is entirely hardware and it is software independent?

any chance to setup a switch via wi fi or bluetooth? I found some wifi smart sockets on ebay

anyone success with that?
[Android Apps and Games] hgmichna:
Charging from higher percentage

Ah, that's good news. Thank you for the explanation. Makes perfect sense.

I will test this a little further on occasion.

I guess, as long as the battery is not actually charged, that is mostly an acceptable compromise if the app cannot be made to control the total power intake.
[Android Apps and Games] cmglng:
I had a Samsung laptop that has the same feature that can be accessed on the BIOS. It was a Samsung NP300.
[Android Apps and Games] hgmichna:
Laptops with battery charge limiter

At least some Lenovo laptops also have this feature, well hidden deep in its Lenovo energy manager. Works well though, once you find it.

Acer laptops don't have anything like this. I guess, most others don't either.
[Android Apps and Games] Marília de Oliveira:
Working on Z3C
[Android Apps and Games] HikingMoose:
Check out this LI battery writeup! Confirms what I've been telling people about charging speed - the faster you charge, doesn't really increase your state of charge as much as a slower charge. I.e. charging at 3 amps rapidly and getting the battery to 100% asap, will not give you much, if any additional phone usage compared to just charging at 2 amps and getting it to 80%.

http://batteryuniversity.com/learn/article/charging_lithium_ion_batteries
[Android Apps and Games] thebott:
Any ideas why this app wouldn't work on a HTC One M7. It keeps charging to 100% even though I have it on and set at 80%
[Android Apps and Games] hgmichna:
Charges above set level

After some more testing it seems that there is still a problem.

I have set the max charge level to 60%. When I start charging below this level, the app works perfectly. (Not sure whether that is still true when I start charging below, but close to the set level, say, 58%. Needs more testing.)

When I start charging above the set level or perhaps even at the set level, the level still rises. In that case the app does not seem to work.

I am not sure whether this happens every time or only in some cases. This also needs more testing.

This is on a OnePlus One with LineageOS 14.1 (Android 7.1.1), OpenGapps, and LineageOS root.
[Android Apps and Games] toskala:
Okay, there has been an interesting development of events... I was trying to figure this out but was using the dash charger for the first time while playing around with Tasker.

It turns out, the phone keeps the connected state using the dash charger just fine but for some reason it does not when I have my Anker charger plugged in.

Will have to double check this behavior tomorrow when using the car dock.

Thanks for your tips!

Cheers, toskala
[Android Apps and Games] nik80:
my phone dont have such file like charging_enable or similar

did some searching on internet and it look like mediatek devices have different android builds, where the charging is a bit different

/sys/devices/platform/battery/power_supply/ - is the folder related with current status files, inside "AC" folder have file "online" which show "1" when AC adaptor is plugged, and USB folder and file "online" which show "1" when is charged from USB port from another device

also I got /sys/devices/platform/mt-pmci folder which contain some interesting files, like battery_oc_protect level, battery_percent_protect_level and more similar, but cant find what they do

also while searching found that the kernel contain some configuration variables like HIGH_BATTERY_VOLTAGE_SUPPORT

which according to this code: https://github.com/nofearnohappy/ke...rs/power/mediatek/switch_charging.c#L674-L752

set high or standard charge voltage

but I have no clue where this is set, and is it possible to change it

if possible to disable HIGH_BATTERY_VOLTAGE_SUPPORT it should stop overcharging the battery

there should be also a configuration for the charge voltage as a value, but cant find where it is, here is another file which may help

https://github.com/nofearnohappy/ke.../mt6795/charging_hw_mt_sw_charger.c#L511-L543

anyone have any clue about this device? where could be these config files?

thanks

anyone have any clue

edit: just found one file /system/data/misc/ProjectConfig.mk

where I found HIGH_BATTERY_VOLTAGE_SUPPORT = yes

so I set it to no, and rebooted, now waiting to see full charging voltage if changed

update: doesnt work :(
[Android Apps and Games] hgmichna:
No automatic charge limiting

In this case I can recommend the app AccuBattery by Digibites. It works very well and delivers some fine statistics.

Unfortunately it cannot directly limit the charging. It issues a notification when the battery reaches the preset charge, then you have to disconnect by hand.

Better than nothing.
[Android Apps and Games] buriimishka:
thanks

Later tests show that the application is working, but it's strange, it starts if I connect usb, but it does not start if I put the phone on the wireless charging platform. If then I ran the application manually, then everything is fine, and the application can limit charging, but if you do not start the application, the battery will reach 100%. And of course with wireless charging, the application does not start on its own, and it does not close after removing the phone from the charger.

ps. I'm trying to use it on yotaphone 2 and android 6
[Android Apps and Games] hgmichna:
A simple guess is that the app detects the USB connection, but not the wireless charging.

Perhaps this could be changed by detecting a rising battery level?
[Android Apps and Games] BIade:
1st of all: thanks for your wonderful work.

I got a strange need, but it could be too off-topic (forgive me, if so):

Could I "fake charge" my nexus5? (Like making the phone thinks, it is charging, while nothing is connected to usb)

Reason:

"Ok Google" with screen-off does work WHILE CHARGING. It would be awesome to have it toggleable even WITHOUT charger conncted.

I know this will drain more battery, but would it be possible?

I asked this a lot of times over the last 4 years, without any success, but maybe one of you could help me?

Thank you soo much

Gratefully

Blade
[Android Apps and Games] HikingMoose:
I think you might be very off and happier if you could solve the issue itself. Are there other ROMs that it works fine on? No one in the threads you're following have found a solution?

I don't know if your inquiry would be possible, but if it is, it's probably not the best way to circumvent the problem. For the 6P some people have that issue, but they usually can resolve it by flashing the correct vendor or something (I don't pay a lot of attention to it, because I don't use it).
[Android Apps and Games] real_milux:
The app doesn't detect any USB connection. It uses a BroadcastReceiver to listen for ACTION_POWER_CONNECTED and ACTION_POWER_DISCONNECTED intents, the default Android way to detect whether power supply is available or not.

If this doesn't work for your device, then it is maybe some proprietary device-specific stuff that's not properly implemented and therefore doesn't cause this events...

Edit: I was partially wrong about that. There is another check in the code, and there wireless charging is indeed excluded... I will add this to the other stuff of my pull request on GitHub.

---------- Post added at 01:04 AM ---------- Previous post was at 12:40 AM ----------

Well, no. The usual way is a BroadcastReceiver listening for the power-related events, see last post.

Unfortunately, setting charging_enabled to 0 causes the power supply to be completely disabled, like removing the power supply, but in software. Therefore, Android will actually behave as if the power plug was removed. This is a normal condition and not the fault of the Tasker developers, no need to bother them with that.

In case your phone supports battery_charging_enabled, use that one instead. It doesn't drain the battery and doesn't cause any misleading events to be fired.

My device (XT1572) supports both charging_enabled and battery_charging_enabled, so I could observe those differences there.
[Android Apps and Games] Azazel Azay:
Doesn't support tablets? It's not working on my Xperia and Mi Pad tablet.. Works fine on my phone..
[Android Apps and Games] Technical:
Strange, I could open the app at first run... Then, all the times, I got only a full white screen.

Trying uninstalling and then installing again and it happened the same...
[Android Apps and Games] Lasmcter:
I think this is not a fundamental solution, the effect of root can improve the permissions of phone devices,
[Android Apps and Games] sriharshaarangi:
Announcing v0.5

Credits: Thank you [MENTION=6929614]real_milux[/MENTION] for the update!!

- Ability to select recharge limit(Range: 10%)

- Automatic file detection and selection

- Added store_mode for samsung

- Added option to auto reset stats

- (Huge code refactoring)

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

Update: adding [MENTION=6929614]real_milux[/MENTION] as a contributor to the project
[Android Apps and Games] Freezy202:
It seems like htc devices don't work since first release of this app unfortunately.