yashsingh1/xdaforums huggingface dataset:
[Magisk] bmwbasti:
Hi guys,

thx for this great app.

But I got one question.

It seems to work juft fine and charging stops at the value I set (80%), but directly after the charging starts again and stops a few seconds after.

So charging starts and stops twice 🤔.

My device is a poco F3 with newest Xiaomi.eu-ROM, ACC 2021.2.25 and battery/input_suspend 0 1 switch.

This one I figured out using BatteryChargeLimit ago.
[Magisk] bmwbasti:
Ok, so I figured it out by myself.

It seems as if all charging switches work and stop charging but only the correct one seems to completetely stop and disable charging.

But one question has come up. Is it supposed that the button "stop deamon" in ACCA does absolutely nothing? Or that there is absolutely no visual confirmation that the deamon is stopped?

Now AMD then I want to charge my battery to "real" 100%. I found out, that the Poco F3 seems to not be charged completely when reaching 100% because it immediately falls back to 99% when disconnecting the charging cable. When I wait some time longer the battery stays way longer on 100%.

As "stop deamon" seems to do northing, I tried the "charge to xy percent without restriction". This works but when reching 100% the charging gets stopped immediately and the problem persists that I have mentioned above.

@VR25
[Magisk] amn1987:
Does limiting max. charging voltage work in F3? I only recently got bypass charging to work in my F1 and it's so convenient. I would really like if my next device, which in all probability would be another Poco Fx, would also support it.
[Magisk] bmwbasti:
@amn1987

I really can't tell you. I don't ever use quickchargers, as I still own some pretty "old" or "low-voltaged" charging adapters.

So to say I really never use the chargers provided in the box.

And I don't own a device to measure charging voltage.

I don't know if there is a way to test it?
[Magisk] amn1987:
If you have rooted the device it's pretty easy to accomplish all of that. Just a matter of tweaking the right control files as long as it exists and the ROM and/or kernel allow modifications.

I am using the stock 18W charger but I have limited max. charging current and voltage to 1.6A and 4V respectively. In fact charging current can be reduced to as low as 20mA but occasionally the battery level dropped 1-2% even when plugged in. But just by limiting the max. charging voltage and not using any app to limit charging level, bypass charging is triggered when the peak voltage is reached. This is the best way although ACC still reports that battery idle mode isn't supported. Doesn't really matter anyway.
[Magisk] bmwbasti:
@amn1987

I think you got me wrong 😉.

You asked me, if it's possible for the Poco F3 to reduce voltage and current and I answered that I don't know how to test it.

So what's the way to test it? Set some kind of low current and voltage and watch if charging takes longer 🤔?
[Magisk] amn1987:
If limiting voltage really works then for ex. at 4V the device would stop charging at just under 70%. In my Xiaomi devices tweaking the value in voltage_max located in sys/class/power_supply/battery does the trick. Thereafter the OS should report battery as fully charged because that's how it infers it albeit at close to 4.4V normally.
[Magisk] bmwbasti:
I can't tell for sure, but it seems to work.

I've set the voltage to 4000mV but when I start charging ACC only shows a current of like 20mA and so the battery seems to get more empty instead of fuller while charging 😁.
[Magisk] Drymarchon:
Does anyone know of a custom kernel that allows voltage and current control on the pixel 5? It seems the most recent Elementalx does not, and I'm not sure if there are any that do.
[Magisk] amn1987:
Do you mean you were getting 20mA without tweaking the max. charging current? That maybe possible if it was close to the max. charging level as per the 4V setting and it was in the tapering phase. Temporarily stop using ACC or any other app to manually stop charging and check.

If bypass charging is working in Ampere app it should show status as "Full" and "AC Charger" for Plugged state when battery has stopped charging. In F1 it certainly works as the built-in battery charge cycle counter has recorded only 8 charge cycles in the last 20 days(0.4/day) since I enabled bypass charging whereas previously the daily average over the last 20 months was 1.1. Also battery charge has never dropped once "fully" charged and plugged in.

I have now got rid of ACC, BCL etc and only use Terminal commands in Tasker to enforce voltage limit at every boot as it gets reset after booting. Don't need to specify a max. battery charge level as voltage takes care of that. Temps. are much better and rarely cross 40°C which was pretty common earlier.
[Magisk] stavrosbin:
Guys I am a first timer here so I have a couple of questions about this module:

1. If let's say I let it charge through the night, will it stop charging after reaching the max %?

2. If I change anything from the app, would I need to restart my phone?
[Magisk] amn1987:
1.Yes as long as the charging control file works correctly.

2. No AFAIK.
[Magisk] stavrosbin:
Thanks man!
[Magisk] Zilla0617:
Is bypass charging the same as battery charge idle? If so, I selected the switch that supports it on my phone (Pixel 4xl). However, when it reaches my set max (80%), Ampere reads discharging not full.
[Magisk] amn1987:
They sound similar but I am not 100% sure. ACC still reports battery idle not working in my F1 despite bypassing charging AFAICT amply supported by the daily average cycle count falling to one-third of the original rate.
[Magisk] bmwbasti:
I'm wondering, it anyone of the devs (or someone with knowledge of the application) is ever watching the thread🤔.

I don't know why but I can save as often as I want but after every charge the options for charging switch seems to get reset to "automatic" and "cycle through switches automatic" and I don't want that.

I found out that only the "charging enable 0 1" seems to correctly transmit the "battery is charged" command.
[Magisk] ricky56789:
Working again on Pixel 5 June update with EX kernel 1.07. Had to manually select sys/kernel/debug/google_charger/input_suspend 0 1 from the list, didn't work on automatic.
[Magisk] Zilla0617:
How do I setup bypass charging on my Pixel 4xl?
[Magisk] amn1987:
Dunno. You have to hunt for the correct control file if it exists. In my Xiaomi devices tweaking the value in voltage_max located in sys/class/power_supply/battery does the trick. I have set it to 4V which causes charging to stop at ~70%. And if it works ACC, BCL and the like won't be needed. In fact they can actually prevent bypass charging from being triggered. I had limited max. charging voltage since the update to Q early last year but only found out how to enable bypass charging in the last month.
[Magisk] skyfighter:
@amn1987

Your hints regarding "bypass charging" are very interesting - I'll definately try that! Do you happen to know:

When the bypass charging kicks-in and you do not disconnect the device from the charger: is the device still kept awake? This should be easily visible in the Details-View of the Android Battery stats. (Both of my xiaomi devices are kept awake even after charging is disabled via battery/input_suspend switch. Probably because auf wake-locks which are issued as soon as the devices get connected to a charger but don't get removed when charging is manually stopped tampering the kernel-parameters.)
[Magisk] amn1987:
No. Deep Sleep is always in the High nineties... despite which overnight idle drain is just ordinary. In bypass charging the device itself reports battery as fully charged. So I guess these wakelocks don't occur. By default bypass charging did work but only at 100% previously. The charging switch is the same in case of my Poco F1.
[Magisk] skyfighter:
So the whole device/Android-OS switches from "charging" to "normal" mode (e.g. no green battery icon and no power-/thunder-icon in status bar)!?

...then it looks like I'm out of luck regarding bypass charging - at least in case of my first attempt @ Poco F3 (alioth) running rooted OEM-ROM (MIUI EEA v12.0.5.0.RKHEUXM , Android 11). It simply kept showing all signs of "Charging-Mode" (e.g. green battery icon with power-/thunder-icon in status bar), even some time after the charging current dropped <= 20mA (according to AccuBattery App).

Here is what I did:

1) stop accd ("accd.")

2) check kernel parameters for default values ("date ; uptime ; acc -i")

3) limit charging voltage to 4V ("echo 4000000 >/sys/class/power_supply/battery/voltage_max")

4) connect device to charger

5) occasionally capture "acc -i" ouptut

Comparing the "acc -i" ouputs of my test shows a few changing values:

CHARGE_TYPE=Fast ---> CHARGE_TYPE=Taper

CAPACITY=28 --> CAPACITY=41 --> CAPACITY=64 --> CAPACITY=65

TIME_TO_FULL_NOW=10995 --> TIME_TO_FULL_NOW=8228 --> TIME_TO_FULL_NOW=1385 --> TIME_TO_FULL_NOW=1

...but sadly this one never changed (which probably explains why the Android-OS still claimed "charging"-mode):

STATUS=Charging

That are the last two "acc -i" ouputs before disconnecting the charger:

Spoiler content hidden.

Spoiler content hidden.

I guess leaving the device connected to charger over night / multiple days is not a good idea - at least if does not stop charging and keeps staying in this "Taper"-charging-mode (perhaps some kind of "conservation charge")!?

Anything I could try regarding bypass charging?
[Magisk] amn1987:
Remove ACC altogether and then check. Also first check if signs of bypass charging are present or not when left to sit at 100% for sometime or not. Could be MIUI to blame as well although I think that's not very likely. I don't use MIUI in any of my Xiaomi devices.

In my case the OS reports as fully charged but the charging symbol in the Statusbar persists and the battery charging LED is turned on always, probably as it's still drawing power from the charger. It doesn't denote battery charging alone is it? Similar behavior w.r.t. The charging symbol is exhibited by my Redmi devices in which bypass charging worked from the beginning w/o having to limit voltage.

FKM reports 0mA. Ampere as "Full". Also the battery cycle count has only increased by 8 since 22nd May, only 36% of the previous daily average. Also battery temps. are much better than before, despite being plugged in all day except when I am off to sleep, even compared to earlier when I had limited current to 20-40mA (anything lower didn't work and battery actually discharged by 1-2% a few times) and voltage to 4.1-4.15V but was also limiting battery charge level in Tasker which prevented bypass charging to kick in. Battery percentage doesn't drop at all. Voltage and temp. don't increase as well. If this isn't bypass charging then I have no clue.
[Magisk] skyfighter:
@amn1987

Your arguments sound plausible - thank you very much for the details! May I ask which ROM and Kernel you are using?

I'll disable the AAC Magisk-Module, reboot and do further tests in the next days... Let's see who laughs last - the damn charging logic/electronics or me. :)
[Magisk] amn1987:
I have only ever used crDroid in my F1 except for a very brief dalliance with a couple of other ROMs. And since last year the stock OD kernel. I just wished I had stumbled across this sooner as that would have helped reduce greatly the reduction in battery capacity with usage. Currently it goes down 10% for every 300 cycles or so.

Edit: The file permissions for voltage_max get reset after every boot. Tasker can take care of that.
[Magisk] faxpaper:
Can you list the steps on what you did?
[Magisk] stavrosbin:
Guys I was wondering. Is there a way I could automate switching profiles? Like I want 1 profile up to 60 and then switch the profile to charge up to 75. Any ideas? Their only difference is the V (3,920 vs 4,050).
[Magisk] iDlein:
Hello guys. I am having the Xiaomi Mi 11 Ultra rootet with the latest rom from xiaomi.eu (beta branch).

I've installed ACC from Magisk and then installed the AccA app.

It doesn't work on my phone. I'm selecting/editing profiles, and it still changes over the max. amount I define.

Any suggestions/tips on how to get it working? Also, if anyone use the Mi 11 Ultra with ACC, any good settings would be highly appreciated to save the battery.
[Magisk] amn1987:
Any progress? In my case after a flashing the June update of crDroid once the battery is "fully" charged the battery charging LED now turns off and the charging symbol in the Statusbar also dissappears. Everything else is unchanged. One battery cycle used up in the last 10 days as of yesterday!
[Magisk] zlamar:
On Pixel 4a 5g control file that works for me is sm7250_bms/charge disable and Automatically cycle through switches is ON. I've installed ACC through Termux from downloaded github zip, thren I've installed AccA from F-droid and disabled ACC module in Magisk. And it works, it stops charging, in my case, at 85 % .

Maybe it's worth to mention that I'm on LineageOS for microG 18.1, Proton kernel 1.4, Magisk rooted.
[Magisk] symbiansucks:
c440000.qcom,spmi:qcom,pm8150b@2:qcom,qpnp-smb5 seems to be keep the phone awake 100 prevent of the time. Any idea why is that?
[Magisk] Diego19891989:
I have a problem with ACC and my Poco F1. I've been using ACC for more than a year, but today my phone refused to charge more than 15% (no matter how I change the settings in the ACC app). I whipped all (data, vendor, etc.) from recovery and I reinstalled stock Miui rom. However, the problem persists and the phone doesn't charge more than 15%.

Anyone knows how I can solve this? Or how I can revert any changes that ACC could have made?

UPDATE: It charges now more, but very very slowly. It's been 4 hours to increase till 28% (Also, I tried multiple chargers before posting this)

UPDATE: it was the cable... I just had an amazing day...
[Magisk] drneed:
Unfortunately, I can't make it works on my Poco X3 Pro (11, xiaomi.eu 12.5.2). I tried different versions of the daemon and the app. It can limit current, but can't stop charging at 85%.

When I connect a charger (cap ~80%) it starts charging (but it shouldn't), after 15-20 sec it stops (it should), but then it starts charging again and never stops. At that moment the daemon was still running, I checked (accd, command).

Does somebody have any ideas?

PS. Original cable+charger and even weaker charger were tested, but no luck.
[Magisk] bonswouar:
Thanks for this module, quite useful when it's not included in roms!

Although it's been 4 years and nobody has yet released a simple manager app? Wouldn't that be useful instead of having to run command in term? (specially if you want to change it often, for example for the one-time only charging max command)
[Magisk] trinidude4:
There is an app. It's the ACC App (AccA) link in the first post. For me, it works pretty well.
[Magisk] bonswouar:
Don't know how I've missed the link, that app is exactly what I was looking for, pretty great to have multiple profiles, thanks !!
[Magisk] fw85:
Hello, would you please be able to identify necessary charging switches for the Mi 11 Pro/Ultra? None of the current ones seem to work. Do you need a power supply log uploaded?
[Magisk] danerrickcuba@gmail.com:
Hello everyone, at one point a few months ago I stopped using this app and it's magisk module because there were issues with my battery when under 25% to be precise.Phone is samsung note 9 running android 10.

When I started using it all was well, I had the app plus the magisk module, my setup was to charge to 80% and stop then restart charging if under 60%, everything was perfect till months later was unable to charge over 70% till the app/module disabled or phone restarted.And if battery is under 25% and try to recharge it'll drop all the way to 1% all the time but if above 25% it'll just recharge normally.

I thought problem was with battery, I removed the app/module but still faced same issues but after 2 or 3 cycles of full charges/discharge but battery was normal again even today battery still fully functional giving over 4hrs SOT of heavy use and over 8hrs SOT of light use.

I am not sure what's the cause of the problem explained here during the use of the ACC, I looked for alternatives but nothing is good but worried of reusing the app again.

Has anyone faced the issue on Samsung phones or other brands, the other apps also give issues on my note 9 as they can only charge to 70% even if I limit charge to 80 or 90%.

Without using any of these apps my phone charges to 100% all the times.
[Magisk] ricky56789:
Seemed to work at first with magisk module and ACCA app but now it just reverts to automatic and charges over the limit 😑
[Magisk] 73sydney:
Watching people try to continue to use this is an interesting study in the act of futility...

This thread should die

Why wont you people just let it die?
[Magisk] brackenhill_mob:
Perhaps because for many of us who are fortunate to have this working it's invaluable ;)
[Magisk] amn1987:
At least here people with newer devices can report what's working or not. I would really like my next device to support bypass charging as well.
[Magisk] fw85:
I found that in order to make ACC work for the Mi 11 Pro and Ultra, use this charging switch:

/sys/class/qcom-battery/input_suspend 0 1
[Magisk] ums1405:
Hi, this is a really great solution. I've been using it with all my phone's.

Ive been using it on a OnePlus 7t pro without any issues untill recently when I wiped the data and reinstalled the OS. The magical module installs and seems to be working but it cannot get the latest version of AccA app from GitHub to install. I get app not installed error. Im only able to get the f-droid version to install but it's out of date.please help!
[Magisk] amn1987:
Can you please check if limiting voltage works or not?
[Magisk] aleep123:
Can someone help me? Im using poco f1 on android 11 running Pixel Experience. After installing this module, im having so much problems with my charging. I already remove the module from magisk but it seems that ACC setting still applying to my phone, Its not reverting to factory settings. What should i do? Should I reflash my rom?
[Magisk] morgan3:
So anyone made it working on Pixel 5? It seems it stopped working after the last update.
[Magisk] mindyabiznis:
Yes mate I have it working perfectly.
[Magisk] whatsek:
I am also looking for a solution for this wakelock!

It seems that it is triggered after charging, maybe when it reaches 100% thats why I came to ACC, to prevent 100% and look if this would stop the wakelock running. When I charge to 100% and reboot, the wakelock is not triggered anymore and I have perfect battery life. I am running LineageOS 18.1 on Mi 10T Pro.

So this is not triggered by ACC!
[Magisk] matejx_:
Good day.

Is it good for the battery to be charged at very low currents such as 500mA or lower? I'm thinking about creating a profile, which will slowly charge till 75% through the night.

Thanks for help.

Good day.

Using Hades Rom with Hades kernel 2.0(s); Everything working flawlessly.
[Magisk] duttyend:
From what I understood, yes, as it creates much less heat
[Magisk] VR25:
ACC v2021.7.28 (202107280)

- acc -p|--parse: helps find potential charging switches quickly, for any device; refer to --help for details.

- Additional charging switches

- Disable charging after a reboot, if min < capacity < max.

- Extended test ([[...]]) alternative function for better shell compatibility

- Fixed issue #89: "--"" not respected in charging switch options.

- Fixed issue #90: acc is disabled in Magisk, but it keeps starting.

- Fixed issue #97: accd dies after plugging USB cable (thanks, @530f6caa).

- General fixes & optimizations

- German translation by @marrobHD

- Max allowed custom charging voltage limit set to 4300 millivolts.

- Cooldown, pause, shutdown and resume capacities can be in millivolts instead of percentages (beta feature).

- Post Android shutdown warning notifications at sc+10%, sc+5%, sc+300mV and sc+100mV (beta feature).

- Save data to /data/adb/vr25/acc-data/, for security reasons.

- Strip negative sign from current if battery is charging.

- Updated documentation.

Release Notes

- acc pause_millivolts resume_millivolts, e.g., acc 3920 3800, is yet another "cheap" alternative to direct charging voltage control.

- If you've been facing the "accd stops randomly" issue, share the output of acc -l tail as soon as you notice the problem.

- If you need more charging switches, try acc -p while charging; it'll print potential candidates.

The results can be batch tested with acc -t /path/to/list or acc -t file on off.

- Upgrading to this version will reset config.txt.

P.S., this project ain't dying anytime soon.

I just no longer have much free time to be around here reading and answering posts.

Thanks for all the support!

EDIT

Release v2021.7.28.1 · VR-25/acc

Advanced Charging Controller. Contribute to VR-25/acc development by creating an account on GitHub.

github.com

This fixes a weird issue that affects a small number of devices (especially MTK).

EDIT 2

Those who have curl installed, can upgrade to the latest snapshot by running acc -u dev -f .
[Magisk] 73sydney:
So i migth have been slightly wrong about this being dead, and wishing you'd all let it die :)

No offense @VR25, i thought you'd been far too busy with RL...
[Magisk] morgan3:
What is your kernel (if you're using a custom one) and/or security patch? I'm on July's patch and acc hasn't been working since I updated.
[Magisk] mindyabiznis:
I'm running protonASOP and proton kernel on my pixel 5

I'm on May security patch but only because I haven't got around to updating because it's a pain redoing root and setting up my magisk modules.
[Magisk] alirazahndpk786:
Can anyone tell me what to do with this ? I don't have any ideas what is this cycle through switching and also the bow do i make code for this ?

It's my first xda comment 😅
[Magisk] matejx_:
Deleted
[Magisk] Dratini:
You'd be better off just using a weaker 5w USB charger instead of doing it via software then. The maximum it'll do is 500mA. I think pixel might have built in limiter, maybe other phones do too. I do mine my temperature.
[Magisk] the_Pan:
How to disable this warning, or at least make it less annoying? ;)
[Magisk] thirtythr33:
I used ACC on my 6T the entire time, but upgraded to the 9 Pro, does anyone have any experience with ACC on 9 pro (omega kernel)?
[Magisk] nico1228:
Hi friends, I just stumbled on this module at magisk, at first I wondered why my phone stops charging when it reached 77℅ then I remembered this module I downloaded at magiskbso I installed its app and Im new to this, just wanna check if Im doing it right please my screenshot please, thank you
[Magisk] mwahahaa:
No longer works on my Pixel 4a 5G after August update. Tried with both proton kernel and elementalx.
[Magisk] robsonline:
I have the same issue. It worked fine until I applied the July update. I have not found a fix as of yet.
[Magisk] duttyend:
Did you try to reset all settings?

If it doesn't work, you can find excellent information in this section: troubleshooting
[Magisk] Darth Bidder:
It doesn't work normally for me. I only used it to charge the battery up to 80$.

I've used "acc 80 20" command in the terminal but it only charges up to 75%.

Just like what the others said, this only started on that July version update. I'm already using the newest version released last week but it didn't fix it for me.
[Magisk] duttyend:
I configured it via AccA and it charges up to 80% perfectly
[Magisk] Coldtrain6989XD:
Hey guys, I have Magisk installed jailbroken Pixel 4a rooted phone, and when I charge my phone, it goes to 73% then stops. How do I fix that, and is it simple? I thought it would be when I charge my phone with the case on it.