Search This thread

vurtomatic

Senior Member
Mar 22, 2015
535
111
Hi @Lada333 , I'd like to experiment with setting this as suggested in the previous post:

Code:
(gcpm/constant_charge_current_max 1866420 0)

I'm looking through the readme and "acc -s" looks like the command to set variables. Do I do something like:

Code:
acc -s (gcpm/constant_charge_current_max 1866420 0)

?
 

Uluru25

Senior Member
Nov 27, 2016
379
148
Samsung Galaxy S7
Samsung Galaxy A6
I've been reading the documentation for hours now, trying to find out where I went wrong, but I just can't seem to be able to.

I'm on a Pixel 6a, unofficial crDroid, Android 13, stock kernel.
On my previous devices, I've always used either AccA or ACC Settings, but none of them seem to function now for whatever reason. I want to set up ACC in a way that it limits the maximum charge level to 80% (which seems to be working fine the way I configured it using Termux) and to limit the maximum charge current to 1000mA.
I've tried:
  • Setting the charging switch to automatic
  • Setting the charging switch to whichever ACC deemed working (using acc --test)
  • Setting the max charge current to 1000 using both acc -s c 1000 and acc --set mcc 1000
None of these seem to be throttling the charging speed.

I saw in the documentation how it's recommend to limit the charging voltage instead, but then there's the fact that not all kernels support that feature.

Could anybody help me out here?
Thanks in advance


EDIT:
Okay so using acc --set mcv=4000 kinda does what I want it to do? It's around 1250-1300mA instead of 1000mA, however using any value below 4000mV just results in the phone constantly popping up the "just plugged in" screen? Like it charges for a second, then stops for a few, then charges again for a bit, and so on. (I am using the currentWorkaround thing).


EDIT 2:
Alright, so somehow setting any value as max charging voltage no longer works either (regardless of cw being true or false). I cannot seem to be able to limit the charging speed at all. Could that be a kernel issue?
I realized it via the acc-settings frontend (see screenshots attached). In this example I reduce the charging current to 1500 mA (you could enter for sure a different value). Then the phone is charged with this 1500 mA until my cooldown charging value of 60 % is reached. At 60 % charging it further reduces the charging current to 500 mA (as a cooldown cycle: 600 s charging with 500 mA and 1 s at the 1500 mA) until the phone is charged to either 80 % or the max voltage of 4150 mV. Good luck!
 

Attachments

  • Screenshot_20221207-073441_Trebuchet.png
    Screenshot_20221207-073441_Trebuchet.png
    105.6 KB · Views: 57
  • Screenshot_20221207-073430_Trebuchet.png
    Screenshot_20221207-073430_Trebuchet.png
    103.2 KB · Views: 59
  • Like
Reactions: Lada333

mochamoo

Senior Member
Oct 16, 2010
545
145
Google Pixel 7 Pro
Hi @Lada333 , I'd like to experiment with setting this as suggested in the previous post:

Code:
(gcpm/constant_charge_current_max 1866420 0)

I'm looking through the readme and "acc -s" looks like the command to set variables. Do I do something like:

Code:
acc -s (gcpm/constant_charge_current_max 1866420 0)

?
close... it's acc -ss. But if you are in termux I'd test the charging switches first by using the acc wizard or acc -t. Your charger/cable might give it a different current reading.
 
  • Love
Reactions: vurtomatic

vurtomatic

Senior Member
Mar 22, 2015
535
111
close... it's acc -ss. But if you are in termux I'd test the charging switches first by using the acc wizard or acc -t. Your charger/cable might give it a different current reading.

Thank you! I don't know ANYTHING about these switches at all. It's been a lot of googling and reading XDA.

I found a post from VR25 that said to use "acc -t" to see which switches work on our phones. It looks like we're picking any switches that have the green checkmark, and changing their values until something works?

And you're saying the value should reflect the chargers we have? Is this value the amperage the chargers are giving out? I'm trying to figure out the guidance for these values otherwise it feels very arbitrary.

Step 1: Run "acc -t" to look for switches that work. (While connected to a charger.)

Step 2: Pick one of those switches. (These switches will show the value while the phone is charging? But I have many different chargers so if these values reflect the chargers, I'll have all sorts of different numbers.)

Step 3: Run "acc -ss" on one of the swtiches and set the value that was shown when the phone was charging?

Step 4: Repeat with any of the switches until the phone will automatically stop charging at the max charge we want?
 

Zaxx32

Senior Member
Mar 23, 2019
486
177
Morgantown
Moto G5 Plus
Moto G7
I'm another novice who doesn't understand a lot about how to set
them up correctly.

Phone is a Google 6a.
Ran acc -t and it returned the following. I moved the good ones to the bottom.

/sys/kernel/fast_charge/force_fast_charge 1 0
curr=-932500,-928750 off=true status=Charging
curr=-932500,-927187 off=true status=Charging
curr=-932500,-926875 off=true status=Charging
curr=-932500,-934062 off=true status=Charging
curr=-932500,-918125 off=true status=Charging
Switch doesn't work ❌

battery/bd_trickle_cnt 0 1
curr=-931250,-918125 off=true status=Charging
curr=-931250,-906250 off=true status=Charging
curr=-931250,-924687 off=true status=Charging
curr=-931250,-927187 off=true status=Charging
curr=-931250,-920312 off=true status=Charging
Switch doesn't work ❌

maxfg/offmode_charger 0 1
curr=-931250,-932500 off=true status=Charging
curr=-931250,-929062 off=true status=Charging
curr=-931250,-939687 off=true status=Charging
curr=-931250,-929687 off=true status=Charging
curr=-931250,-918125 off=true status=Charging
Switch doesn't work ❌

dc/current_max 687500 0
curr=-929062,-940937 off=true status=Charging
curr=-929062,-924687 off=true status=Charging
curr=-929062,-923125 off=true status=Charging
curr=-929062,-930625 off=true status=Charging
curr=-929062,-940937 off=true status=Charging
Switch doesn't work ❌

tcpm-source-psy-i2c-max77759tcpc/current_max 2200000 0
curr=-940625,-940625 off=true status=Charging
curr=-940625,-931250 off=true status=Charging
curr=-940625,-923437 off=true status=Charging
curr=-940625,-2452187 off=true status=Charging
curr=-940625,-2453125 off=true status=Charging
Switch doesn't work ❌

main-charger/current_max 2200000 0
curr=-938437,178125 off=true status=Discharging
curr=-938437,-940625 off=false status=Charging
Switch works ✅
idleMode=false

usb/current_max 2200000 0
curr=-2453125,498437 off=true status=Discharging
curr=-2453125,-2450312 off=false status=Charging
Switch works ✅
idleMode=false

main-charger/voltage_max 4350000 voltage_now
curr=-2450312,513125 off=true status=Discharging
curr=-2450312,-2444687 off=false status=Charging
Switch works ✅
idleMode=true


In the past I've seen some 'google' switches listed...but none now, does that even matter?

Think I need a 'guide for idiots' the shows how/what to key in. Just want to stop at 90% and learn how to use the good idle mode I found. No idea how to make them happen. smh...
 

VanGray

Member
Sep 17, 2021
28
30
HHello,
I'm another novice who doesn't understand a lot about how to set
them up correctly.

Phone is a Google 6a.
Ran acc -t and it returned the following. I moved the good ones to the bottom.

/sys/kernel/fast_charge/force_fast_charge 1 0
curr=-932500,-928750 off=true status=Charging
curr=-932500,-927187 off=true status=Charging
curr=-932500,-926875 off=true status=Charging
curr=-932500,-934062 off=true status=Charging
curr=-932500,-918125 off=true status=Charging
Switch doesn't work ❌

battery/bd_trickle_cnt 0 1
curr=-931250,-918125 off=true status=Charging
curr=-931250,-906250 off=true status=Charging
curr=-931250,-924687 off=true status=Charging
curr=-931250,-927187 off=true status=Charging
curr=-931250,-920312 off=true status=Charging
Switch doesn't work ❌

maxfg/offmode_charger 0 1
curr=-931250,-932500 off=true status=Charging
curr=-931250,-929062 off=true status=Charging
curr=-931250,-939687 off=true status=Charging
curr=-931250,-929687 off=true status=Charging
curr=-931250,-918125 off=true status=Charging
Switch doesn't work ❌

dc/current_max 687500 0
curr=-929062,-940937 off=true status=Charging
curr=-929062,-924687 off=true status=Charging
curr=-929062,-923125 off=true status=Charging
curr=-929062,-930625 off=true status=Charging
curr=-929062,-940937 off=true status=Charging
Switch doesn't work ❌

tcpm-source-psy-i2c-max77759tcpc/current_max 2200000 0
curr=-940625,-940625 off=true status=Charging
curr=-940625,-931250 off=true status=Charging
curr=-940625,-923437 off=true status=Charging
curr=-940625,-2452187 off=true status=Charging
curr=-940625,-2453125 off=true status=Charging
Switch doesn't work ❌

main-charger/current_max 2200000 0
curr=-938437,178125 off=true status=Discharging
curr=-938437,-940625 off=false status=Charging
Switch works ✅
idleMode=false

usb/current_max 2200000 0
curr=-2453125,498437 off=true status=Discharging
curr=-2453125,-2450312 off=false status=Charging
Switch works ✅
idleMode=false

main-charger/voltage_max 4350000 voltage_now
curr=-2450312,513125 off=true status=Discharging
curr=-2450312,-2444687 off=false status=Charging
Switch works ✅
idleMode=true


In the past I've seen some 'google' switches listed...but none now, does that even matter?

Think I need a 'guide for idiots' the shows how/what to key in. Just want to stop at 90% and learn how to use the good idle mode I found. No idea how to make them happen. smh...
Hello, plug the charger, go to a terminal and type

su
acc -ss

Choose the number according to this switch

main-charger/voltage_max 4350000 voltage_now curr=-2450312,513125 off=true status=Discharging curr=-2450312,-2444687 off=false status=Charging Switch works ✅ idleMode=true


Then type

acc -d

to enter idle mode and if it's working fine and you need to exit it, type

accd

to exit it


When you're charging, you should check the current. If it's ~0 MAh, the idle mode is working fine
 

vurtomatic

Senior Member
Mar 22, 2015
535
111
Pixel 4a running rooted stock A13.

Installed zip from magisk, installed AccA front-end. Everything seems to be working except the charging never stops.

Tried to test switches from terminal.

I get:



Am I missing something?
Maybe try a reboot? I had a similar experience. Eventually I uninstalled everything including AccA. Then did a fresh install of acc, and installed Acc Settings. Rebooted the phone, and acc command worked.
 
  • Like
Reactions: User_McUserface

User_McUserface

New member
Aug 4, 2019
2
1
Maybe try a reboot? I had a similar experience. Eventually I uninstalled everything including AccA. Then did a fresh install of acc, and installed Acc Settings. Rebooted the phone, and acc command worked.
Yeah, I tried a few reboots and the command did show up, but it wasn't much help.

I think neither of the switches work, because while connected and battery at 92% (stop set as 90%) front-end shows status as discharging, but the battery is clearly charging.
 
  • Like
Reactions: vurtomatic

Zaxx32

Senior Member
Mar 23, 2019
486
177
Morgantown
Moto G5 Plus
Moto G7
HHello,

Hello, plug the charger, go to a terminal and type

su
acc -ss

Choose the number according to this switch

main-charger/voltage_max 4350000 voltage_now curr=-2450312,513125 off=true status=Discharging curr=-2450312,-2444687 off=false status=Charging Switch works ✅ idleMode=true


Then type

acc -d

to enter idle mode and if it's working fine and you need to exit it, type

accd

to exit it


When you're charging, you should check the current. If it's ~0 MAh, the idle mode is working fine
That's awesome!! Thank you so very much...easier then I realized! (y)
 

Lada333

Senior Member
Feb 7, 2016
1,392
461
22
Budapest
OnePlus 3T
Google Pixel 4a
I realized it via the acc-settings frontend (see screenshots attached). In this example I reduce the charging current to 1500 mA (you could enter for sure a different value). Then the phone is charged with this 1500 mA until my cooldown charging value of 60 % is reached. At 60 % charging it further reduces the charging current to 500 mA (as a cooldown cycle: 600 s charging with 500 mA and 1 s at the 1500 mA) until the phone is charged to either 80 % or the max voltage of 4150 mV. Good luck!
Yeah, I did try to limit the current as well, but it just doesn't seem to have any effect. Only thing I can sort of limit is the voltage, but even that only in 100mV increments. No matter if I choose the charging switch manually or leave it to auto, whatever mA I set as charging current, it just gets disregarded.
 

Lada333

Senior Member
Feb 7, 2016
1,392
461
22
Budapest
OnePlus 3T
Google Pixel 4a
I had this yesterday (Still have an issue where it will charge past my max), but installing the following magisk module stopped the screen flashing. I used that package on my current Android 13 and it works okay.

Yeah, I'm actually on this latest version of ACC as well. I managed to get rid of the screen flashing.. somehow, but I still can't set a custom charging current :(
 

Lada333

Senior Member
Feb 7, 2016
1,392
461
22
Budapest
OnePlus 3T
Google Pixel 4a
Yeah, I did try to limit the current as well, but it just doesn't seem to have any effect. Only thing I can sort of limit is the voltage, but even that only in 100mV increments. No matter if I choose the charging switch manually or leave it to auto, whatever mA I set as charging current, it just gets disregarded.
Okay, so, one of the working charging switches is "main-charger/current_max 2000000 0." Enabling it does throttle the charging voltage to around 2.0A. Me setting a custom max charging voltage doesn't influence anything.
I guess this is better than nothing, I just still don't understand why I cannot set a truly custom value.
 

eried1

Senior Member
May 27, 2016
420
60
Stockholm
Does this app still work? I just downloaded it and set the thresholds to "acc 80 40" respectively. My phone still charges between 80 and 40.

Have only the module installed.

Any solution?
 

eried1

Senior Member
May 27, 2016
420
60
Stockholm
No. It starts charging already between 40 and 80, not only below 40. The lower threshold is not working.
And neither is the higher - the pause threshold.

I have a profile in Tasker which is configured specifically for my device, Lenovo P2. Independent of ACC. Would like to use this module for setting a slow charging current, but don't have the time to troubleshoot.
 
Last edited:

eried1

Senior Member
May 27, 2016
420
60
Stockholm
Probably shouldn't get into Android modding then
I'm already into it. Haven't done it in five years, give or take.

I have my own tailored Tasker battery limit script which have served my flawlessly ever since I got my phone back in 2017. The only thing I'd like to add is slow charge. I don't think my old kernel supports it though. Can be solved quickly by using another charger.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    Stop at 90 , why it still charging.. can someone please shed some light on this? Much appreciated

    (update) spent hrs to testing a good switcher and power supplies, finally able to manage get wire charging works as desired, but still can't curb wireless charging, it always ignore limit.. pls help!
    IMG_20230116_073512.jpg
    1
    Hi there,

    I have found acc in combination with the AccA interface very useful for me. I used to charge my phone (LG G8s Thinq) wirelessly ever since I bought it new and it also worked with my newly bought fast wireless charging station integrated in my night clock.

    Now a few days wireless charging stopped to work all the sudden. It does not work on neither of my 3 wireless chargers (different brands). Wired charging still works normally. The qi chargers range from old crappy model over old but reliable 5W-model to the 10W new model in my night clock.

    I can not get wireless charging to work again even now that I installed LineageOS 19.1 and therefore reset my phone completely (I did not work with backup)

    I would like to help to debug what happened and maybe get my integrated qi charging back. Please advice me which informations you need. I have rooted the phone and can gain adb access.

    You can also PM me if it does not fit in this forum.

    Thank you!

    Best regards
    LeFish
    Is there any update with your findings? I can't get wireless charging work in any ways.. wire charging works perfectly fine though.. I'm latest Jun build
    1
    Is there any update with your findings? I can't get wireless charging work in any ways.. wire charging works perfectly fine though.. I'm latest Jun build

    Same here, still no wireless charging. No message from any of the devs.... This is simply one level to high for me to get working on my own.
    I bought a qi-charging pad which plugs into the USB-C port of the phone. Yet I still long for the internal phones qi charging function...
    I am still willing to do tests if anyone advices me!
  • 77
    Archive
    Find newer zips here.
    41
    Those who are worried about other projects of mine not being updated for a long time, possibly abandoned...
    Stop worrying.
    After the next stable ACC release, I'll focus more on the other Magisk modules (fbind, Migrator, Systemless GApps, etc.).
    The current ACC framework is the base of all the other projects - meaning, making it rock stable it priority #0.
    29
    A new stable release is up.
    It can be downloaded from Magisk Manager > Downloads as well.
    Refer to the readme for a full list of changes, features and recommendations.
    Now I'll be focusing more on the other projects (migrator, fbind, systemless GApps, daily job scheduler...).
    Until these reach satisfactory status, acc will only get occasional maintenance updates (bugfixes, optimizations, new charging control files...).

    Edit: the installer enforced by Magisk Manager is not playing nice with acc. Until I fix that, use the zip from GitHub (release link above).

    Edit 2: fixed.