yashsingh1/xdaforums huggingface dataset:
[Magisk] JRSonic:
writes "There is no Root" the device is rooted
[Magisk] Alaunus:
Hello everyone!

I've got a Galaxy M21

After installing ACC, I used the setting "acc 3920" but for some reason the values do not set to 3920/3870 but to 3920/3820.

Is this change a bug or something made on purpose? If it's on purpose, why is a 100mv difference better than 50mv?

Is there a list of known charging witches which support idle mode?
[Magisk] xtam:
@VR25 I tried everything possible, changed switch mode, many times, rebooted many times after changing, but my note 8 exynos 950F always stops at 70% no matter if this is set to slate mode or store mode.

but battery charge limit from play store works. But I would rather have acca, more conf possibles.
[Magisk] lionhealth:
I research for quite a long time and I still cant find answer for my trouble. Pls help me out :(.

I just want to limit the battery at e.g 85% like samsung did have option for there new phone, then they remain % and never go down if i still plus in charger, like plug on to charge 100% and play game. Not switch on or off. Charge to that % and remain it.

In short, is there anyway to make this module work like normal charge to 100% but in 85%? Thanks alot :(

Sr for my bad English
[Magisk] VR25:
Share the output of acc --log tail as soon as the daemon stops.
[Magisk] VR25:
Are you running it with super user (su) privileges?
[Magisk] VR25:
The change to 100mV difference was intentional, but it's temporary.

There's a list of switches that support idle mode, but it's very poor and outdated. Just rely on the output of acc -t for information regarding idle mode support. The next acc release is going to bring enhancements to this and idle mode itself.
[Magisk] VR25:
The problem could be in AccA.

Try changing the switch with acc directly: acc -ss.
[Magisk] VR25:
There is and it's called idle mode. It depends on the kernel. Refer to README > TIPS > Idle Mode and Alternatives.
[Magisk] lionhealth:
Oh. Really thank for ur advance!!!

I ll research more for that. Also that, I a bit noob here ^^!. So if u give me a directly step or terminal code for that, it ll be really helpful for me. I dont know what i did right or there ll be something better for "working same with 100% vut in 85% " really thank again. ^^
[Magisk] -sandro-:
Thank you for this!

I was able to raise the standard current for the OnePlus 6 with a "normal" charger from 1.3A to 2-2.5A.

It won't be as fast as the Dash Charger at 4A but probably that's a hardware limit because the phone needs a VOOC charger to reach that current.
[Magisk] xtam:
I did, still same
[Magisk] killer23d:
I am still trying to wrap my head around this with the Pixel 6, I noticed the issue report has been closed with the following 2 switches. How do I apply this with Terminal?

/sys/devices/platform/google,charger/charge_start_level:100
/sys/devices/platform/google,charger/charge_stop_level:0

If I want to set charge start at 70 and stop at 80, what is the exact command?

acc -s s="what goes here?"
[Magisk] VR25:
The documentation has all the steps I would have you go through. Outlining them all again would be too redundant. You can start by running acc -t. It'll tell you whether your kernel supports idle mode (battIdleMode=true). If the result is positive for at least one charging switch, run acc -ss and select it.
[Magisk] VR25:
It's most likely a kernel issue then.

See if current/voltage based charging control helps. Look for "based charging" in the documentation.
[Magisk] VR25:
Those switches are still under testing. Users reported mixed results. Try the following:

1. Set your pause and resume thresholds as usual;

2. Set the stop_level charging switch: acc -s s="/sys/devices/platform/google,charger/charge_stop_level 100 5 --";

3. Test and let me know how things go.
[Magisk] killer23d:
I did this

oriole:/ # acc --set pause_capacity=80 resume_capacity=75
oriole:/ # acc -s s="/sys/devices/platform/google,charger/charge_stop_level 100 5 --"

What does "100 5" mean in the suggested switch? doesn't it contradict with pause_capacity=80 and resume_capacity=75?

EDIT: The charging stops at 80, I tried a reboot and it seemed to survive the reboot. ACCA shows it is Not Charging (Unknown). I have attached the log if you want to inspect.
[Magisk] VR25:
Looks like it's working as expected.

Regarding "100 5", the first number refers to the default value (charging is set to stop at 100 by default) and the latter is the tweak that allows charging to stop earlier. Of course, any value below (or equal to) your pause % will work. 5 is like a one size fits all (i.e., does not have to be changed whenever pause_capacity is updated).

When capacity <= resume_capacity, acc writes 100 (the default) to the file.

When capacity >= pause_capacity, acc writes 5 to the file.
[Magisk] hanneshoch3:
On a Oneplus 7 pro, when I 'charge once to %', it will charge to it multiple times, basically it seems like it is set as the new upper limit. A restart of accd helps, but is kinda annoying. Any ideas?
[Magisk] Zaboon26:
I'd like to do the same thing, i'm trying with Automate but i can't get it to work, i just manage to start the acca app but i'm still looking for how to set an inside app action, like starting one specific profile.

Any one has knowledge on this?
[Magisk] archer797:
I have downloaded the test version 2021.12.4 version in Magisk. When I go in AccA app, under Settings->ACC Version, I do not see option to have the app use this new version. What am I doing wrong?
[Magisk] killer23d:
After 3 different charging on wired or wireless, the charging stops at 80%. Thank you.
[Magisk] Chairmansaab:
I installed the module using the AccA app, device is now stuck in bootloop, there's no AccA folder inside /data/adb/modules, I tried running uninstaller.zip by sideloading it via TWRP's adb sideload but no success.
[Magisk] stillnoexpert:
Is it save to use a voltage limit?​

​

Custom Max Charging Voltage ...​

WARNING: limiting voltage causes battery state of charge (SoC) deviation on some devices. The battery management system self-calibrates constantly, though.​

​

What are the consequences if the "battery management system" gets 'confused'?

​
[Magisk] VR25:
That option is actually for downloading a specific acc version.

The app will use the acc version that is installed, even if you don't select it from settings.
[Magisk] VR25:
Weird.

It's the first time in ages that someone reports a bootloop issue.

Did you install an ancient version of AccA?

The module path is /data/adb/modules/acc (not AccA).

Uninstalling it is just a matter of removing that folder.

You may want to remove the app as well, by deleting /data/app/mattecarra.accapp and /data/data/mattecarra.accapp.

Last time this happened, the user had to reflash the firmware (without wiping data) to get things working.

Again, this was a long time ago (very old acc version).
[Magisk] VR25:
The available charge will be less than expected.

That said, the battery does not charge to its default peak until the BMS recalibrates itself in a few regular charge/discharge cycles.

A custom voltage limit is generally safe.

This issue stems from bad design by OEMs, but it starts fixing itself as soon as the default voltage limit is restored.
[Magisk] stillnoexpert:
I should mention that I use the voltage limit in addition to capacity control (Stop charging at).
[Magisk] VR25:
**v2021.12.14 (202112140)**

- Additional charging switches;

- Auto-add current and voltage ctrl files to charging switches list for extended idle mode support;

- Do not include potentially sensitive data in log archives;

- Enhanced charging status and idle mode detection (current is checked in addition to battery status);

- General fixes & optimizations;

- Reverted `acc mA` resume difference to 50;

- Updated build script;

- Updated links in the README.
[Magisk] freonchill:
Has anyone have success on or a problem where acc daemon is being killed by the pixel 6?

Even when acc is running, when I set the upper limit to 80%, putting it on a qi charger at 83% still charges to 100%

Acca 1.0.35

Acc 2021.12.14

Magisk 23015 (canary)
[Magisk] VR25:
See if the attached prerelease works better for you.
[Magisk] freonchill:
Thanks, I'll try it out.
[Magisk] freonchill:
I have it set to 80% max and acc crashed when it got there and continued to wireless charge above 80%.

Though, putting it on the charger when it was above 80% shows that it's refusing charging
[Magisk] VR25:
That's a kernel problem. Wireless charging control, in general, is not well supported by most devices. ACC daemon deliberately stops when all available charging switches fail/refuse to disable charging. Other Pixel 6/Pro users reported success with wired charging.
[Magisk] swieder711:
I had a problem with my Pixel 6P and wireless charging in my car. With GPS running and a podcast playing I was getting -150 mA. A similar set up with my Pixel 3 XL and android 11 was getting +850mA.

Makes me think that there is an issue with ACC, Android 12 and wireless charging.

I am running the Dec test version of ACC.
[Magisk] stillnoexpert:
Back to the combination of Custom Max Charging Voltage with a max Capacity in %.​

What I think could go wrong is that over time the set maximum charging capacity becomes associated with the set voltage limit. That can possibly lead to rapid drops at the lower end.

My initial observations suggest that all the above may be the case.
[Magisk] VR25:
**v2021.12.20 (202112200)**

- [accd, misc-functions]: prevent unwanted crashes related to `eval` and `set -eu`;

- [batt-info]: filter out the unreliable `POWER_SUPPLY_CHARGE_TYPE` property (note: this change makes AccA always display "unknown" charge type);

- [batt-info]: fixed current reading issue;

- [batt-info]: round current and voltage values to two decimal places;

- [ctrl-files]: added `battery/op_disable_charge 0 1` switch;

- [README]: updated troubleshooting section;

- General optimizations.
[Magisk] VR25:
Readme > troubleshooting > custom max charging voltage and current limits reads:

WARNING: limiting voltage causes battery state of charge (SoC) deviation on some devices. The battery management system self-calibrates constantly, though. Thus, as soon as the default voltage limit is restored, it'll start "fixing" itself.

Limiting current, on the other hand, has been found to be universally safe. Some devices do not support just any current value, though. That's not to say out-of-range values cause issues. These are simply ignored.
[Magisk] freonchill:
Pixel 6 (sda1.210817.019.c2… i need to upgrade to SQ1D.211205.017, so that may be the problem…)

Acca 1.0.35 (39)

Acc 2021.12.20

Magisk 23016 (canary)

Acc crashing regularly. even on wired charging (not qi / wireless charging)
[Magisk] Vinh Tien:
xin vui lòng hướng dẫn
[Magisk] VR25:
The daemon may be stopping (not crashing) because all charging switches are failing to disable charging (e.g., due to a faulty kernel/system update). "exitCode=7" in the logs confirms this (check with "acc --log tail").
[Magisk] Brettroth:
Should the battery be getting hot while in idle mode? I have kernel that supports and idle mode seems to work but I'm getting 42 degrees yet while gaming. Is that just residual from the cpu/gpu?
[Magisk] freonchill:
Results of acc --log tail

354: >pca9468-mains/current_max

354: eval echo '$on'

354: echo 0

355: sleep 0.5

260: 2>/dev/null

260: shift 3

260: exxit

87: exitCode=1

88: false

88: set +eux

And after restarting the daemon (if this is helpful)

141: set +eu

142: eval ''

143: eval ''

145: '[' -n '' ']'

171: true

205: false

210: false

214: '[' -n '' ']'

266: cooldown=false

267: sleep 10
[Magisk] VR25:
It may be just from the heavy processing going on or high current (try 1000 mA).
[Magisk] VR25:
Try the attached build.
[Magisk] freonchill:
Will do and report back.

Thanks!
[Magisk] Brettroth:
Thank you for reply. I set max charging current at 1000. Still same result. Should I have current workaround on? Is there a way to test if battery idle is working?
[Magisk] VR25:
Your device may have thermal control issues.

current_workaround would not make a difference. It has an unrelated purpose.

Install the latest build below and run acc -t to test idle mode.

Set the desired switch with acc -ss.
[Magisk] VR25:
v2022.1.6 (202201060)

- acc -p finds even more potential switches;

- Additional charging switches;

- Enhanced charging status detection;

- General fixes & optimizations;

- Improved idle mode support;

- Support for Qualcomm SnapDragon 8 Gen 1 devices, Nokia 2.2 and more;

- Updated documentation.

This is a pre-release. Anyone who's facing major issues is encouraged to try it.

Please provide feedback!

Not satisfied? acc -b undoes the upgrade.
[Magisk] Brettroth:
Thank you I really appreciate it.
[Magisk] Brettroth:
Honestly seems very buggy. Charging switches working inconsistently. Not reading charger when trying to set current. First test had working switches subsequent tests had none. On op6t
[Magisk] KitsuneFoxy:
Hi there @VR25

I'm having trouble trying to set voltage and mah limit, if i set s voltage of 3900 it ignors jt, but if set a mah voltage, it doesn't respect the limit set and instead of 500, that maxinun is 260 or less and sometimes goes into the negative.

It also spams the logs hard.

Was hoping you might know what the issue is.
[Magisk] AnonVendetta:
@VR25: I have a question. I just bought and received a Maxoak K2 50000mah power bank from Amazon. Which I mainly plan to use on daylong hiking trips, to power my gear when I can't be near an outlet.

Does acc/ACCA treat a power bank any differently than regular AC charging? Can it even tell the difference? The connection between the device and power bank is a USB cable, so I'm guessing no.

However, I used to have a lesser capacity Anker power bank. For some reason it would always charge my Note 4 to 100%. Even when ACCA was active and charging was limited to the default 80%. It's like there was something overriding it. Perhaps Android, the kernel, acc/ACCA, not sure. Or possibly a peculiarity with the power bank.

I haven't had alot of time to test the Maxoak with ACCA, since I just got it today. So far I've only did brief tests to verify that it will charge everything I throw at it.

Thanks!
[Magisk] zagi988:
Hello everyone. Sorry if this is a noob question, I'm new to this.

I see schedules in AccA and that I can select a profile for each schedule.

I'm trying to set a schedule that will change the profile to "night" (charging up to 80% with less current) at 23:00 and then set a schedule at 05:00 that will change to "day" (charge it up to 100%).

But I'm failing at that. The schedule gets set but doesn't change the profile even tho I select it under profile when making schedule.

What am I doing wrong?
[Magisk] VR25:
Those are not universal features.

Your kernel does not fully support current control.

It does not support voltage control at all.
[Magisk] VR25:
ACC does not differentiate power sources. Since there are dedicated charging switches for specific power sources (e.g., wireless) on some systems, ac tries all charging switches by default. If you face issues, upgrade acc before reporting them.
[Magisk] VR25:
See in Magisk manager if the schedules backend is up to date.
[Magisk] zagi988:
Ou. It is now. 😅
[Magisk] VR25:
**v2022.1.8 (202201080)**

- `acc -p` finds even more potential switches;

- Enhanced charging status detection;

- General fixes & optimizations;

- Improved idle mode support;

- New charging switches;

- Optimize system performance and battery utilization, by forcing `bg-dexopt-job` on daemon [re]start, if charging;

- Support for Qualcomm SnapDragon 8 Gen 1 devices, Nokia 2.2 and more;

- Updated documentation.
[Magisk] BoomBucks:
I'm using ACC through ACCA on a Pixel 2 XL (taimen) running Pixel Experience Plus ROM (Android 11), and connected to a 20,000 mAh power bank from INIU. The problem is, the power bank will go to auto off mode when ACC reached the desired charge, and stays in off mode even when ACC tries to resume. I would have to press the power button on power bank to enable another mini cycle of charging.

Is there a way to trick the power bank to stay active and draw very little power?

I could have the same phone connected to another power bank from Aukey and it would stay at 100% until power bank ran out of juice, even without ACC installed. I'm using the phone as voice-activated security, and it needs to stay on for long periods.
[Magisk] AnonVendetta:
I don't know the answer to your questions, but I will have to test the auto off thing with my newly bought Maxoak K2 50000mah power bank. I'd like to know if it will automatically start charging again when acc requests it. Even if not, it won't be enough to make me return it, but would be something to keep in mind.

Mine too has a power button, but I've noticed that when I USB plug something in, it starts charging automatically without having to press the button. I think that button is mainly intended to be used when charging laptops.
[Magisk] BoomBucks:
Correct. That is the default behavior of all power banks, AFAIK. The issue is the power bank stopping when the gadget is fully charged, requiring either an "unplug & replug" or a press of the power button to resume charging.

By the way, for the time being, I think I found a workaround to keep the power bank active. I set max current to 500 mA, and max voltage to 3900 mV. Although the profile is 5/85/90 (off/resume/pause), the phone's battery has been showing 77% and charging for the past few hours. It does show as "full" under battery settings and "charged" on lock screen, but as long as I don't have to go and press that button, I'm good with it until some good soul suggests a better way.
[Magisk] VR25:
After seeing which voltage control files stop charging (acc -t), you can set one (acc -ss) and see if it keeps the power bank active.

Any switch that supports idle mode for that matter, should keep the power bank active.
[Magisk] BoomBucks:
I've been playing around with ACC on Taimen and Marlin. I absolutely love what you have blessed us with, here. What a fantastic suite you created.

I am looking forward to using ACC on my daily driver, Raven!

One thing I have noticed is sometimes things act unexpectedly, and I notice the daemon is not running. Couldn't find anything on exitCode=143 specific to ACC. Any idea?

taimen:/ # acc -l tail

0: cat battery/capacity
45: t 82 -ge 85
338: test 82 -ge 85
217: '[' -n '' ']'
269: cooldown=false
270: sleep 5
270: exxit
87: exitCode=143
88: false
88: set +eux
[Magisk] VR25:
143 is a standard exit code on many systems.

It refers to SIGTERM (graceful termination request signal).

A process from your system is sending this request to acc daemon.

Try to figure out what would be doing this and why. Also, ensure you're running the latest release.
[Magisk] VR25:
Notice

At this point, acc is so high in the compatibility department that if charging does not stop, 9/10 times, it's a kernel fault.

Firmware updates and security patches often break kernels.

Prior to reporting that acc does not work, try different kernel builds/types - and see if the output of acc -p contains new charging switches
[Magisk] kcthuan1810:
Hi @VR25. I'm using POCO X3 Pro, which charging switch I can use? Are you have any suggestion?
[Magisk] VR25:
If you don't set a switch, acc will use whatever works.

If you still want to manually pick a switch, run acc -t to see which switches work – and acc -ss to set one.

I can't recommend any switch in particular, since I don't know much about this device.
[Magisk] kcthuan1810:
It's a Xiaomi device.

One more thing, what is battIdleMode? It's not work on my phone.
[Magisk] DiGiTaT:
ACC keeps stoping for me. "ACC Daemon is Not Running"

373: >pca9468-mains/current_max 373: eval echo '$on'
373: echo 0
374: sleep 0.33
274: 2>/dev/null
274: shift 3
274: exxit
87: exitCode=1
88: false
88: set + eux

I'm using a Pixel 6 Device with ProtonAOSP and the latest realse of ACC*. Is there a way to fix it?

*Default Settings btw.
[Magisk] VR25:
Each model often has unique characteristics.

battIdleMode (or battery strandby mode) is a feature that allows a device to prioritize drawing power from the external power supply - so that the battery does not get used as much, if at all.

This requires kernel support, but there are workarounds. For details, refer to readme > tips > idle mode and alternatives.
[Magisk] VR25:
Hm,

Hm, looks like an issue I fixed a while ago.

What's the output of acc -v?
[Magisk] DiGiTaT:
:/ # acc -v

v2022.1.8 (202201080)
[Magisk] WibblyW:
Pixel 2/Android 11. Using AccA, but I am looking at what's been set in Acc by it.

The phone is charged over the pause_capacity sometimes because it is sometimes charged whilst shut down.

However prioritize_batt_idle_mode=false, yet (once booted) the phone seems to be stuck in a battery idle mode rather than allowing the battery to slowly discharge to 'safer levels' around the pause and resume capacity levels. So the battery remains at its higher state of charge, neither being charged nor allowed to discharge.

Is this expected behaviour, and is there a parameter I can set to allow the phone to discharge and be maintained (ideally in an idle mode) between the pause and resume capacity levels? Of course I can manually disconnect power for a while, but would like this to be automatic...
[Magisk] bush911:
It seems that latest update breaks acc.

Pixel 6, previously works well.

Now charging limit works only with 18w PD brick but the 65w

:/ $ su

:/ # acc -l tail

13: '[' ! -f /dev/.vr25/acc/curr ']'

0: sed s/-// battery/current_now

13: '[' 2062500 -le 95000 ']'

17: '[' -z dis ']'

17: '[' dis '=' dis ']'

0: sed s/-// battery/current_now

18: '[' 2062500 -lt 2150625 ']'

20: return 0

282: '[' -1 -ge 1 ']'

304: sleep 10

:/ #
[Magisk] norman00037:
Using 100w charger just fine. Which switch you're using and what's configuration
[Magisk] Darth Bidder:
I want to enable apply_on boot and applyonplug on AccA but I don't know what to put there to enable them. I looked at the instructions but I still don't understand what to do.

I wanted to enable both because when I restart my phone while chargng, it just maxes out at 65% even though I have it set to pause at 80%.
[Magisk] chape199:
Hello ive just installed this module and im trying to understand everything (already readed github readme a few times).

What switch do you guys recommend me?
[Magisk] norman00037:
The first one seems to be good 👍
[Magisk] norman00037:
Use AccA application with friendly UI to ease the pain
[Magisk] chape199:
Ok thanks, what does it means that has the flag battidlemode=true? That feature is not supported by my current kernel.

Also is there any difference with the other switch? Im still trying to understand switches
[Magisk] Darth Bidder:
I am already using the app version. But I don't know what to type on the text box to enable it. Do I just type "--exit" for apply_on_boot? It's blank by default which means disabled.

The example for apply_on_plug is about the "wireless/voltage_max that forces fast charging on Pixel devices which confuses me. Is apply_on_plug only for Pixel devices?
[Magisk] norman00037:
Please include your configuration. Otherwise I cannot tell what causes your device to stop charging at 65% on reboot.

Can you screenshot the whole page like this?
[Magisk] VR25:
prioritize_batt_idle_mode=false is the default behavior. As the name implies, it controls a priority (i.e., its effect is not absolute). Besides, it has no effect when a particular charging switch is enforced (with a trailing " --"). That said, prioritize_batt_idle_mode works only when the charging switch is set to automatic (unset or non-persistent mode (no trailing " --").

When the battery level is between pause and resume, acc does nothing other than wait for the value to cross one of the thresholds. Idle mode is only enabled when charging stops (e.g., at pause capacity or on demand with acc -d).

If you want a switch that does or does not support idle mode - i.e., one that has a more consistent and predictable behavior - set it manually. acc -t will show you which switches work and which support idle mode. You can then enforce one (trailing " --" included) with acc -ss.