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
202
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

  • 1
    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.
    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.
  • 1
    This has been working for me as well. However, the last day or two I've noticed that it is charging to 100% while on wireless charger. Do you have anything in the "apply on plug"? I've been going ok without.

    I also miss the battery status saying charging (fast) or (taper). Now it's just charging or discharging (unknown) in ACCA.
    Disregard. Somewhere along the way Accubattery was active (after I'd disabled it). Have uninstalled it entirely and issue seems resolved for now. However the status thing isn't helpful. It used to say "idle".
    1
    AccA is out dated, settings is fine.

    What charge switch do you have set - we've identified the one we feel works a few posts above yours

    Fixed it. Had to turn off adaptive charging and reset the whole thing.
    1
    This is what is set in acca. Yet when I look in termux it shows up capacity control as 5 101 70 75. What is the 101 and where is it coming from? My pixel 7 pro still charges to 100 after some time. Have tried different charging switches and have mcc 3900 mv 500. Just turned off the adaptive battery settings so maybe that will help?
    The 2nd value indicates the charging level which triggers to apply the cool down modus. This cool down modus can e. g. a pattern of charging - not charging - charging - not charging... for a defined amount of seconds (e. g. 50 s charging then 10 s not charging) and/or to reduce the charging current to a different value. I use the latter one, thus my phone is quickly charged to a certain level, then the last percent are charged with a reduced current.
    I assume acc uses 101% if no (!) such cool down modus has been configured.

    edit:
    see the screenshot in https://forum.xda-developers.com/t/advanced-charging-controller-acc.3668427/post-87695451: this is my configuration with 60 % triggering the cool down to 500 mA.
    1
    Hey!

    Did you achieve that by setting the max charge level to 80% and then simply just enabling 'prioritize battery idle mode'?
    I'm trying to achieve a very similar setup where I slow charge the phone overnight but then it's at 80% (or as close as it can be, since the "unplugged" battery discharge nominal) when I unplug & start my day.

    Hey. Yeah, I just set ACC to prioritize idle mode. That was enough with my kernel. Your experience may be different
    1
    I also installed Termux, and navigated to /data/adb/vr25/, but can't run any "acc" command.
    You needn't navigate to any folders. After launching Termux, type "su," hit enter, then you can use all "acc" commands.
  • 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.