yashsingh1/xdaforums huggingface dataset:
[Magisk] Uluru25:
... as you (and I) already mentioned: if you define a mcv this will also define your max. possible charging percentage being equivalent to that battery voltage. High(er) voltages are stressing the battery as well as too high or too low temperatures during charging. Higher voltages can be avoided with a mcv-limit (but directly affecting the max. charging percentage as explained). Higher temperatures can be avoided with reduced charging currents via mcc. Alternatively to a static limitation via mcc you could dynamically limit the charging current via the cooldown temperature / max. temperature. This is what I actually do (having a limited mcv, ct, and mt) but for sure other ways are possible.

🤠
[Magisk] laur89:
Didn't take the warning seriously enough and bricked xiaomi 9T - it crashed at one moment, got stuck at boot screen after forced restart, eventually the battery died and it no longer charges nor shows any sign of life whatsoever.

1. Are there any Poco F5 users using acc here, or should all Xiaomi phones steer clear from the module?

2. Does anyone know whether replacing the battery could revive the bricked phone?
[Magisk] Uluru25:
I don't think that this is directly related to acc. By the way I am running a Xiaomi Redmi Note 8T w/o such issues. To increase the chances that someone can help you, you should post more details especially what means "bricked" in your case, what was the configuration of acc (sc value), the charging percentage at that moment etc. If it really doesn't react in any way to connecting with the charger, to trying to boot into the recovery or into fastboot mode, it seems to be a totally exhausted battery. Have you already tried to charge it with a different cable and a different charger? Post your issue also in the Poco F5 xda-thread.

If nothing helps, consider to ask also in the acc telegram group. I read there some times ago the advice to put the charger in the socket and to connect/disconnect the charging cable hundred times to the phone.

Anyway, good luck!
[Magisk] laur89:
By 'bricked' I mean no sign of life - device (9T pro; mentioned F5 only as it'll be likely my next one) doesn't start, doesn't charge (doesn't even get warm when cable is plugged). Tried number of cables and 3 different charging blocks, including the ones that came with the phone. Also tried the connect-disconnect cycles mentioned in the telegram group.

acc config was default besides the switch that was changed to one supporting idle mode (and appeared to be working somewhat fine, albeit overshooting a bit).

Battery by now is more likely than not fully exhausted, but I don't have means to really verify it.
[Magisk] vhayes:
s6 lite best charge switch seems to be test_mode 2 1

hopefully this saves someone some test time
[Magisk] seemebreakthis:
Hi - new to acc, just installed it, read the documentation at github but still confused about the following as a noob:

1. I entered "b" and went through the "test charging switches" function. Seems like switch number "6/12" and "7/12" (namely "battery/constant_charge_current 5850000 0" and "battery/constant_charge_current 5850000 10000") are both passing with flying colors, and these two are the only ones that passed the test with battIdleMode=true. Now I think I am supposed to do "acc -ss" to actually set the charging switch (now that testing is done) from "automatic" to either 6 or 7. But my question is: Which one of the two? 6 or 7? Does it matter as they both passed the test with battIdleMode=true.... ?

2. After using "acc -ss" (I went ahead and picked 7 for now), how do I check and see which charging switch acc is actually using (to make sure I have set it correctly, and it doesn't stay in "automatic", etc)

3. My battery has been used for 2 years and already in a 'dying' state - when discharging, once it reaches about 25%, it would dip down to 1% in a matter of minutes. Should I use the "a) Reset battery stats" in acc's main menu in hopes that it will make my phone reflect the TRUE state of charge of my 'dying' battery at any given time?

4. I am ordering a new battery for my phone. Once it is installed, should I use the "a) Reset battery stats" in acc's main menu when using the new battery for the first time?

(Edit: my phone is a Xiaomi Mi 11. Using acc's default config (mainly because I don't even know how to change anything in it yet, and what effects the parameters do), and the only 'customization' so far is the charging switch selection which I THINK I have done correctly to utilize one of the ones that supports idle mode. Fingers crossed I won't run into issues @laur89 experienced in this comment)
[Magisk] Uluru25:
First of all: welcome here!

1) doesn't matter. If you have observed from the testing that one of the working switches was way faster recognized than the other, you can take this

2) either run acc -ss once again and look at the first line and the trailing "- -" or run acc -sp to see the same in your config or open the config.txt with a root exploree to see it there.

3) & 4) no, this only clears (resets) the charging history which is shown when you open the battery settings in androids settings menu.
[Magisk] seemebreakthis:
Thanks @Uluru25 for helping me (and others) out ! Getting up to speed and now starting to set day and night profiles and exploring with cooldown limits etc etc.

One question that I have now - is there a way to check if acc is CURRENTLY applying any charging power limits? When I do "acc -i" (or select "e" in acc menu), I see a lot of information on the charging current, charging power, etc, but whether acc is doing anything at all to alter (limit) the charging power in that moment seems to be unclear to me. Anyway to check?

Would like to check so it would be easier to know if I have done something stupid in my configuration, or if something unexpected is happening...
[Magisk] Uluru25:
1) ... "acc -w" (which can be configured in several ways) shows you actual values, you could filter the results like "acc -w curr,volt" or even more friendly for the eyes "acc -w(5) current_now,voltage_now". The (5) defines the update interval in seconds.

2) Or you use an app which monitors the charging progress. I have Battery Log installed (see screenshot)

3) In addition I use a macro reporting the charging process. An early version was posted here.

🤠
[Magisk] seemebreakthis:
I have a night profile setup to limit the full charge to 50%. My night profile kicks in at 10:00 p.m.

But I found that if I reboot the device say at 10:01 p.m., the default profile would once again be active.

I can see why it behaves this way, as the night profile is merely a command line statement to send an instruction to acc at precisely 10:00 p.m.. It never actually changes the config file. So once the phone is rebooted, whatever the original parameters in the config file would once again take over.

Is there a good way to make the night profile (or profiles at different times of the day for that matter) survive a reboot?
[Magisk] Uluru25:
... possibly yes. Beforehand, please let me know which version you run by acc -v. Furthermore, please post the result of acc -s p "; at"
[Magisk] seemebreakthis:
Thanks for helping out !

acc -v says "v2023.10.16 (202310160)"

acc -s p "; at" says

: day profile; at 8:00 "acc -s pc=100 rc=95 mcc=9999; acc -n 'Switched to day profile'"
: night profile; at 22:00 "acc -s pc=50 rc=49 mcc=500; acc -n 'Switched to night profile'"
: sunrise profile; at 7:00 "acc -s pc=100 rc=95 mcc=500; acc -n 'Switched to sunrise profile'"
[Magisk] Uluru25:
I recommend you to update to the last but one (!) dev build v2023.11.26-dev which works on my phone very stable regarding profile switches.

You can do this by entering

acc -u v2023.11.26-dev

Next you should get rid of the existing profile lines. Do this with

acc -a d profile or restore the default config via

acc -s r

Finally, add the profile scripts in the new and very easier syntax, e. g.

acc -c a : day profile, at 8:00 acc -s pc=100 rc=95 mcc=9999, acc -n Switched to day profile

and accordingly for the other profiles.

Don't expect that the profiles fire timely "at the minute" if the phone is unplugged, in my case this is often delayed by up to 15 min. But if your phone is plugged to the charger, the appropriate profile will fire very close to the scheduled time (keep in mind that timely firing of the profiles is only needed if you are plugged!) These schedules surely survive re-bootings of the phone (but acc can only control the charging process if the phone is powered on).

🤠
[Magisk] Admiral2145:
Has anyone found the correct switch for the Pixel 8 pro?...

Sent from Pixel 8 Pro using ReLabs
[Magisk] Uluru25:
... let us know!

Enter acc -t, follow the instructions, have patience for the test being completed, and then post here!

🤠

... or try this, which was recommended by a user in a tg-group:

/sys/devices/platform/google,charger/charge_stop_level 100 battery/capacity
[Magisk] kaigetsu3:
Hi. Can someone please tell me what is going on with my tablet?

I like this app so much that I root my device just for it, so I would love some help.

Lenovo Xiaoxin Pad Pro 12.7 (TB371FC)

ZUI 15.0.154

ACC v2023.12.3-dev

When I start the daemon, it stops with the following error.

/data/adb/vr25/acc/accd.sh[717]: currFile: parameter not set
418: exxit
88: exitCode=1
89: false
89: set +eux

Also, running acc -i or acc -w freezes or restarts the terminal.

For acc -i, it freezes after displaying the word "Uevent".

A detailed log file is attached.
[Magisk] Uluru25:
... not being able to review your log, but a few questions in to try to help you:

1) you have magisk as root solution or KernelSU or what else?

2) did you install the acc.zip from within magisk?

3) did you rebooted you phone?

4) try to reset the config by "acc -s r"

5) does then the acc wizard open if you enter "su -c acc" in the terminal?

6) were you able to test the charging switches from the wizard or via acc -t?
[Magisk] Donut_Man:
Try the following one, it works on my P7 pro and probably should on the 8 as well:

/sys/devices/platform/google,charger/charge_stop_level 100 battery/capacity
[Magisk] kaigetsu3:
1) I rooted this device with magisk.

2) ACC installed on magisk via zip.

3) The device has been rebooted multiple times.

4) I did. But the situation remains the same.

5) The wizard starts without problems.

6) acc -treturns the following output.

This may take a while...
Ensure the charger is plugged
Hang on...
/system/bin/acc[708]: curThen: parameter not set
/system/bin/acc[708]: currFile: parameter not set
10
[Magisk] Uluru25:
... regarding 6): have you plugged in the charger and were your charging reasonably below 100 % (e. g. @ 70 %)?
[Magisk] Admiral2145:
I'm using that now... That's still isn't a switch that allows for control like for the pixel 6 series... Where you can have it hold charge between say 80 and 85%.

Sent from Pixel 8 Pro using ReLabs
[Magisk] kaigetsu3:
Regardless of whether the charger is connected or not, acc -t returns the same answer. I think the battery level was about 20-30% when I tried it.
[Magisk] Uluru25:
... then I recommend you to post your issue also here: https://t.me/acc_group

where the dev seems to be more active...
[Magisk] Donut_Man:
I just set the resume capacity at 79 and stop at 80, it uses idle mode to stay at 80 on mine.
[Magisk] kaigetsu3:
Thanks for the advice!

I will write to TG as well.
[Magisk] ratelutz:
just to be shure!!

you have switched to su in the cli prior running acc -t??
[Magisk] kaigetsu3:
Thanks friend!

I use Termux to run the acc command as a superuser(The command was not recognized unless su).
[Magisk] ratelutz:
yep you need to su inside termux
[Magisk] kneejerking:
anyone knows which switch works on pixel 4 on A13? I already turned off the battStatusWorkaround and did a acc -t but none of the switch seems to work
[Magisk] Uluru25:
... I assume you already have updated to a recent version (what gives acc -v)?

To check more potential switches you could try acc -t p

the dev explained it as follows:

"acc -p simply lists potential switches. You can save them to a file and test with acc -t file.

However, acc -t p automates that for you and even adds the working switches to the list of available switches. It let's you edit the list of potential switches before running the tests."
[Magisk] kneejerking:
Whats the best setting if if I keep the phone plugged in 24/7 without idle mode available? is it still "acc 50 45" like in the guide? or should I keep it "acc 45 44" or acc 50 49?
[Magisk] Uluru25:
I would try to

1) keep the battery in the "healthy" percentage around 50 %,

2) but reduce too much charging cycles,

3) to limit deleterious effects of high voltages and temperatures.

Thus, I would set rc/pc to 40/60, reduced mcc to 500 and (if supported by your kernel) reduce mcv to something like 4000 (check if this value allows charging to something in the range of 60 %, otherwise increase it in steps of e. g. 50 mV)

"acc -s rc=40 pc=60 mcc=500 mcv=4000" could be your command.

🤠
[Magisk] Vovan2k:
Advanced Charging Controller (ACCA) app from F-Droid, it worked on Android 11, but on crDroid 9.9 (Android 13) service always getting stopped even though battery optimization is disabled, every morning i find my phone 100% charged and message inside ACCA - acc daemon is not running, after starting ACC service next day same thing.

Spoiler content hidden.
[Magisk] Uluru25:
Acca and Acc settings are front ends which are heavily outdated and lack updating since a long time. On the contrast, acc (a kind of magisk module) is frequently developed so that it is recommended to deinstall any front end (gui) and ti install only the acc.zip which can be configured with a few easybto learn terminal commands.
[Magisk] Uluru25:
Afraid of using the terminal? Don't panic!

... basically, you only need to remember three "commands" in the terminal:

1) "su" to switch to the root (or superuser) ; do this once after launching the terminal app so that the prompt changes from "$" to "#"

2) use "acc -s xx=aa" where xx is the abbreviated name of the parameter to change and aa is the value (in most cases a number", e. g. "acc -s pc=80" to set the pause capacity to 80 %. Get the full list of abbreviations for the parameters e. g. from the helpfile in GitHub. Do this one by one for all parameters as you like (or see below a way to speed it up).

3) when your settings are done via the above command, enter "exit" to leave the root user (the prompt will change back from # to $) and enter a second time "exit" to close the terminal app. For sure, you can also close or leave the terminal app by all other standard android methods

For 99 % of what you might want to configure, these three very simple commands are enough.

As promised, two hints to speed it up:

4) Instead of entering line by line a series of "acc -s xx=aa" commands you can define several parameters within one single line, e. g. "acc -s pc=80 mcc=1500 mt=35" which will set pause capacity to 80 %, max. charging current to 1500 mA, and the max. temperature to 35 ºC.

5) If you use "su -c acc -s xx=aa yy=bb zz=cc" instead of what is described in 1) and 2) you don't need the extra "su" command and you only need 1 "exit" to leave the terminal.

A note for all terminal experts (which I am surely

not

): I know that there are hundred other ways to configure acc and to use the terminal, but I prefer a KISS approach (keep it simple and successful). I have posted this here for the only reason to refer to it, if the next (new) user "vomates" here about his/her obstacles with the terminal commands...

:cowboy:

see here and scroll in the section "standard configuration" till "// ALIASES" to see the list of abbreviated settings and in

// FINE, BUT WHAT DOES EACH OF THESE VARIABLES ACTUALLY MEAN? what they mean.
[Magisk] Uluru25:
A (personal) recommendation to enhance battery longevity:

Assumed you want to prolong longevity of your battery:

1) limit the temperature by "acc -s mt=35 rt=33r", thus during charging your battery temperature won't exceed 35 ºC and will cool down to 33 ºC before starting the charging process again; if 35 ºC is too low for you, take higher values but remain with mt below 40 ºC

2) if temperature is controlled you don't worry about the charging current (because this is only limited to avoid elevated temperatures)

3) leave the predefined pause and resume capacities or choose your preferred values (should be below 80 %); you can change it by "acc -s pc=75 rc=70" e. g.

4) limiting the max. charging voltage (if supported by your kernel!) is a good idea to prevent elevated voltages. The mcv chosen by you corresponds to a given max. battery percentage (even if you have defined a higher pc). 4100 mV corresponds (with my phone) to ~72 %, 3900 mV to 48 %. Use "acc -s mcv=4100" e. g.

Other guys might recommend you different values but the principal things remain: limit your max. charging percentage, limit the thermal stress, avoid frequent re-chargings (e. g. again and again from 79 % to 80 % as soon as the battery looses 1 %)

🤠
[Magisk] Uluru25:
New syntax to append profile script lines:

If you want to add profile script lines to trigger changes of your profile settings at a defined time point, the new syntax is:

acc -c a : day_profile, at 6:00 acc -s mcc= pc=75 mcv=4100, acc -n Switched to day profile

acc -c a : night_profile, at 22:00 acc -s mcc=500 pc=50 mcv=3900, acc -n Switched to night profile

To use this easy syntax, you should update to the latest dev build by "acc -u dev" beforehand.

edit: for the time being, don't use the latest dev build, but this build (also available here at the very bottom)
[Magisk] Vovan2k:
Actually ACC from github is picked up by ACCA front end from f-droid and works fine now from GUI (ACCA app). just had to install more up to date version of ACC
[Magisk] Uluru25:
... fine if it works for you (but don't expect to be able to use the new features of acc with Acca or Acc Settings front ends)

🤠
[Magisk] byproxy:
I just read on a CalyxOS thread that ACC can work with just busybox installed on a non-rooted phone. Is this correct?
[Magisk] Uluru25:
No! You don't need magisk, but you need root.

See here.
[Magisk] eried1:
So I have a problem that I can't quite figure out: When the phone goes to sleep the charging limit seems to deactivate. Magisk Delta is white-listed so not battery-optimized. Should I do sth more? Have I missed anything?
[Magisk] Uluru25:
... has acc still superuser rights?
[Magisk] laur89:
Do you keep an up-to-date version of the macro somewhere? e.g. github?
[Magisk] Uluru25:
... going to upload it here in the next few days

🤠
[Magisk] Uluru25:
Macro to write some values like batt. temperature, charging current, charging voltage, batt. percentage, selected acc-config parameters, etc. to a. txt file during charging

edit: updated here

This post is an update to a previous post here, providing a MacroDroid macro to monitor during charging some related parameters over the time depending on the respective acc settings.

If you want to use the macro, download it, rename it to .macro and import it. It will start automatically when the charger is plugged.

Now, some comments have been added as explanations. Also at the very end of the macro, a long comment tries to explain the used variables.

Four variables (as explained and indicated with a @) can be configured: one defining the file name base (and path to a subfolder if preferred) and three to define the changes in battery temperature, charging percentage, and time since last reporting in order to adjust how much values should be reported.

See enclosed also two typical reports: one during a "config-controlled" charging cycle and one showing a manual charging ("acc -f xx").

Final note: don't wonder about some "complicated" approaches in the macro: I tried sometimes easier approaches but the chose different solutions if the easier ways failed...

😉
[Magisk] samhhmobil:
May I come back to this again?

With Samsung Tablet SM-P610 (LineageOS20) it now works fine with manually set dp=-

Great.

With Xiaomi gauguin (Mi10T lite), LineageOS19, it works fine without any manual corrections.

But... with OnePlus8 (instantnoodle), LineageOS20, it asks for unplugging charger and plugging in again, it sets then automatically dp to minus (-), but it doesn't work.

acc v2023.10.16 does not stop the charging at the given limit, it seems just only to slow down the charging, but it is - even slower - charging higher than the given limit.

Any new hint please?

Thanks a lot,

samhhmobil
[Magisk] Uluru25:
... deleted
[Magisk] Uluru25:
... assuming you have no gui installed, (otherwise deinstall it first) :

1) update to the latest build via "acc -u dev"

2) reboot the phone (just to be sure)

3) if needed, uncharge your phone to < 80 %

4) test the charging switches via "acc -t"

5) reset acc to the default config via "acc -s r"

6) upload the result here

Then I will try to help you...

🤠
[Magisk] eried1:
I actually can't find it in the list, but don't have the frontend app so I suppose it is normal. How do I reenable root for it to make sure?

Now also my tablet started to have problems:

Getting a notification that discharge_polarity isn't set and that I should unplug. This always shows up though and unplugging makes no difference. Think I got the same message on my phone.

Tried resetting acc via rm /data/adb/vr25/acc-data/config.txt but it didn't help.

Edit: Seems like acc processes are terminated. Can't do the test of switches because it always says 'terminated'.

Edit2: After setting discharge_polarity manually my issues seem resolved.
[Magisk] eried1:
How to check mcc support and the corresponding battery level for mcv=4000? As for mcv I recall using an acc command at some point, but can't remember which.
[Magisk] Uluru25:
... apply a setting with a mcc limit e. g.

"acc -s rc=40 pc=60 mcc=500 mcv=4000", start charging, and monitor if the current is limited acc. to your settings. For this, use e. g. this app or the MacroDroid macro uploaded here.

Regarding corresponding percentage to a certain mcv-value: just define the desired mcv and let it charge until no further change in percentage occurs. This could also be done with the a. m. macro.

🤠
[Magisk] Uluru25:
... I was wrong with su-rights for the acc module, it only needs to be flashed with magisk...
[Magisk] VR25:
acc -w
[Magisk] VR25:
This has been fixed.

Upgrade to the latest development build with acc -u dev.
[Magisk] Depressed T.Bear:
Hi there, I’ve been searching this thread but couldn’t find an answer. I successfully installed ACC and tested it, however it didn’t work the way I thought it would.

I monitored power, current and voltage using the Wattz app. It was all the same as without ACC. I thought f.e. that the current would be limited to 750 or 1000mA... But apparently it doesn't.

The only difference was that once the temp reached 35°, the charging was stopped. It started again at around 30° and stopped once more at 41°. After that, it continued to charge without any break, reaching a max temp of 43° and a percentage of 75.

I tried to take a look at the config with termux (su, then acc). However, the command doesn’t work (’/system/bin/sh: acc: inaccessible or not found’). Busybox & Magisk are both present, uptodate and working perfectly fine in any other scenario.

I’d be grateful for any help or tips

Cheers
[Magisk] eried1:
The problem with daemon is unfortunately back. It seems to randomly turn off from time to time - maybe only when screen is off. Never had these issues the past six months so quite surprising that they arise now. My temporary workaround is to keep screen on when connected and lower brightness to almost zero.

FYI: I have a Tasker profile which does acc - D to get info about daemon status and tell it to restart if not active. I am now getting an error message if daemon isn't active - the command can't be executed, that is. That also has never happened before.

Edit: Seems to be working now. I think one should be careful with changing the config or fiddling with enabling/disabling the daemon while cable is connected.