yashsingh1/xdaforums huggingface dataset:
[Magisk] MuhammadZaki:
Is it normal that my device stopped charging at 80% and after it dropped to 77 I plugged it in and still not charging ?! Just asking if this is what acc meant to do ?!

I checked the log and found that

"

# shutdown, coolDown,resume-pause

capacity=0,60,70-80

"

Many thanks for your hard work, really appreciated

My device is pocophone F1
[Magisk] Estebanium:
I flashed to the latest version from 2019.6.11. I rebooted afterwards. When up again I was at 80% and plugged in the charger. The phone was then in a kind of loop. It began to fast-charge, switched to charge and ended charging when it noticed that it was already at 80%. Then it started again fast charging. In several minutes the phone was at 81%. So this could be the reason why it reached 100% over night.

When I entered the command the phone stopped charging and several hours later it still holds on. I am at 73% with plugged in charger and the phone doesn't charge. Wuhuu.
[Magisk] Boulder08:
At least worked during one cycle of discharging below 70% and then plugging in to charge. It charged to 80% smoothly.
[Magisk] Nileshyoyo111:
How to control usb mAh ?
[Magisk] VR25:
This is because your resume capacity is set to 70 - meaning "keep charging disabled until battery level is less or equal to 70%."

So, the command fixed it. What's the "Wuhuu" about? :p

Refer to the previous answer.

So, blocking all these wakelocks by default is not a universally good idea, hmmm... ?

Thank you all for the reports.

acc -s applyOnPlug usb/current_max:MICRO_AMPERES (e.g., 500000 = 500mAh, 1000000 = 1mAh = 1Ah)

Note that not all kernels support that.
[Magisk] Boulder08:
Now it's charging to 70% again. I didn't reboot the phone in between.
[Magisk] MuhammadZaki:
Is it safe to change theses values ?!
[Magisk] VR25:
Yes

Refer to https://github.com/VR-25/acc/blob/master/README.md for details.
[Magisk] Nileshyoyo111:
Can u tell which kernel support these features? Bcoz the value doesn't change...

I'm using Redmi 3s!
[Magisk] prajj:
Can somebody help me out here, earlier I was using cs and then mcs magisk modules but when this advanced came i dont understand things

I dont know if this acc is still only used to set charging limits. It seems very advanced to me.

I want to set only lower and upper limit for charging and discharging, like once phone reaches 90 it should stop charging and again when when battery drops to 80 it should again charge.

So i have only one question, what is the command to set this upper and lower limit??
[Magisk] VR25:
A new version is up: https://github.com/VR-25/acc/releases/tag/201906230/

I don't know. It would be great having the community build a "supported features - devices" list.

The original command still works just fine: acc 90 80.

If you ever get stuck, read: https://github.com/VR-25/acc/blob/master/README.md
[Magisk] iPAQ 6515a User:
Just inform that acc works without any problems on my RR Nougat on S5.

However, the problems do start if/when ACCA installed.

Every time I installed the GUI for acc, the magic disappeared. The solution was always the same:

1. Uninstalling ACCA (freezing with TB did not work!)

2. Removing acc via Magisk Manager

3. Rebooting the phone.

4. Installing acc via MM.

In short if you come across problems with acc, check if there is ACCA installed.

Hope it helps
[Magisk] athul7744:
ACC isn't working correctly. The battery switch is not able to switch the charging off. It is able to do it for normal charge (When my device was charging when plugged to the computer). When I connect it to the charger phone goes into DASH charging mode. In that mode the phone can't stop the charging. The test for checking the switch also fails.

Phone : OnePlus 3T running OOS 9.0.3 Pie with Francokernel r48 custom kernel
[Magisk] MatteCarra:
Added support for Acc 201906230

Download: https://github.com/MatteCarra/AccA/releases/tag/v1.0.9

What do you mean with "the magic"?

Could you provide as many info as possible?
[Magisk] HatchetEgg:
When charging pausing starts, it seems to enable and disable charging twice for me.
[Magisk] iPAQ 6515a User:
"the magic" = acc

Once ACCA installed the acc formula seems to be broken. The does not charge to 80 as set originally but only to 50. I am using an extended battery so it may be the culprit. But acc with no ACCA works 100%.

When I try to play with the settings vis ACCA, the app becomes unresponsive and the battery heats up fast. The only solution is a reboot.

To make sure it was ACCA, I froze it with TB and rebooted. To no avail, the problem persisted. After uninstalling ACCA and rebooting the problem persisted. Only removing acc (not disabling but uninstalling) via MM and rebooting was bringing back normality. Then I installed acc via MM, rebooted and voi-la works as intended. I tried it more than 5 times with different versions of acc, ACCA and Magisk with the exactly same results:

1. acc and no ACCA - works

2. acc and ACCA - problems

I know that well in the past, when ACCA was v1 or v2 there were no problems. Hope it helps
[Magisk] MatteCarra:
I don't think that ACCA is the culprit, because ACCA does not work in the background or anything. It only modifies the /sdcard/acc/acc.config

I would advise to update acc and acca and try again (if you want).

If the problem comes back send on xda acc logs and acc config.

Thanks
[Magisk] stillnoexpert:
- Installing Advanced_Charging_Controller_(acc)-2019.6.23.zip

! Installation failed

- Copying zip to temp directory
- Installing Advanced_Charging_Controller_(acc)-2019.6.23.zip
Archive: /data/user/0/com.sC01nJ4slhf.Jmkx/cache/install.zip
inflating: install.sh
inflating: module.prop
inflating: uninstall.sh

Advanced Charging Controller (acc) 2019.6.23
Copyright (C) 2017-2019, VR25 @ xda-developers
License: GPLv3+

******************************
Powered by Magisk (@topjohnwu)
******************************
+ trap 'exxit $?' EXIT
+ config=/data/media/0/acc/acc.conf
+ '[' -f /data/media/0/acc/acc.conf ]
+ print versionCode /data/media/0/acc/acc.conf
+ sed -n 's|^versionCode=||p' /data/media/0/acc/acc.conf
+ local 'configVer=201905130'
+ ui_print ' '
+ true
+ echo ' '
+ ui_print '(i) Extracting module files...'
+ true
+ echo '(i) Extracting module files...'

+ unzip -o /data/user/0/com.sC01nJ4slhf.Jmkx/cache/install.zip 'acc/*' -d /data/adb/modules_update/
(i) Extracting module files...
Archive: /data/user/0/com.sC01nJ4slhf.Jmkx/cache/install.zip
inflating: acc/acc.conf
inflating: acc/acc.sh
inflating: acc/accd-start.sh
inflating: acc/accd-status.sh
inflating: acc/accd-stop.sh
inflating: acc/accd.sh
inflating: acc/psl.sh
inflating: acc/service.sh
inflating: acc/strings.sh
inflating: acc/strings_pt.sh
inflating: acc/switches.txt
+ ln /data/adb/modules_update/acc/service.sh /data/adb/modules_update/acc/post-fs-data.sh
+ mkdir -p /data/media/0/acc/info
+ unzip -o /data/user/0/com.sC01nJ4slhf.Jmkx/cache/install.zip '*.md' -d /data/media/0/acc/info/
Archive: /data/user/0/com.sC01nJ4slhf.Jmkx/cache/install.zip
inflating: License.md
inflating: README.md
+ '[' -f /data/media/0/acc/acc.conf ]
+ '[' 201905130 -lt 201905110 ]
+ print versionCode /data/adb/modules_update/acc/acc.conf
+ sed -n 's|^versionCode=||p' /data/adb/modules_update/acc/acc.conf
+ '[' 201905130 -gt 201906230 ]
+ '[' 201905130 -lt 201905111 ]
+ '[' 201905130 -lt 201905130 ]
+ '[' 201905130 -lt 201906020 ]
+ echo
+ grep rebootOnUnplug /data/adb/modules_update/acc/acc.conf
+ echo
+ grep 'toggling interval' /data/adb/modules_update/acc/acc.conf
+ exxit 1
+ set +euxo pipefail

! Installation failed
[Magisk] Estebanium:
With 2019.06.23 it seems like something is not updated when charging level is reached. I set my level to 70 80, even if it somehow reached 81 %, the weird thing is the battery icon. It is not changed so one could believe that the phone is still charging, but AccA and the accu overview in the settings tell me that it is not.

It turned out that above 70 percent, Acc tends to hold the charge. In my case I have 78 % and plugged in the charger, the device is held at 78 % while using Google Maps.. This is not intended.
[Magisk] ronyscomparim:
I do not have the configuration option
[Magisk] VR25:
DASH is the problem. I'm looking for solutions.

In that mode, charging is controlled by the external charger (the power adapter) - meaning, the internal charger is ignored.

I'm aware of this.

A workaround is deleting /data/media/0/acc/config.txt before installing.

Check the screenshot.

If you don't want that behavior, run "acc -t --" to see which charging switches don't support battery idle mode - then set one with "acc -s s".

You may want to read the whole documentation: https://github.com/VR-25/acc/blob/master/README.md

This means the daemon didn't start, or it crashed before creating the config file.

Send me the output file of acc --log --export.
[Magisk] VR25:
**2019.6.25 (201906250)**

- Faster `acc -D|--daemon stop` (alias `accd.`)

- Fixed config patching error

- Fixed install-latest.sh unset parameter issue

- General fixes & optimizations

> Note: AccApp 1.0.10 is up; it brings a bunch of bug fixes.

https://github.com/VR-25/acc/releases/download/201906250/acc-201906250.zip

https://github.com/MatteCarra/AccA/releases/download/v1.0.10/app-release.apk
[Magisk] QuanNguyen1302:
Can you help me set up this thing?? My phone keeps stop charging when I test charging switch, and it won't charge until I restart the phone
[Magisk] fido14dido:
Great module. Running this on my OG Pixel XL with Mophie battery case. I have it set up where it stops charging at a certain percentage and the phone (I think) is running off the case battery instead of the phone battery. Hopefully this prolongs the life of the phone battery. I'd rather replace the battery case.
[Magisk] Boulder08:
I've now installed the latest version and also the latest version of ACCA. Using ACCA, I checked that the settings are 77-80, but still charging stops at 70% as per default (so it doesn't even hit 80% first). After reboot it usually works at least for one cycle. I have already changed config.txt earlier manually using terminal so I know that it has been correct.

Is there some cleanup that I should try next?
[Magisk] MaxMax1000:
Same here! No way to charge more than 70% :( Bug?
[Magisk] iPAQ 6515a User:
Try without ACCA. It is working 100% on my end without ACCA
[Magisk] kanyazsombor:
Great work both acc and acca. It just works very well on Oneplus 6T OB 13. And I use the phone's dash charger. So dash is not problem in my case. I've used this module on Oneplus 3T also earlier and worked with dash charger also. I can test after few days the latest module on 3T
[Magisk] MaxMax1000:
No change without ACCA! ACC charges exactly up to 70% and holds this value! No way to charge over 70%! Restarting acc - daemon or device does not help! (Galaxy S8 stock OS + Magisk)
[Magisk] iPAQ 6515a User:
Try this. Uninstall ACCA (do not freeze with TB). Delete acc through Magisk Manager. Reboot. Install acc via MM. Reboot. How about now?

In my case it did the trick whenever acc stopped working
[Magisk] Cfowler1225:
Installed the June 25th 2019 version, no config file in the directory to edit so then installed the app. App said it wasn't running so I started it. No problems at all, the config file was created in the acc directory and it auto starts on boot. Made my own profile, if your having problems might need to create or edit the profile in the app!
[Magisk] Boulder08:
I also noticed that the config file is not created in /sdcard/acc which the readme file suggests. There's only the info folder there. Acc.conf is in /data/adb/modules/acc.

I'm now testing things after uninstalling and deleting everything acc related and edited acc.conf manually.

EDIT: Nope, it's not working either. Charging stops at 70% even if the config file says 77-80. After restarting the daemon, the config file was now created also in /sdcard/acc, both seem to have the exact same content.
[Magisk] ooonea:
Same error since last two-three version. I have done any possible trying. It doesn't go over 70%. Now I use IPC module, more simple and it works fine.
[Magisk] lm089:
Can confirm that there are 2 config files now (/sdcard/acc/acc.conf and /data/adb/modules/acc/acc.conf).

(Sometimes there's even a third version at /data/adb/modules_update/acc/acc.conf if I just updated acc without rebooting; but that 3rd is not relevant, I'd say)

But:

if I apply changes either through terminal or through ACCA then only /sdcard/acc/acc.conf is modified. And all my devices running that module are charged exactly to the threshold.
[Magisk] Boulder08:
In my case, the first charging after a reboot works so that it charges till 80%, but it does not discharge until the set value but keeps idling at 80%. Then, if I unplug the phone and plug it in after the battery level has dropped below the lower limit, it charges only till 70% no matter what. Previously I have used the app Battery Charge Limit, which probably uses the same approach as acc and it works. However, it sometimes missed start of charging if I plugged the charger too soon after a reboot so I figured that acc would be a much better option.
[Magisk] danielfilosofia:
Deleted
[Magisk] Estebanium:
Thank you for the hint. It turned out that the default switch didn't support charging. I changed it and now the device is charging as expected.
[Magisk] Tohain:
Screen wake

Any chance to add feature to disable the screen waking when charging, because after 60% it cools down and the screen keeps on waking....

Redmi note 7 pro miui 10.3.7

Thanks for the great app, I love it!
[Magisk] skeeter123:
Glad it wasn't just me! LOL.I've tried figuring out which notification seems to be doing it. But have come up short.
[Magisk] VR25:
Those who are experiencing the "70% bug" or high CPU load may want to enforce a particular charging switch. These may not be acc bugs, but rather problems caused by certain charging switches. Find one that works reliably. Take a look at the screenshot.

Regarding multiple config files: the only one you have to care about is /sdcard/acc/acc.conf (/data/media/0/acc/acc.conf).

/data/adb/modules*/acc/acc.conf is the default config, and it's not meant to be modified.

EDIT

Updated troubleshooting section (new screenshot - right)

Hopefully most people here realize by now how hard writing **intuitive** documentation can be. Oftentimes, the actual software code lags far behind in complexity (no joke).

Making a particular person understand technical stuff can be easy. On the other hand, successfully delivering that same information to a massive audience is often one of the hardest things one can do.

The number one reason for this: most users don't give enough credit to documentation.

The second: developers themselves tend to set that aside - forgetting that it's a fundamental component of software projects. I curse that, **hard!** Of course, anyone can curse me, too - if they find my docs very hard to understand. Although I doubt they'll actually read them in the first place... :p
[Magisk] danielfilosofia:
I'm loving this bug. :laugh: The battery is now idle when it reaches 70%. Before, she was suffering little chargings at night.
[Magisk] harissj:
Can I set it to automatically limit the current to a specific value only after a certain percentage of charge is reached? Voltage control is not working for me.
[Magisk] TheHellSite:
ACC isn't working properly on my OnePlus 7 I think.

I set my profil to 70 80. After reaching 80 % it shows "charging, not charging, discharging, charging, not charging, discharging,...".

When I then unplug my charger my device even shows 81 % load.
[Magisk] iu1nguoi:
Hi. With the new ACCA app, the daemon no longer starts on start-up/reboot. It needs to be started manually in the app. Is there a way to fix it?
[Magisk] joaquin.clar:
[2019.6.25] I have not been installed correctly

Hello,

I had to reinstall the previous version, because when installing it only appears the info folder in acc. And of course this, nothing works.

I do not know if someone has happened and you have been informed. If so, forgive me for saying it again.

Greetings and thanks for this great application.
[Magisk] sic0048:
FYI - yesterday I updated to the latest ACC update via Magisk module and apparently my config file was reset to stock settings. (edit - the changes probably occurred with the 6-23 update, but I had not taken that yet). I woke up this morning to find my phone at 100% and found this was the root issue after looking into the problem.

There is no indication in the release notes that this reset would occur.

I suspect it is expected, because all the newish "wakeunlock" settings are gone too, but it would be nice to warn people that this is going to happen.
[Magisk] VR25:
Here's a prerelease.

Changelogs are shown during installation.

Let me know how it holds up.

Note: config is only reset in two occasions...

- When its version code is lower than a set number (currently 201906230). Major config changes that can't be efficiently patched trigger this.

- When its version code is higher than that of the default config's. This happens during major downgrades, for compatibility reasons.

I'm guilty of not always notifying config resets (upgrades only). This will change.

wakeUnlock is null by default, because it was troubling some users. If you identify a particular wakelock related to charging, run "acc -s wakeUnlock <wakelock name>" to tell accd to start blocking it. Of course, this can be used to block any wakelocks (e.g., acc -s wakeUnlock wakelock1 wakelock2 wakelockN) - but be sure to know what you do!

Since prioritizing battery idle mode was not welcomed by some systems, this setting is now changeable - and disabled by default (prioritizeBattIdleMode=false). "acc -s prioritizeBattIdleMode true" enables it.
[Magisk] aouerfelli:
I'm having the same issues after updating acc. I'm pretty sure it has nothing to do with the app.
[Magisk] Bert-net:
hey, I`m using version 2019.6.25 / MatteCaraApp 1.0.11 on an Mi 8 using LOS. App works great, starts on every start/reboot, thanks. Great work.

got the folloing issue: if both, Cool down and Temperature Control is enabled, it stopps charging if the max temp is reached for the period given in the cool down section. I solved this by using just one of these options, not both at the same time.
[Magisk] lm089:
Appears to be working as ever on my Xperia tablet, alongside acca 1.0.11

Have experimented setting the new option to true but I can't see any difference in behaviour while charging. So I assume the device doesn't support that
[Magisk] lm089:
ACCA feature request

[MENTION=9731715]MatteCarra[/MENTION] and [MENTION=5228676]VR25[/MENTION], don't know if that's possible, but it doesn't hurt to ask:

I feel it would be great if ACCA would have an option to create / show a simplified snapshot of acc's log, mainly showing info like

started charging at <system time>
paused charging at <system time>
resumed charging at <system time>
reached max charging threshold at <system time>
resumed charging after dropping to lower level threshold at <system time>

etc.

I know that I can see the standard log from the app but this:

+ grep -iq dis /sys/class/power_supply/battery/status
+ false
+ get_value wakeUnlock
+ sed -n 's|^wakeUnlock=||p' /data/media/0/acc/acc.conf
+ false
+ get_value loopDelay
+ sed -n 's|^loopDelay=||p' /data/media/0/acc/acc.conf
+ secondsUnplugged=60
+ '[' 60 -ge 30 ']'
+ sleep 60

for many cases is way too technical (and to be honest: I hardly understand it).

Background:

my OP6 is charging quite fast. Then when it reaches the max charge percentage it stops but keeps the phone awake thus not allowing it to go to deep sleep mode. Thus it consumes an unusual high amount of battery power until the lower level is reached, then resumes charging again etc.

So, charging my phone overnight this is looped again and again until I wake up to pull the plug.

A simplified log like my fake example above would give us an overview of what acc did over the last 4 or 5 hours while the phone was plugged in.

Speaking about ACCA's log view:

the log viewer only allows me to copy the output line by line; being able to copy the entire page then trim the result down to what I want to see using some external text editor would be much more helpful

the log page is refreshed every few seconds. A "Stop" or "Pause" button would be extremely helpful to be able to study the output

Thanks for considering these
[Magisk] LoneWolfz:
I DELETED It...
[Magisk] den80001:
yes, I'm facing the same problem with my 4.4.2 on Galaxy S5 as well

Has anyone found a solution?
[Magisk] lybimuy:
wireless charger

Sorry for my English. I have a problem with wireless charging. Xiaomi Mi9. Through usb works correctly. And one of the three wireless chargers also works correctly. But on the other two (car charger Xiaomi 20W and Nilkin), when the upper limit is reached, a charge stop and start every second. It seems that some settings conflict with each other. Or maybe there is a solution in the settings? Thanks for the program.
[Magisk] VR25:
Great Suggestion

We'll test that.

Thanks

P.S., use an app (e.g., Wakelock Detector) to identify the specific wakelock, and then try blocking it with "acc -s wakeUnlock WAKELOCK_NAME"

The problem is that your /system/bin/sh is so limited that it doesn't even support "supposedly" standard shell features.

Using a different/newer shell is the way to go - but I need you or anyone else facing the same issue to contact me on Telegram (vr25xda) - so we can work on that more efficiently.

If other power supplies work, settings are fine. The issue may be that the two problematic wireless chargers try to force charge.

Run "acc --log --export" and upload the output file.
[Magisk] VR25:
Here's another prerelease that should be stable enough for daily use: https://github.com/VR-25/acc/releases/tag/201907080
[Magisk] lm089:
Are you referring to my story regarding the OP6 which doesn't go into deep sleep once acc stops charging?

If I got you right I would basically run wakelock detector (or BBS or whatever) in the phase between "reach max. charge level" and "reach resume charge level"?
[Magisk] lybimuy:
Tell me please, what commands should I enter in the terminal? And where should I find this log?
[Magisk] VR25:
Yes

Yes

https://github.com/VR-25/acc/issues/4

It turns out this version won't be able to resume charging if "su -c acpi -a" outputs "Adapter 0: off-line" when the device is plugged in, not charging (acc -d).

That command is just as unreliable as "dumpsys battery".

Another prerelease will be up soon to fix this mess.
[Magisk] lm089:
BBS is showing me 2 specific kernel wakelocks fitting well into the observed timerange: device is in "elevator mode" since 90 minutes, and "a600000.ssusb" and "chg_wake_lock" apparently are keeping the device awake for the same time.

What's confusing me is the fact that all process names are apparently shown as fixed length strings and thus are appended with the necessary number of space chars.

Q: do I have to enter those trailing spaces when submitting the above command, like "chg_wake_lock "? Or is "chg_wake_lock" sufficient?

I'll try without trailing spaces now, but I probably won't see in case it doesn't work, so as always: any hint for the unknowing is warmly welcomed :o
[Magisk] VR25:
To blacklist both wakelocks, run "acc --set wakeUnlock a600000.ssusb chg_wake_lock".

The trailing spaces don't matter. These are ignored anyway.

Note that blocking certain wakelocks may cause unexpected behavior. If you face issues, hunt down the offending wakelock and remove it from the backlist.