yashsingh1/xdaforums huggingface dataset:
[Magisk] davovapo:
I'm on the same boat as Lunisi, since a week or so the charging cap stopped working for my poco f3 arrow12. I tried "acc -t" to see the charging switches and used "acc -ss" to change it with four or so that said it worked and finally "accd" to restart but it still charges to 100%.

Also, I'm not finding the config file, I can edit it with acc commands but it'd be nice to know where it is.
[Magisk] Huebabbel:
I am getting reboots when the device is in the set "stop charging" range. acc -t also causes a hang after input_current_max for a few seconds, followed by a reboot.

Software and device info:

acc v2022.2.3

Samsung S3 Neo / GT-I9301I

I9301IXXUAPG1

18.1-20220206-NIGHTLY-s3ve3gjv

lineage_s3ve3gjv-userdebug 11 Q3A.211001.001 10039140

Are logs needed to debug this, or is it relatively clear what gets tested directly after the last line that then causes the issue?
[Magisk] Jirachilover:
Turns out that there are actually multiple gcpm/constant_charge_current_max switches and I stupidly set mine to the wrong number which was why I couldn't get my pixel 6 to cap at a specific charge %. I made sure it was on 4000000 and now it finally caps!
[Magisk] VR25:
This is likely related to the capacity_mask feature. Have you enabled it?

The issue is under investigation.
[Magisk] VR25:
Isn't this switch already part of the output of acc -ss?

acc -ss always adds " --" and restars the daemon for you, as needed.

Also, the latest acc reports "Idle" in place of "Not charging".
[Magisk] VR25:
Are you using the latest release?

The changelog includes the following:

- Auto detect and blacklist unwritable charging control files and those that trigger unexpected reboots;

- Blacklisted troublesome charging switches;
[Magisk] VR25:
Doesn't acc -ss show you the right switch?
[Magisk] Namelesswonder:
It is listed, I just prefer to modify the configuration file, as I can make all the changes I want more easily in a graphical text editor and then only have to restart the daemon.

And I know acc reports idle, I was talking about google_battery reporting.
[Magisk] downhere:
Yes, capacity_mask is enabled.

Stats of Battery and ACCA / ACC Settings don't match.
[Magisk] VR25:
This is a known issue that should be gone by the next release.
[Magisk] VR25:
Charging Switch Issues - Summary

1. acc -t will tell you which switches work.

If you've got none, ensure you're running the pinned build.

If this still does not help, try a different power supply (e.g., fast chargers are troublesome BY DESIGN).

If you still got no luck, try acc -p > /sdcard/list.txt. It generates a list of potential charging switches that you can test with acc -t (e.g., acc -t SWITCH or acc -t PATH_TO_LIST).

2. Run acc -ss and pick one of the working switches from step 1.

Test it with acc -d and acc -e. These commands disable and enable charging on demand, respectively. Alternatively, you can let the daemon run and see if it stops and resumes charging at the set thresholds.

Repeat this step until you find a reliable charging switch (among the working ones from step 1).

Source: README.md > TROUBLESHOOTING > Charging Switches.

Too Much Work?

Well, truth be told: acc is not supported by Android smartphone manufacturers.

It seems that some OEMs even fight against it.

There are no standards of any kind for controlling charging.

ACC works thanks to pure ingenuity, community interest and contributions.

We're dealing with many different interfaces for charging control — and OEMs tend to change these constantly - making it harder to deal with and recognize charging data/parameters and patterns.

That's why the automatic charging switch setting is not anywhere near perfect. Manual interventions (the steps above) are often required.

Perhaps acc will use artificial intelligence in the future to deal with this — or an MTK engineer's overclocked soul. Who knows...
[Magisk] VR25:
The enhanced charging status detection mode can be disabled by creating one of the following files:

/dev/.vr25/acc/curr (temporary, gone on reboot)

/data/adb/vr25/acc-data/curr (persistent)

Disabling it will make acc -t reports consistent like a rock, but you may lose extended idle mode support or the ability to stop charging altogether.

To put this into perspective, the Nokia 2.2 does not support acc at all, unless the enhanced mode is enabled.

It's clear that this mode is not perfect, due to the aforementioned fight against OEMs. Nevertheless, it's a good addition, and I improve it overtime.
[Magisk] Dramorian:
Doesn't seem to work with Xtended XS A12 on Xiaomi Mi Pad 4 Wi-Fi. Even though config is set to stop on 80% it goes to 100%.

Upd. Switching to max current switch did the job.
[Magisk] Admiral2145:
Were you able to get this to work... I've tried on my p6 with acca app and it keeps charging no matter what
[Magisk] swieder711:
With my pixel 6P while wireless charging, I get the following:

:/ # acc -t

(!) Charger must be plugged to continue...

(!) Charger must be plugged to continue...

(i) Press CTRL-C to abort/quit

(i) This may take a minute or so...

(i) [maxfg/offmode_charger 0 1] works

- battIdleMode=false

(i) [dc/current_max 1000000 0] works

- battIdleMode=true

(i) [gcpm/constant_charge_current_max 1933090 0] works

- battIdleMode=true

/system/bin/acc[588]: 3: parameter not set

:/ #

In my config.txt file I have:

chargingSwitch=(gcpm/constant_charge_current_max 4000000 0 --)

But my phone is charging to 100%
[Magisk] Zilla0617:
Manually paste this command "charging_switch=/sys/devices/platform/google,charger/charge_stop_level 100 5 --" without the quotation marks. Make sure to leave the cooldown settings blank. I charge with Pixel Stand 2 and it stops at 80% no prob. Btw im using acc file from January 6th
[Magisk] Admiral2145:
What would be the command for 90%..

Wired charging
[Magisk] Zilla0617:
The aforementioned command works for both wired and wireless charging. To stop at 90 enter "acc -s pc=90"
[Magisk] bush911:
Just for your information, I use tasker to help me automatically start battery idle.

I also installed acca to check the status.

You should set proper switch or let automatically cycle my phone is Pixel 6, right now 65w charger plugged, battery idle mode started

Task: Battery Idle

A1: Beep [
Frequency: 1999
Duration: 140
Amplitude: 50
Stream: 5 ]

<stop battery idle mode if not at work or home>
A2: Stop [ ]
If [ %WorkDay ~ 0 & %HOME ~ 0 ]

A3: If [ %BATT > 50 ]

<this is to set the charge limit, I assume acc do the same
the following action is important, which is supposed to disable charge right now, and the battery should enter into idle mode if proper switch previously set>
A4: Run Shell [
Command: echo %BATT > /sys/devices/platform/google,charger/charge_stop_level
Timeout (Seconds): 0
Use Root: On ]

<{loop1}>
A5: Run Shell [
Command: su
acc -d 30m && accd
Timeout (Seconds): 0
Use Root: On ]

A6: Wait [
MS: 300
Seconds: 0
Minutes: 0
Hours: 0
Days: 0 ]

<to check if battery enter into idle mode>
A7: Run Shell [
Command: su
acc -i status
Timeout (Seconds): 0
Use Root: On
Store Output In: %Batt_status ]

A8: Goto [
Type: Action Label
Label: {loop1} ]
If [ %Batt_status !~R Idle ]

A9: Flash [
Text: Charge disabled for 30m ]

A10: Else

A11: Run Shell [
Command: echo 60 > /sys/devices/platform/google,charger/charge_stop_level
Timeout (Seconds): 0
Use Root: On ]

A12: Run Shell [
Command: echo %BATT > /sys/devices/platform/google,charger/charge_start_level
Timeout (Seconds): 0
Use Root: On ]

A13: Run Shell [
Command: su
acc -s pc=60 rc=50 sc=10 mca=1800 mcv=3920 && acc -s && charging_switch=3920
Timeout (Seconds): 0
Use Root: On ]
[Magisk] Admiral2145:
Hopefully a new update will have a pixel 6 profile... Also that over night charging feature is great also to have control over
[Magisk] Namelesswonder:
I tested it, it stops at the pause limit, but battery idle doesn't happen as the system completely disconnects charging.

If I try emulating battery idle then the system is constantly switching between charging and discharging.

This interferes with my Pixel Stand, for both ways.

With just a pause limit the stand features stop working until the battery discharges to the resume capacity, when charging can then resume.

With emulated battery idle with a resume above pause then the phone is constantly thinking it is being taken on and off the stand, which keeps flashing the screen on and off.

This might be a difference in versions, as I'm on the latest ACC and on 12L, but the constant_charge_current_max has worked for me since the 20220123 release and on both 12 and 12L with it supporting battery idle natively. The only issue with it is that you get the message that you need to realign the phone when at the pause limit, but the stand continues to work fine and no annoying screen flashes.

I guess you can say that the realign message also stops the charge level from being burned in. :p
[Magisk] Zilla0617:
Try the version I mentioned, Jan 6th and see if you experience the same. I can't speak on if the pixel features will work since I don't use it
[Magisk] Black_Corner:
Please tell me how to completely uninstall the program?
[Magisk] Black_Corner:
I installed the app and updated the module through it by selecting "2022.2.3" instead of "Bundled" in the settings. However, nothing works. The Default profile is set, but the device still charges up to 100%. What could be the problem?
[Magisk] VR25:
**v2022.2.20 (202202200)**

- [acc -t]: show hints, fixed return code issues (10: no switch or all switches fail, 0: success, 15: idle mode works);

- Additional charging switches;

- Consider STATUS=Discharging, if idle() returns false, current turns negative or drops by 101+ mA -- and its absolute value is less than 750 mA;

- Fixed: capacityMask going over 100%;

- Fixed: custom unit conversion factors not effective for acca -i;

- General optimizations;

- Improved busybox detection;

- Misc changes for front-ends;

- New presets for charging_switch=<mA|mV>;

- Updated links in README.md;

- Updated naming conventions for release files;

- updateJSON API for front-ends (details in the readme);

- Use idleThreshold=95 (mA) for mtk devices and 15 for the rest.
[Magisk] Admiral2145:
My p6 now holds at 90% with this new update
[Magisk] VR25:
ACC v2022.2.22.1 (202202221)

- acc -ss and -t show more info/hints;

- Fixed acc: inaccessible or not found following acc -t execution;

- Minor additions to readme.
[Magisk] damonke:
I don't know if this is the right place to put this, but I think it might be good to know for this app's developer/users...

I'm using a Poco F3 with a voltage limit set through the files in /power_supply/battery/. I was messing around in these files yesterday and I played around with some other files because I felt like, despite the voltage limit working, it didn't behave the same when full. It never actually fully stopped charging (but never went over my set voltage).

Now i set the 'recharge_soc' to 69 (it was 99 by default) and it behaves as follows: I'm pretty sure this doesn't stop it from charging even if yoy plug in at 71%. This setting does however tell it to only charge again after it drops below or TO the value set in this file(no idea which one). So if you only set a voltage, this crude value of 69 (really whatever is one or more less than the soc your voltage translates to).

I hope this was of use to anyone here, I couldn't find any good info about this, but it seems to be working!
[Magisk] lxNightxl:
Hi guys, any solution found for poco x3?

When put stop 90%, phone charging going up to 90% then charging stopped and after few seconds continue again up to 100%. Any solution for this?

1.0.35(39)

V2022.2.22.1
[Magisk] suri89:
Hello, acc is the fist reason why i m rooting my phone it is really usefull and i just want to say thanks to the developer.

I m trying to use daily job scheduler DJS to make a automated charging during night but it is not working. From terminal i can see djs daemon running and the config.txt contains the automated task generated from acca:

2200 : accaScheduleId4; /dev/.vr25/acc/acca -s shutdown_capacity=5 cooldown_capacity=101 resume_capacity=45 pause_capacity=50; /dev/.vr25/acc/acca --set --voltage 3920; /dev/.vr25/acc/acca --set --current -; /dev/.vr25/acc/acca -s cooldown_temp=90 max_temp=95 max_temp_pause=90; /dev/.vr25/acc/acca -s cooldown_charge= cooldown_pause=; /dev/.vr25/acc/acca -s reset_batt_stats_on_unplug=false; /dev/.vr25/acc/acca -s reset_batt_stats_on_pause=false; /dev/.vr25/acc/acca -s "apply_on_boot="; /dev/.vr25/acc/acca -s "apply_on_plug="; /dev/.vr25/acc/acca -s "charging_switch=battery/charging_enabled 1 0 --"; /dev/.vr25/acc/acca --set prioritize_batt_idle_mode=false

0500 : accaScheduleId5; /dev/.vr25/acc/acca -s shutdown_capacity=5 cooldown_capacity=101 resume_capacity=60 pause_capacity=80; /dev/.vr25/acc/acca --set --voltage 4000; /dev/.vr25/acc/acca --set --current 1200; /dev/.vr25/acc/acca -s cooldown_temp=90 max_temp=95 max_temp_pause=90; /dev/.vr25/acc/acca -s cooldown_charge= cooldown_pause=; /dev/.vr25/acc/acca -s reset_batt_stats_on_unplug=false; /dev/.vr25/acc/acca -s reset_batt_stats_on_pause=true; /dev/.vr25/acc/acca -s "apply_on_boot="; /dev/.vr25/acc/acca -s "apply_on_plug="; /dev/.vr25/acc/acca -s "charging_switch=battery/charging_enabled 1 0 --"; /dev/.vr25/acc/acca --set prioritize_batt_idle_mode=true; : --boot

Anyway i cant see changes in acc behaviour. I can regularly use acca switch profile and other stuff so I can confirm that acca works. Maybe something wrong in the config.txt? Thanks you for your help
[Magisk] Spaceoid:
Just a quick follow-up question to this, I hope I am not bothering - is this a known issue with some charging switches? I am just asking because atm I am trying to figure out if it is an ACC or charging cable issue, but the issue happens so rarely that it is very hard to tell. Thank you in advance, and also thank you for the awesome tool!!!

Edit: Nevermind, I am 100% sure now it is either a ROM or cable issue, not an ACC one, as it right now happened with ACC not even activated.
[Magisk] Black_Corner:
I have installed the ACC settings app and now I am seeing very strange behavior. I left the device on overnight charging (I set the profile to 100%), and in the morning I found the device turned off, and after turning it on it was 98% charged. In addition, I noticed that the app and my system data did not match (app shows 70% but the status bar shows 90%). I have no idea what is going on.
[Magisk] swieder711:
Acc is working properly on my P6P. With the latest release, charging is stopping at 95%.
[Magisk] bush911:
Acc is working great pretty well on my Pixel 6.

With latest release, charging is able to be stopping at the level previously set.

Most importantly, the battery idle mode works properly.

For example, with "acc -d 65%", the phone stops charging and battery enter into idle mode untill battery <=65%.

With "acc - e 80%", the phone keeps changing untill battery>=80%, then battery idle mode starts.

This is amazing.

please be advised that for now I found only one charging switch works as expected, that is:

battery/bd_trickle_cnt 0 1
[Magisk] suri89:
after some testing this is my result and maybe it can be usefull for someone with same device which is an xperia 10 running lastest acc 2022.2.22.1 and acca

I had to set "bundle" version in order to make charging switch work.

Djs is running fine but if the phone go in doze mode (sure it goes during night) it cannot load the scheduled task.

A workaround could it be set "proritize idel mode" which prevent kick in doze but unfortunately my device keeps charging even if tested and supported.

I'm just an enthusiast and new to android root and maybe i'm missing something so this is my two cents. Hope to point someone to the right direction. thank you
[Magisk] nutpants:
what is the path for ctrl-files.sh and config.txt so i can edit them.

data/adb/vr25/acc-data/config.txt is overwritten at every reboot ( ive tried every other spot also but they appear to be ignored)or restart of the acc service. i cant find ctrl-files.sh.

thank you for the info.
[Magisk] Spaceoid:
Weird. I edited the data/adb/vr25/acc-data/config.txt and it was kept since then, even after around 50 reboots. That is the path that is also told in the ReadMe I think.
[Magisk] AnyNameYouWish:
Thanks for this wonderful module! After a few weeks I've noticed something strange. I'm not sur It already has been mentionned (I haven't read the 220+ pages and the search terms I used didn't revealed anything interseting) so I apologize if I'm being redundant.

I own a Pixel 5 with magisk, ACC module v2022.2.22.1 and ACC Settings app. I noticed the default setup works fine, it charges my battery up to 80% but once it hits the 80%, the battery logo stays in charging mode (with the little lightning in it) and it decreases really fast - within minutes - to 75 - 76 %.

Question is, shoud I worry about that and my battery health or is it normal behaviour?
[Magisk] zzenyoo:
AFAIK system reporting is misleading. acc is a trick 🤷🏻‍♂️
[Magisk] AnyNameYouWish:
OK, nothing I should worry about then.

Thanks for prompt answer!
[Magisk] nutpants:
it is defiantly being over written for me as soon as i run acc app after.

For pixel 6 users, make sure you turn off adaptive charging and the adaptive battrery in phone settings before you start trying to get aac to work.

at least for me it feels like it is working much better now.. im still testing
[Magisk] Spaceoid:
Then it might be an app issue, now that I think about it! I am editing the file manually, without app.
[Magisk] nutpants:
what are your settings and what are you using to edit the file?

(i tried to edit defaut-config.txt but that just crashed accd)

there is also a post in the pixel 6 fourm you might want opt post your working method

How to limit charging on Pixel 6

With credit to VR-25 from Github: If you edit these files and put you own values in then your phone will start charging when it drops below 75% and stop when it gets to 80%. (put your own values in, etc.) I have only tested it briefly but it...

xdaforums.com
[Magisk] Spaceoid:
To edit the file I assume you can use whatever file explorer you have at hand. I just use FX File Explorer for everything.

I just opened the system partition in FX File Explorer, went to the above mentioned path, opened the .txt file, did my editings according to the readme (one has to read the readme carefully to set the commands right), then saved the file again (it might be one has to mount \system as read-write first via the top right menu in FX File explorer).

Afterwards I rebooted and then checked whether my settings got applied via terminal and the commands "su [Enter] acc -s [Enter]". You then get a list of settings of acc, and the settings were exactly the ones I set in the file.

If you need any more help, just tell me. Mind that I am on a different phone though (OnePlus 6).

Edit: I just checked, you do NOT need to mount \system in read-write mode to edit AND save the config.txt!
[Magisk] moha00:
help my phone keep switching between charging an discharging
[Magisk] Black_Corner:
After the module and the application are completely removed, the device charges very slowly. I formatted all the memory partitions, returned to the stock firmware, even blocked the bootloader. There is no result. Please help me.
[Magisk] Spaceoid:
I am having slight problems with my cooldown cycle.

I set the following lines in the config:

capacity=(5 60 78 84 false false)

temperature=(40 60 90 65)

cooldownRatio=(50 10)

cooldownCurrent=

cooldownCustom=()

If Ampere gives me somewhat reliable information, my cooldown cycle is too short. What it should do (if I understood correctly) is to charge for 50, then to pause for 10 seconds (above 60% or 40°C). What it (according to Ampere) actually does is to charge for 4-6 secs, then to pause for 8-10 secs. Setting/kernel/charging switch issue maybe? If I can provide more information, I am happy to be of help. I am using a OnePlus 6 with latest OOS and LOS nightly and the MCD kernel for my device. I am using no fast charger, only a generic 1 A charger. I am using no frontend app, I just edit my config through FX File Explorer.

Edit: I did some extensive research, and my problem seems similiar to one problem described here:

doesn't stop charging and some bugs · Issue #114 · VR-25/acc

continueschargeacc-logs-tulip.tar.gz.zip i set a limit where it should stop charging on 70% but still continue to charge. although it doesn't appear to be charging at a glance but on closer look wh...

github.com

I cite:

"i guess you already know that cooldown is broken as it stops and resume in less than 5-10 seconds intervals contrary to the config"
[Magisk] lackalil:
So I don't know what the hell's going on in my case. I'm on a Pixel 6 and was using:

Dec and Jan Android releases

Magisk 23 (2 different releases)

2021.12.20 ACC release

ACCA latest releases

No problems using /sys/devices/platform/google_charger/charge_stop_level 100 1 as the charging switch. Idle worked. I installed the newest Magisk (24201) a few days ago and saw that ACC had had a couple of updates since December, so I installed the 22 Feb release.

/sys/devices/platform/google_charger/charge_stop_level 100 1 worked although there was no idle. Rolled back to 20 Dec and I'm unable to set a charging switch. BUT, the automatic switch selection generally works. Until I unplug/replug it and it cycles switches to to one that doesn't work. So I'm having to plug/replug it until I see it's in idle mode.

Is this a Magisk compatibility issue? That's the only thing that's changed apart from updates to other apps (and probably system apps as well). I'll try out 2022.2.3 and 2022.1.8 when I get some time but posting here in the meantime to see if anyone's had similar problems.
[Magisk] downhere:
Accd stops in the middle of the night.

First the phone charged up to the set max percentage and stops charging. Later the process continues until fully charged.

Phone: Oneplus 9

Acc: 2022-02-22-1

EDIT:

Charging switch was set to automatic. Testing different/distinct switch later.
[Magisk] anonymous992:
Since I switched from magisk 23 to 24 and installed new acc version a few days ago, limit voltage doesn't work anymore. max_charging_voltage always doesn't work for me. Until now I used apply_on_plug=battery/voltage_max::4200000. That's not working now. Any idea why this happening?

Edit: Installed acc-version I used before and now it works again, so it seems it's a problem with new acc.
[Magisk] K0rgar:
Latest acc version 2022.02.22 seems to crash after some time, the daemon is not running.

I can't explain the situation, it just happens on poco X3 NFC A11 and A10 and on Xiaomi mi10t lite A11.

Default config.
[Magisk] downhere:
Picking a different charging switch than "automatic" solved this for me (1+ 9).
[Magisk] K0rgar:
Will try, I never did extensive tests and it always worked out of the box.

I'm a lazy and spoiled boy 🥲
[Magisk] zzenyoo:
On my X3 NFC A12 (different ROMs and kernels) i'm using battery/charging_enabled 1 0 bcoz idle mode is working.
[Magisk] Vincent_40:
Do you've the link ?

I'm on Pxl 6P and percent limit does'nt work
[Magisk] Macusercom:
Anyone else having the issue that the battery stats do not reset on a Samsung device? On my Exynos S21 Ultra it seems to not reset it. I've checked and the batterystats.bin file is removed though.

I was checking /system/data for hints and there seem to be some other battery usage files/folders. I'm now checking on which might need to be deleted but thought maybe someone already figured it out? :)
[Magisk] anonymous992:
you can download past acc-versions from the github page

Releases · VR-25/acc

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

github.com
[Magisk] Epic028:
I've never understood if this module is supposed to extend your phone's battery life as in each session it's charged or if it means extending the battery's health over the years so it doesn't degrade.
[Magisk] Johncaffee:
Hi :)

The 2022.2.22.1 version doesn't work with AccA.

I set it to charge to 80% but it charge to 100%.

The 2022.1.8 works but if I set to 80%, it charge sometimes to 83%, sometimes to 81%, etc.

If you know why...

Have a good day all of you :)