Search This thread

NYLimited

Inactive Recognized Contributor
Jan 5, 2008
3,828
2,288
New Hampshire, USA
What do you mean by not visually stop charging?

In addition to the charging indication on the lockscreen (which I understand is not always reliable but mostly is indicative of charging on the OnePlus N200) there are apps which show battery status. Among them the ACCA.APK app on F-Droid. While the app is getting older it does show charging status quite reliably even if not used to alter the ACC config file.
 

NYLimited

Inactive Recognized Contributor
Jan 5, 2008
3,828
2,288
New Hampshire, USA
Well, this may be a last post here since no obvious answers are available. I suspect @VR25 is busy with other projects since the DEV version has not been updated since late July and he has not posted here in a while.

As a last observation, should it help anyone, the capacity_resume switch seems to work fine, exactly as intended, when the phone is plugged into the computer USB port. The switch seems to be ignored or not capable of working as intended when the phone is plugged into a wall charger (brick) - the type does not seem to make a difference. I have tried the OnePlus Warp charger, the OnePlus charger that came with the N200 and a generic charger. They all report "charging rapidly" on the lock screen and charging resumes as soon as the device is plugged in, regardless of ACC settings.

Yet, the capacity_pause switch does work with all chargers and charging stops before 100%, as indicated in the ACC config file.

Moving on to other projects ...
 

maliciousd12

Member
Dec 3, 2019
8
0
I can't get this to work.


The ctrl file is wrong and ACC takes an awful long time to test this path and it fails.

I tried directly in the Terminal

echo 65 > /sys/devices/platform/google,charger/charge_stop_level

/system/bin/sh: can't create /sys/devices/platform/google,charger/charge_stop_level: No such file or directory

So what is the proper setup for Battery enabler or ACC. I can't seem to find the proper ctrl file location? Android 12 SQ3A 220705.003.A1

Thank you!
 

Churchthecat

New member
Sep 20, 2022
4
2
Hi, got evertything going good on my oneplus3T lineage 18.1, magisk,no gapps phone. The project I'm doing is making my car smart and I'm using this phone as the heart of the system. I am stuck at one final thing to get everything working as I want. To make phone boot on power connected. Is there a way to do this using AccA? Or any other ideas? Thanks
 

HRSE

Senior Member
Feb 24, 2013
227
56
Singapore
Hi, got evertything going good on my oneplus3T lineage 18.1, magisk,no gapps phone. The project I'm doing is making my car smart and I'm using this phone as the heart of the system. I am stuck at one final thing to get everything working as I want. To make phone boot on power connected. Is there a way to do this using AccA? Or any other ideas? Thanks
Have you tried any of this https://android.stackexchange.com/q...ower-on-android-when-the-charger-is-connected
 

HRSE

Senior Member
Feb 24, 2013
227
56
Singapore
Hi and thanks, I tried the fastboot command no change.
Tried to locate the LPM or equivalent file , no luck.
Editing the boot image is the final thing to try. But a step by step guide would be nice to have for that. I was hoping there would be an easier way using AccA.
a very old guide for samsung device https://forum.xda-developers.com/t/q-power-on-when-plugged-in-boot-when-docked.1187631/post-77766638
the final thing to try is hardware modding (open up the phone and connect some wires to the power button linking to the external circuit that generates a one-shot signal when power is applied)


EDIT: I think you have a better chance of success if you ask the lineageOS devs directly instead of asking around.
 
Last edited:

Bruno25

Member
Aug 16, 2014
49
18
Rio de Janeiro
Redmi Note 11
Thank you for this great tool!
I used it on my Redmi Note 4 (under Lineageos) where it really improved the battery lifespan.
Before using ACC, I had to replace the battery every year... Since I use ACC (~3 years), I didn't have to replace it a single time :).

But my touchscreen was starting to fail... I then switched to a brand new Redmi Note 11.
On this new phone, I could not yet make ACC works. I tried all the switches... the phone either do not charge or do not stop charging... I also tried the latest dev version without success.

Anybody has a working configuration (or switch combination) for ACC for Redmi Note 11 (Model 2201117TG, Snapdragon 680, MIUI Global 13.0.4, Android 12 SKQ1.211103.001, Magisk 25.2)?
 

zzenyoo

Senior Member
Sep 11, 2014
201
112
47
Chełm
LG V10
Xiaomi Poco X3 NFC
Thank you for this great tool!
I used it on my Redmi Note 4 (under Lineageos) where it really improved the battery lifespan.
Before using ACC, I had to replace the battery every year... Since I use ACC (~3 years), I didn't have to replace it a single time :).

But my touchscreen was starting to fail... I then switched to a brand new Redmi Note 11.
On this new phone, I could not yet make ACC works. I tried all the switches... the phone either do not charge or do not stop charging... I also tried the latest dev version without success.

Anybody has a working configuration (or switch combination) for ACC for Redmi Note 11 (Model 2201117TG, Snapdragon 680, MIUI Global 13.0.4, Android 12 SKQ1.211103.001, Magisk 25.2)?
Try custom kernel? 🤷‍♂️
 

Bruno25

Member
Aug 16, 2014
49
18
Rio de Janeiro
Redmi Note 11
Thank you for this great tool!
I used it on my Redmi Note 4 (under Lineageos) where it really improved the battery lifespan.
Before using ACC, I had to replace the battery every year... Since I use ACC (~3 years), I didn't have to replace it a single time :).

But my touchscreen was starting to fail... I then switched to a brand new Redmi Note 11.
On this new phone, I could not yet make ACC works. I tried all the switches... the phone either do not charge or do not stop charging... I also tried the latest dev version without success.

Anybody has a working configuration (or switch combination) for ACC for Redmi Note 11 (Model 2201117TG, Snapdragon 680, MIUI Global 13.0.4, Android 12 SKQ1.211103.001, Magisk 25.2)?
Answering to myself...
The switch that works is battery/input_suspend.
When I use it manually (e.g. echo ¨1" > /sys/class/power_supply/battery/input_suspend) it effectively suspends or resumes the charging.
But from ACC, it works for some minutes only.

I adapted a script that I found somewhere (I don't remember where).
It can be saved as battery_limit.sh in the home directory) that is launched through Termux shortcuts (as root, e.g. su -c /data/data/com.termux/files/home/battery_limit.sh).
Bash:
#!/data/data/com.termux/files/usr/bin/bash
MIN=70
MAX=75
CONTROL_FILE=/sys/class/power_supply/battery/input_suspend
CAPACITY=/sys/class/power_supply/battery/capacity
REFRESH_INTERVAL=60

while true
do
  CURRENT_LEVEL=$(cat $CAPACITY)
  echo 'Battery level: ' $CURRENT_LEVEL
  if [[ $CURRENT_LEVEL > $MAX ]]; then
    echo "1" > $CONTROL_FILE
    echo 'Suspending charging'
  fi

  if [[ $CURRENT_LEVEL < $MIN ]]; then
    echo "0" > $CONTROL_FILE
    echo 'Resuming charging'
  fi

  sleep $REFRESH_INTERVAL
done

It has less blows and whistles than ACC, but it works like a charm.
 

blksith0

Senior Member
Aug 10, 2008
222
23
My phone is plugged in for 90% of the time.

What settings do I need to configure?
Is the default acc configuration sufficient?


Okay I just read this:
Night/heavy-duty/forever-plugged profile: keep capacity within 40-60% (e.g., acc 50 45) and/or voltage around ~3900 mV


Day/regular profile: max capacity: 75-80% and/or voltage no higher than 4100 mV


Travel profile: capacity up to 95% and/or voltage no higher than 4200 mV
Now I just need some guidance on how to configure this stuff and how to quickly switch profiles.
Please and thanks.
 

HRSE

Senior Member
Feb 24, 2013
227
56
Singapore
Now I just need some guidance on how to configure this stuff and how to quickly switch profiles.
Please and thanks.
AccA was meant for that purpose, but it has not been updated for a long time, and the newer versions of acc are not 100% compatible with AccA. I suggest you play around with AccA first, but if you encounter issue then you need to uninstall AccA/acc, reinstall acc, and configure without the GUI.
I remember acc documentation has info regarding switching profile, but I'm too lazy to do everything myself at this point of my life.
 
  • Like
Reactions: NYLimited

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    On my pixel 7 pro, it would only intermittently work. Sometimes it would stop idling, and sometimes it wouldn't even charge it all. I tried several switches to no avail. Every once in a while it actually would stop at shutoff point and idle for a while, but eventually it would start charging and creep up to 100%. I assume you are on v2022.6.4. What switch are you using and having luck with?
    2022.6.4. I used the same switch as I used on Pixel 6 which I replied the post with the terminal command to another member above. The command was provided by VR25.

    I attached a screen shot for ACCA, but my settings must be entered from adb shell or terminal. Use my screenshot as a reference only.

    I use wireless charging almost exclusively and I confirmed this morning my battery is still at 81% even the wireless charger is on.

    All my chargers have a Led that changes color. When ACC is working at idle state, the Led would flicker so I know it is indeed alternating between charging and discharging.
    1
    ACC is not working on the Motorola edge 30 ultra (stock rom). Any advice?

    yes, read the documentation the dev spent hours writing:


    probably specifically, though you dont specify why its "not working" or provide any useful info :) :

    https://github.com/VR-25/acc/#charging-switch
    1
    Acca is quite outdated and it's malfunctioning on newer systems (in my case it's ok 🤷‍♂️ but i have POCOX3NFC on crDroid9 a13). Try terminal setting.

    hi all. i recently installed ACC, as well as AccA using just the defaults on my Pixel 7 Pro... seemed fine until i went to let it charge to 100%. now the battery reading in the top right keeps "alternating". started at 100% then dropped to 97 and then a few seconds it goes back to 100... been doing this "alternating" of at least 3% all the way down to 50% now... even tried restart the phone 3x, as well as leaving it off for a few minutes before turning back on, but still doing it. any idea what's going on?
    ... you could give another front end a chance: https://github.com/CrazyBoyFeng/AccSettings
    I am very fine with it.
    1
    Too bad the ACC App is not being updated anymore.
    I keep having issues with the config not saving then the app will just crash.

    I need help, I'm trying to enable the reset battery stats on pause using Termux but I'm not sure what I should put exactly on the "(rbsp)". Should it be "true" if I want to enable it?

    So it's going to be like this in Termux: "acc reset_batt_stats_on_pause true"?
    ... as already written I use AccSettings as gui. Regarding the correct syntax for resetting battery stats on pause, see screenshot.
    1
    Mine did that. I uninstalled acc with the uninstaller, deleted any front end apps, turned off adaptive charging mode on my pixel 7 pro and installed the 2022.6.4 version of acc. I ran a test of switches, the only switch that showed idle mode capable for me was 'main-charger/voltage_max 4200000 voltage_now'. I set the switch using acc -ss. I then set my stop/start parameters via the config file. Also made sure batteryidlemode was set to true. Now my charging seems to start/stop and idle correctly. Only 24 hours in, so we'll see if I have any problems going forward. Not sure if completely deleting any acc front end apps or using the uninstaller on GitHub fixed my problem, but now it seems to be working.

    I've done a lot of playing around on my P7, the most stable option I've found is gcpm/constant_charge_current_max 4000000 0
    Although ACC -t shows that doesn't support idle it does when selected - run for over 24 hours switching from wireless to wired charging

    Thanks for both of these responses. I didn't realize I was using a pre-release, so I downgraded to 2022.6.4 and went with this option on the P7NP:
    acc -s s="gcpm/constant_charge_current_max 4000000 0"
    When I plug into USB is now shows USB powered as true. I also don't see the screen randomly turning on and off.

    Thanks!
  • 76
    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.