yashsingh1/xdaforums huggingface dataset:
[Magisk] VanGray:
Why not using a terminal to find which switch is working for you ?

you can do it once and then using ACCA after.

Juste plug a charger, type :

su

acc -t

and you'll find the list of all the charging swich you can use.

Find one with "charging switch true" then enforce it with

su

acc -ss

the charging switch
[Magisk] Zaxx32:
I didn't know that's how to find out. I've only ever worked with the 'front end' apps. Thank you for for the tip!

I've also been curious about the last 2 settings in AccA.

What is the proper syntax for setting 'apply_on_boot' or 'applyOnplug' to true. I've never messed with control files before and there not a lot of docs for Acc or AccA.

The last coding I've done was waay back in high school and a bit in college (basic, cobol and machine lang. lol)

If u can link me to any 'noob level' guides re: control files, I'm sure interested.
[Magisk] adek89:
can it be turned on somehow via adb? not having root?
[Magisk] BertProesmans:
Hi, I'm new to working with acc and own a Nothing Phone. Is it possible to share your acc configuration file?

I figured out "battery/charge_control_limit 0 battery/charge_control_limit_max" is the charging switch, forceOff is the approach acc persists those values to the system.

I'm curious if there are other variables interesting to tweak, and would like to learn more from a practical example.
[Magisk] Uluru25:
.. onl

Only to give you an idea: I use the ACC Settings front end to 1) limit the charging current, 2) limit the max. percentage of charging, 3) stop charging in case of elevated temperatures but 4) create a biphasic charging with a higher current in the beginning and a low current at the end. My motivation is to maintain a good battery health. Whether or not 4) makes really sense I don't know. See attached.
[Magisk] Arcline:
Can someone give me their opinion on my setup? The settings are pretty overwhelming, but after reading the documentation I came up with this:

- Shut down is unchanged, cooldown at 60, resume at 75, pause at 80. Automatic charging switches.

- Temperature: Cooldown above 42, pause at 46, shutdown 50;

- Cooldown cycle: Charge period 50s, cooldown period 10s, cooldown current 500mA;

- Charging switch: Idle mode first;

- Statistics: Reset on pause;

Basically I want to limit charging at 80%, limit temperature at around 42C and make the cooldown cycle via limiting current instead of pausing. Also prioritize input power instead of battery when connected at pause level and reset stats when charged. Is my setup correct?

Thanks!
[Magisk] BertProesmans:
I've been trying out acc since Monday on my Nothing phone. I cannot reliably put the phone into idle/slow charging mode monitoring the status through AccA and acc -i/dumpsys battery. But I've had minor success on wireless charging and USB slow chargers.

I've seen unexplainable things so far, probably because i'm handling it wrong; acca(CLI) lockups, accd crashes on valid config changes, accd seemingly sleeping when phone is locked, accd not taking new config changes etc

I suspect my computer's USB isn't a proper power source to work off, I suspect the power randomly drops to ~0Amps without accd running.

Fast chargers indeed keep pushing 2+Amps no matter what I do, which is documented in the readme.

Before calling in help I'm going to try on my own for another while.

I'm also considering moving over to AccA profiles and DJS, but as far as I can see it's not possible to encode force_off=true into AccA profiles.
[Magisk] panni:
I'm using the NP1 very successfully with the latest dev acc. I'm avoiding AccA right now as it behaves weird with it. I've posted my used config a couple of posts ago - this one is VERY stable for me. Upper limit is 80% and while charging using Qi it goes to 82% at most, over 10 hours. I'd say that charging switch works fairly well, but only with forceOff.

Edit: The 2% overshoot probably happens over hours and is not a concern for me as it's still low enough and probably at a very low trickle charge.

Edit 2: To make it more clear: I use AccA occasionally to check on charging currents, but only every couple of days. I've edited the config using the acc CLI, after setting the charging switch using acc, then editing my limits using the acc CLI config editor. I've stopped using AccA for anything other than monitoring.

As I've switched between acc versions, I've stopped using AccA to set the actual config. No issues.
[Magisk] disconmair:
Can you please share your config file?

Thanks.
[Magisk] panni:
configVerCode=202207300

ampFactor=
battStatusWorkaround=true
capacity=(5 101 75 80 false false)
cooldownCurrent=
cooldownRatio=( )
currentWorkaround=false
dischargePolarity=-
forceOff=true
idleThreshold=40
language=en
offMid=true
prioritizeBattIdleMode=false
rebootResume=false
resetBattStats=(false true false)
temperature=(40 45 90 65)
tempLevel=0
voltFactor=

applyOnBoot=()

applyOnPlug=()

battStatusOverride=''

chargingSwitch=(battery/charge_control_limit 0 battery/charge_control_limit_max --)

cooldownCustom=()

maxChargingCurrent=()

maxChargingVoltage=()

runCmdOnPause=''
[Magisk] disconmair:
I see in my config file, the chargingSwitch is set to

(battery/battery_charging_enabled 1 0)

.

Can you tell me what is the difference between yours and the default setting?

Thanks.
[Magisk] panni:
The difference is mine works :D (this is the only charging switch that worked reliably for me on the NP1)

Edit: No, seriously, mine limits the charging power, yours is a switch that if it works, it disables charging. The difference is that mine will still show the charging icon and yours won't (if it works).
[Magisk] Kasinel:
I have checked all the available swich for my phone (Poco x3 pro) and none of them work, could someone help me?

Rom: Evolution X (Android 12)

Kernel: Stock Evolution X

ACC Ver: v2022.7.30-dev

Front-end app: AccA
[Magisk] WhoIsJohnGalt1979:
Hello,

Need some guidance as to which switch to select from the 3 options where switch works and battidlemode is true. I have pixel 6 pro and charging using the 30w charger that came with it.
[Magisk] VanGray:
Try this one:

5/24: gcpm/constant_charge_current_max 1933090 0

switch: off (0) current: -0mA (Idle)

switch: on (1866420) current: -1378mA (Charging)

Switch works ✅

- battIdleMode=true
[Magisk] WhoIsJohnGalt1979:
@VanGray Thank you for your guidance. I did use acc -ss and set the switch to the one you suggested. Currently the config.txt looks like this:

configVerCode=202207300

ampFactor=

battStatusWorkaround=true

capacity=(5 50 84 85 auto false)

cooldownCurrent=

cooldownRatio=( )

currentWorkaround=false

dischargePolarity=+

forceOff=false

idleThreshold=40

language=en

offMid=true

prioritizeBattIdleMode=true

rebootResume=false

resetBattStats=(false false false)

temperature=(35 45 90 55)

tempLevel=0

voltFactor=

applyOnBoot=()

applyOnPlug=()

battStatusOverride=''

chargingSwitch=(gcpm/constant_charge_current_max 1933090 0 --)

cooldownCustom=()

maxChargingCurrent=()

maxChargingVoltage=()

runCmdOnPause=''

What I see happening now is after reaching 85% the phone keeps detecting charge and keeps waking up while the battery% fluctuates between 86 and 85. Ideally, shouldn't it stop charging and resume when it goes below 84, so that the charge remains at 85 even though the charger is connected to the phone?

Please ignore my naivity in asking these questions.
[Magisk] VanGray:
It depends on the kernel though. You can try another Rom or another kernel. For Poco X3 pro, some user reported that Arrow OS 12.1 with No Gravity Kernel v2.0.0 and Charging switch: battery/charging_enabled 1 0 -- is working

After setting the charging switch either on app or terminal, a device reboot is necessary
[Magisk] VanGray:
It should stop charging and behaving as you said! I see that that battery idle mode is "true" in your configuration.

Try to change is to "false" and see if it works.

If I doesn't, you can try to enforce the two other switches and see if it's all OK
[Magisk] VanGray:
Yes I think it's all good!
[Magisk] Gerard03:
I have a nothing phone and when I set a limit it doesn't stop and it shows an error daemon 7 when it reaches this limit
[Magisk] panni:
Use the latest beta (acc -u dev) and "(battery/charge_control_limit 0 battery/charge_control_limit_max --)" (in the config) as charging switch and forceOff=true.

This will not visually stop charging, but won't deliver any charge at the limit. Works pretty great.
[Magisk] freonchill:
any idea why AccA crashed on load? I know its over a year old, but would love to have it back for when the daemon crashes and it auto-restarts it...
[Magisk] Gerard03:
What do you mean by not visually stop charging?
[Magisk] panni:
The icon will not change when the limit is hit.
[Magisk] Gerard03:
Ok thanks
[Magisk] xtacb4:
Hi!

I have a Xiaomi Mi Mix 4 with LineageOS 12 rooted with magisk, and acc is unable to cut the battery charging.

How would I go about throubleshooting the issue? I reckon it is probably a compatibility thing, thus, what charging switchs could I test?

Using acc via terminal, no switch worked.

Thanks!
[Magisk] samhhmobil:
I had similar trouble with the latest build (after many years without any issue).

Downgrading to build v2021.12.20 did fix this issue. Now again it works as it should. :-)

samhhmobil
[Magisk] xtacb4:
Hi and thanks, it worked!! many many thanks!
[Magisk] NYLimited:
Hi everyone,

I could use some help or suggestions if anyone has ideas. I am running ACC on a OnePlus N200 and it worked great for a while but at some point it started to ignore the capacity_resume percentage. Occasionally it ignores the capacity_pause percentage and charges to 100%. As an example, let's say I set resume=70 and pause=80. ACC almost always stops charging at 80%. Seriously reliable. But, if I plug the device in at, say, 75%, charging should not begin if I understand things correctly till the level drops below 70%.

I cannot prove this yet but it *seems* that updating the ROM (using LineageOS 19.1 which tends to update weekly) somehow breaks the resume function. No idea if this is actually possible (the /data/adb directories should not be touched by an update) or if it is a coincidence. Uninstalling and reinstalling ACC, sometimes a few times, eventually fixes the problem. I have attempted to set/reset config values via ACCA.APK, via ACC in Termux and also via RootExplorer's built-in text editor. I suspect the config file is okay.

Am currently running v2022.7.30-dev version.

Can anyone give me a hint what I might be missing and how I could fix this little issue? Any ideas would be appreciated.
[Magisk] samhhmobil:
Try downgrading acc to v2021.12.20.

For me this was the solution (on three different devices, but all running LOS19.1).

samhhmobil
[Magisk] palopaxo:
Same problem here w 19.1
[Magisk] NYLimited:
Thanks. I saw a mention of that earlier and just downloaded it to try later today. 👍
[Magisk] NYLimited:
I installed the 2021 version and it charged to the correct capacity_pause percentage at which point it stopped charging as it should have. Will have to wait to drop down and test the capacity_resume next.

If that works I will apply the next Lineage update in likely a week and see if anything breaks.
[Magisk] NYLimited:
The capacity_resume failed just like on the more recent versions. My resume was set to 70%, pause was set to 80%. Charging did stop at 80%. Once it dropped down to 78% I plugged it in again and it began to charge. On the wall charger (not a Warp charger) it reported charging rapidly and charging did not stop. Connected to USB on a computer it seemed to alternate between charging and discharging every 3 or 4 seconds (not the cooldown seconds specified) and was charging very slowly.

Sadly the 2021 version did not do the trick for me.
[Magisk] HRSE:
For Xiaomi stock ROM: It seems like the recent update of "Security" app or "System service plugin" app breaks acc v2022.7.30-dev. After downgrading acc to v2022.2.22.1, everything works again. Need feedback from more users to confirm.

I'm using Redmi Note 9 Pro Global (joyeuse) MIUI 12.5.7 Android 11. Third-party ROM users please don't quote or reply to this ; I need inputs from Xiaomi stock ROM users only, thanks.
[Magisk] NYLimited:
In addition to the charging indication on the lockscreen (which I understand is not always reliable but mostly is indicative of charging on the OnePlus N200) there are apps which show battery status. Among them the ACCA.APK app on F-Droid. While the app is getting older it does show charging status quite reliably even if not used to alter the ACC config file.
[Magisk] NYLimited:
Well, this may be a last post here since no obvious answers are available. I suspect @VR25 is busy with other projects since the DEV version has not been updated since late July and he has not posted here in a while.

As a last observation, should it help anyone, the capacity_resume switch seems to work fine, exactly as intended, when the phone is plugged into the computer USB port. The switch seems to be ignored or not capable of working as intended when the phone is plugged into a wall charger (brick) - the type does not seem to make a difference. I have tried the OnePlus Warp charger, the OnePlus charger that came with the N200 and a generic charger. They all report "charging rapidly" on the lock screen and charging resumes as soon as the device is plugged in, regardless of ACC settings.

Yet, the capacity_pause switch does work with all chargers and charging stops before 100%, as indicated in the ACC config file.

Moving on to other projects ...
[Magisk] maliciousd12:
I can't get this to work.

The ctrl file is wrong and ACC takes an awful long time to test this path and it fails.

I tried directly in the Terminal

echo 65 > /sys/devices/platform/google,charger/charge_stop_level

/system/bin/sh: can't create /sys/devices/platform/google,charger/charge_stop_level: No such file or directory

So what is the proper setup for Battery enabler or ACC. I can't seem to find the proper ctrl file location? Android 12 SQ3A 220705.003.A1

Thank you!
[Magisk] Churchthecat:
Hi, got evertything going good on my oneplus3T lineage 18.1, magisk,no gapps phone. The project I'm doing is making my car smart and I'm using this phone as the heart of the system. I am stuck at one final thing to get everything working as I want. To make phone boot on power connected. Is there a way to do this using AccA? Or any other ideas? Thanks
[Magisk] HRSE:
Have you tried any of this https://android.stackexchange.com/q...ower-on-android-when-the-charger-is-connected
[Magisk] Churchthecat:
Hi and thanks, I tried the fastboot command no change.

Tried to locate the LPM or equivalent file , no luck.

Editing the boot image is the final thing to try. But a step by step guide would be nice to have for that. I was hoping there would be an easier way using AccA.
[Magisk] HRSE:
a very old guide for samsung device https://xdaforums.com/t/q-power-on-when-plugged-in-boot-when-docked.1187631/post-77766638

the final thing to try is hardware modding (open up the phone and connect some wires to the power button linking to the external circuit that generates a one-shot signal when power is applied)

EDIT: I think you have a better chance of success if you ask the lineageOS devs directly instead of asking around.
[Magisk] Churchthecat:
Found the solution :) easy fix :) https://github.com/hasanbulat/android-autoboot/issues/1
[Magisk] xerel89:
My phone is not charging when I have flashed the module!
[Magisk] HRSE:
Brand, model, ROM, kernel, logs?
[Magisk] xerel89:
Xiamoi Redmi Note 9 Pro

Lineage 19.1

Android 12

lineage_miatoll-userdebug 12 SQ3A.220705.004 c7eb441795

How I can create the logs?
[Magisk] HRSE:
I have same model, stock ROM and acc is working. Please read through the documentation https://github.com/VR-25/acc/
[Magisk] xerel89:
Now I have read the text but I hit the charging to 100% and is loading only 90% and where can find out I can change the temp is always overhead and reboot...
[Magisk] Bruno25:
Thank you for this great tool!

I used it on my Redmi Note 4 (under Lineageos) where it really improved the battery lifespan.

Before using ACC, I had to replace the battery every year... Since I use ACC (~3 years), I didn't have to replace it a single time :).

But my touchscreen was starting to fail... I then switched to a brand new Redmi Note 11.

On this new phone, I could not yet make ACC works. I tried all the switches... the phone either do not charge or do not stop charging... I also tried the latest dev version without success.

Anybody has a working configuration (or switch combination) for ACC for Redmi Note 11 (Model 2201117TG, Snapdragon 680, MIUI Global 13.0.4, Android 12 SKQ1.211103.001, Magisk 25.2)?
[Magisk] zzenyoo:
Try custom kernel? 🤷‍♂️
[Magisk] Bruno25:
Answering to myself...

The switch that works is battery/input_suspend.

When I use it manually (e.g. echo ¨1" > /sys/class/power_supply/battery/input_suspend) it effectively suspends or resumes the charging.

But from ACC, it works for some minutes only.

I adapted a script that I found somewhere (I don't remember where).

It can be saved as battery_limit.sh in the home directory) that is launched through Termux shortcuts (as root, e.g. su -c /data/data/com.termux/files/home/battery_limit.sh).

#!/data/data/com.termux/files/usr/bin/bash
MIN=70
MAX=75
CONTROL_FILE=/sys/class/power_supply/battery/input_suspend
CAPACITY=/sys/class/power_supply/battery/capacity
REFRESH_INTERVAL=60

while true
do
CURRENT_LEVEL=$(cat $CAPACITY)
echo 'Battery level: ' $CURRENT_LEVEL
if [[ $CURRENT_LEVEL > $MAX ]]; then
echo "1" > $CONTROL_FILE
echo 'Suspending charging'
fi

if [[ $CURRENT_LEVEL < $MIN ]]; then
echo "0" > $CONTROL_FILE
echo 'Resuming charging'
fi

sleep $REFRESH_INTERVAL
done

It has less blows and whistles than ACC, but it works like a charm.
[Magisk] NYLimited:
Have you tried using ACCA.APK? It is available on F-Droid ...
[Magisk] HRSE:
side note: Both AccA and AccSettings app have compatibility issues with new versions of acc. But they still work fine in some cases.
[Magisk] blksith0:
My phone is plugged in for 90% of the time.

What settings do I need to configure?

Is the default acc configuration sufficient?

Okay I just read this:

Now I just need some guidance on how to configure this stuff and how to quickly switch profiles.

Please and thanks.
[Magisk] HRSE:
AccA was meant for that purpose, but it has not been updated for a long time, and the newer versions of acc are not 100% compatible with AccA. I suggest you play around with AccA first, but if you encounter issue then you need to uninstall AccA/acc, reinstall acc, and configure without the GUI.

I remember acc documentation has info regarding switching profile, but I'm too lazy to do everything myself at this point of my life.
[Magisk] HRSE:
thanks for sharing the real-life effect of acc on the battery.

acc repo should have similar code.

does your code make the phone never enter deep sleep/doze? or when in doze state, this code doesn't run at all?
[Magisk] petanque:
Can this be used to disable charging?

I have a device without a battery, it crashes when the usb is connected and I think it is because it is trying to charge.

Does anyone know if this can be used to completely remove charging and how?
[Magisk] Uluru25:
You could try to define that charging should start at 100 % battery charge or you could try to reduce the charging amps to 0 mA. Nevertheless, I doubt that it will work. Have you already considered to manipulate a USB-cable so that it only transfers data? See here: How to make a USB cable that only transfer data but do not charge? Or where can I buy one - Quora

How can I make a USB cable that only transfer data but do not charge? Or where can I buy one?

Answer (1 of 7): Yes this will work! Somewhat depending on your application though. Other answers to this question might not be directly wrong, but they do make assumptions about what you plan to use your cable for, which I can’t see you ever stated in your question. You need to isolate the +5V...

www.quora.com

Surely no guarantee from my side!
[Magisk] petanque:
Thanks for your help, unfortunately a cable without 5v will not work on my device.

I try the other things, I think it will work because there is no problem when I insert the cable while the battery level is at 100%
[Magisk] Samip430:
Has anyone been able to get Battery Idle mode working on Pixel 1? AccA says stock kernel doesn't support the mode. Any alternatives?
[Magisk] CBMC:
Is anyone on a pixel 7 pro able to use any charging switch reliably? I am having issues with all switches that I have tried.
[Magisk] gigavolthavoc07:
Guys what do you recommend for charging your phone till 75% but only once?

acc -e 75% or acc -f 75 ?
[Magisk] jac0b:
On version 6.4.2022 the below switch seems to be working on my Pixel 7 Pro.

gcpm/constant_charge_current_max 1933090 0
[Magisk] RealNBB:
Hello,

Unfortunately, ACC does not start the charging process for me when I connect the cable. I have to select one or the same profile again every time, only then does it work.

I can't make sense of the log. But maybe someone here has the desire and time to look at the whole thing and possibly give me a tip.

Thanks in advance!

Link to Log File:

https://tusd.tusdemo.net/files/c914bfa354b8fbe3d8d91764da9aa716+ENn_MS152DKMA.zATweFdpdE9YOfnci9DYeojgpOuwdoqfziIYAz87eSWHL90LJyqIpzCtA2NlcDj0IDBlcUd.q4ySyt5aGmZsgjsY07rTdr4MRsWArmJXHp4gRoj1Ru
[Magisk] jac0b:
That switch was not idling correctly and changed the switch to 4300 and idle is working now.
[Magisk] CBMC:
I can't find a switch to reliably idle. It might work one time but then not the next. Also some of the switches will randomly start discharging when active on the pixel 7 pro.
[Magisk] jac0b:
What version do you have installed?
[Magisk] Zaxx32:
Lil help with listing all the acc front-end apps...

1 AccA

2.AccS

3 Battery Limiter 1.1.1

That's all I've really seen...Tia for more!

Since I'm not a coder, just trying to figure out the best front end app for me. :(
[Magisk] CBMC:
I was using version 6.12. I also tried the newest version. The test was showing idle worked at times, but in practice it was erratic.
[Magisk] jac0b:
I am on 6.4 and haven't had any issues. I was having similar issues on newer versions.
[Magisk] bunklung:
Anyone with a Pixel 7 (NOT pro) have ACC working? I usually just use the front end ACCA 1.0.35 (39) on my old Pixel 5 and I had no issues. I see the magisk module (2021.8.31) installed and everything looks good, but accd seems to stop when it hit the cutoff level I select.

*edit* I set the changing switch to "0" from "automatic" and left "automatic cycle through switches" on (I don't know if this is even necessary since I have "0" selected) and everything works again. I did this right in the frontend. I was not able to figure this out with "acc -t" in terminal.
[Magisk] CBMC:
Mine seems to work and then randomly it will keep charging past my cut off point or, more often not idle correctly. I have tried both versions recommended on this thread and the newest. Might just go down the line and see if any version works now reliably.
[Magisk] piplok:
Did you find working settings on Pixel 6a? Could you help me?
[Magisk] Extreme_Ninja2099:
Does ACC work on Android 13? I'm currently using stable v2022.6.4 version and it works perfectly on A12.1. Not sure if I should update to A13 or not as I do need ACC as it's been amazing at stopping my device from changing after 86%

Update: ACC does work on A13 as a friend of mine used it on Nameless A13 custom ROM
[Magisk] demil7:
I'm on a Pixel 7 Pro with issues as well, simple doesn't stop charging, and ACC actually turns off and I keep having to re-enable it manually.

I don't see version 6.4.2022 in the dropdown and I don't see switch 4300 in the dropdown for switches.

I've tried switch '0' and version 'Bundled' with no success.

I'm a noob, any help with detailed instructions on what I need to do to make this work on Pixel 7 Pro is very much appreciated 🙏🏻
[Magisk] z00man:
Heres also pixel 7 problematic lol Tried acca from fdroid and with different versions, dev, master, bundle etc none of them stop charging desired level..
[Magisk] Mrmcfeffers:
F-droid acca uses an old version of acc