Advanced Charging Controller (ACC)

ACC is an Android software mainly intended for extending battery service life. In a nutshell, this is achieved through limiting charging current, temperature and voltage. Any root solution is supported. The installation is always “systemless”, whether or not the system is rooted with Magisk.

Requirements

  • Must read – how to prolong lithium ion batteries lifespan
  • Android or Android based OS
  • Any root solution (e.g., Magisk)
  • Busybox* (only if not rooted with Magisk)
  • curl (for acc –upgrade, optional)
  • Non-Magisk users can enable acc auto-start by running /data/adb/vr25/acc/service.sh, a copy of, or a link to it – with init.d or an app that emulates it.
  • Terminal emulator
  • Text editor (optional)

* A busybox binary can simply be placed in /data/adb/vr25/bin/. Permissions (0700) are set automatically, as needed. Precedence: /data/adb/vr25/bin/busybox > Magisk’s busybox > system’s busybox

Other executables or static binaries can also be placed in /data/adb/vr25/bin/ (with proper permissions) instead of being installed system-wide.

Download Advanced Charging Controller Magisk Module

You can get the latest version of Advanced Charging Controller by clicking the below link:

Here’s all the available versions:

v2022.2.22.1

v2022.2.20

v2022.2.3

v2022.1.8

v2021.12.20

v2021.12.14

v2021.11.3

v2021.10.30

v2021.9.20

v2021.9.19

v2021.9.5

v2021.8.31

v2021.8.29

v2021.8.4

v2021.8.2

v2021.7.28.1

**v2021.7.28 (202107280)**

  • acc -p|--parse: helps find potential charging switches quickly, for any device; refer to --help for details.

  • Additional charging switches
  • Disable charging after a reboot, if min < capacity < max.
  • Extended test ([[...]]) alternative function for better shell compatibility

  • Fixed issue #89: "--"" not respected in charging switch options.
  • Fixed issue #90: acc is disabled in Magisk, but it keeps starting.
  • Fixed issue #97: accd dies after plugging USB cable (thanks, @530f6caa).

  • General fixes & optimizations
  • German translation by @marrobHD
  • Max allowed custom charging voltage limit set to 4300 millivolts.

  • Cooldown, pause, shutdown and resume capacities can be in millivolts instead of percentages (beta feature).

  • Post Android shutdown warning notifications at sc+10%, sc+5%, sc+300mV and sc+100mV (beta feature).

  • Save data to /data/adb/vr25/acc-data/, for security reasons.
  • Strip negative sign from current if battery is charging.
  • Updated documentation.

Release Notes

  • acc pause_millivolts resume_millivolts, e.g., acc 3920 3800, is yet another "cheap" alternative to direct charging voltage control.

  • If you've been facing the "accd stops randomly" issue, share the output of acc -l tail as soon as you notice the problem.

  • If you need more charging switches, try acc -p while charging; it'll print potential candidates. The results can be batch tested with acc -t /path/to/list or acc -t file on off.

  • Upgrading to this version will reset config.txt.

v2021.2.25

v2020.11.20

v2020.10.28

v2020.10.24

2020.10.15

2020.10.14

v2020.10.8

v2020.10.1

v2020.9.24

v2020.9.14

v2020.7.26

v2020.7.19

v2020.7.3

Requirements

Installation

BUILDING AND/OR INSTALLING FROM SOURCE

Dependencies (Build)

  • git, wget, or curl (pick one)
  • zip

Build Tarballs and Flashable Zips

  1. Download and extract the source code: git clone https://github.com/VR-25/acc.git or wget https://github.com/VR-25/acc/archive/master.tar.gz -O - | tar -xz or curl -L# https://github.com/VR-25/acc/archive/master.tar.gz | tar -xz
  2. cd acc*
  3. sh build.sh (or double-click build.bat on Windows 10, if you have Windows subsystem for Linux (with zip) installed)

Notes

  • build.sh automatically sets/corrects id=* in *.sh and update-binary files. Refer to framework-details.txt for a full list of tasks carried out by it. To skip generating archives, run the build script with a random argument (e.g. bash build.sh h).
  • The output files are (in _builds/acc-$versionCode/): acc-$versionCode.zipacc-$versionCode.tar.gz, and install-tarball.sh.
  • To update the local source code, run git pull --force or re-download it (with wget/curl) as described above.

Install from Local Source or GitHub

  • [export installDir=<parent install dir>] sh install.sh installs acc from the extracted source.
  • sh install-online.sh [-c|--changelog] [-f|--force] [-k|--insecure] [-n|--non-interactive] [%parent install dir%] [commit] downloads and installs acc from GitHub – e.g., sh install-online.sh dev. The order of arguments doesn’t matter. For upgrades, if %parent install dir% is not supplied, the original/current is used.
  • sh install-tarball.sh [module id, default: acc] [parent install dir (e.g., /data/data/mattecarra.accapp/files)] installs the tarball (acc*gz) from the script’s location. The archive must be in the same directory as this script – and obtained from GitHub: https://github.com/VR-25/acc/archive/$commit.tar.gz ($commit examples: master, dev, v2020.5.20-rc).

Notes

  • install-online.sh is the acc --upgrade back-end.
  • The default parent installation directories, in order of priority, are: /data/data/mattecarra.accapp/files/ (ACC App, but only if Magisk is not installed), /data/adb/modules/ (Magisk) and /data/adb/ (other root solutions).
  • No argument/option is strictly mandatory. The exception is --non-interactive for front-end apps.
  • The --force option to install-online.sh is meant for re-installation and downgrading.
  • sh install-online.sh --changelog --non-interactive prints the version code (integer) and changelog URL (string) when an update is available. In interactive mode, it also asks the user whether they want to download and install the update.
  • You may also want to read Terminal Commands > Exit Codes below.

DEFAULT CONFIGURATION

#DC#

configVerCode=202201010
capacity=(-1 60 70 75 false false)
temperature=(40 60 90 65)
cooldownRatio=()
cooldownCurrent=
cooldownCustom=()
resetBattStats=(false false)
chargingSwitch=()
applyOnBoot=()
applyOnPlug=()
maxChargingCurrent=()
maxChargingVoltage=()
language=en
runCmdOnPause=()
ampFactor=
voltFactor=
loopCmd=()
prioritizeBattIdleMode=false
currentWorkaround=false


# WARNINGS

# Do not edit this in Windows Notepad, ever!
# It replaces LF (Linux/Unix) with CRLF (Windows) line endings.

# As you may have guessed, what is null by default, can be null.
# "language=" is interpreted as "language=en".
# Nullifying values that should not be null causes unexpected behavior.
# However, doing so with "--set var=" restores the default value of "var".
# In other words, for regular users, "--set" is safer than modifying the config file directly.

# Do not feel like you must configure everything!
# Do not change what you don't understand.


# NOTES

# The daemon does not have to be restarted after making changes to this file - unless one of the changes is charging_switch.

# A change to current_workaround (cw) only takes effect after an acc [re]initialization (install, upgrade or "accd --init") or system reboot.

# If those 2 variables are updated with "acc --set" (not acca --set), accd is restarted automatically (--init is implied as needed).


# BASICS

# capacity=(shutdown_capacity cooldown_capacity resume_capacity pause_capacity capacity_sync capacity_mask)

# temperature=(cooldown_temp max_temp max_temp_pause shutdown_temp)

# cooldownRatio=(cooldown_charge cooldown_pause)

# cooldownCustom=cooldown_custom=(file raw_value charge_seconds pause_seconds)

# cooldownCurrent=cooldown_current=[milliamps]

# resetBattStats=(reset_batt_stats_on_pause reset_batt_stats_on_unplug)

# chargingSwitch=charging_switch=(ctrl_file1 on off ctrl_file2 on off --)

# chargingSwitch=charging_switch=(milliamps)

# chargingSwitch=charging_switch=(3700)

# applyOnBoot=apply_on_boot=(ctrl_file1::value[::default] ctrl_file2::value[::default] ... --exit)

# applyOnPlug=apply_on_plug=(ctrl_file1::value[::default] ctrl_file2::value[::default] ...)

# maxChargingCurrent=max_charging_current=([value] ctrl_file1::value::default ctrl_file2::value::default ...)

# maxChargingVoltage=max_charging_voltage=([value] ctrl_file1::value::default ctrl_file2::value::default ...) --exit)

# maxChargingCurrent=max_charging_current=([value] ctrl_file1::value::default1 ctrl_file2::value::default2 ...)

# maxChargingVoltage=max_charging_voltage=([value] ctrl_file1::value::default1 ctrl_file2::value::default2 ...) --exit)

# language=lang=language_code

# runCmdOnPause=run_cmd_on_pause=(. script)

# ampFactor=amp_factor=[multiplier]

# voltFactor=volt_factor=[multiplier]

# loopCmd=loop_cmd=(. script)

# prioritizeBattIdleMode=prioritize_batt_idle_mode=boolean

# currentWorkaround=current_workaround=boolean


# VARIABLE ALIASES/SHORTCUTS

# cc cooldown_capacity
# rc resume_capacity
# pc pause_capacity
# cs capacity_sync
# cm capacity_mask

# sc shutdown_capacity
# ct cooldown_temp
# cch cooldown_charge
# cp cooldown_pause

# mt max_temp
# mtp max_temp_pause

# st shutdown_temp

# ccu cooldown_custom
# cdc cooldown_current

# rbsp reset_batt_stats_on_pause
# rbsu reset_batt_stats_on_unplug

# s charging_switch

# ab apply_on_boot
# ap apply_on_plug

# mcc max_charging_current
# mcv max_charging_voltage

# l lang
# rcp run_cmd_on_pause

# af amp_factor
# vf volt_factor

# lc loop_cmd
# pbim prioritize_batt_idle_mode
# cw current_workaround


# COMMAND EXAMPLES

# acc 85 80
# acc -s pc=85 rc=80
# acc --set pause_capacity=85 resume_capacity=80

# acc -s "s=battery/charging_enabled 1 0"
# acc --set "charging_switch=/proc/mtk_battery_cmd/current_cmd 0::0 0::1 /proc/mtk_battery_cmd/en_power_path 1 0"
# NOTE: "::" is used as a whitespace placeholder in "/proc/mtk_battery_cmd/current_cmd 0::0 0::1" charging switch only.

# acc -s -v 3920 (millivolts)
# acc -s -c 500 (milliamps)

# custom config path
# acc /data/acc-night-config.txt 45 43
# acc /data/acc-night-config.txt -s c 500
# accd /data/acc-night-config.txt

# acc -s "ccu=battery/current_now 1450000 100 20"
# acc -s "cooldown_custom=battery/current_now 1450000 100 20"
# acc -s ccu="/sys/devices/virtual/thermal/thermal_zone1/temp 55 50 10"

# acc -s amp_factor=1000
# acc -s volt_factor=1000000

# acc -s mcc=500 mcv="3920 --exit"

# acc -s loop_cmd="echo 0 \\> battery/input_suspend"

# acc -s cooldown_current=500

# acc -s st=60


# FINE, BUT WHAT DOES EACH OF THESE VARIABLES ACTUALLY MEAN?

# configVerCode #
# This is checked during updates to determine whether config should be patched. Do NOT modify.

# shutdown_capacity (sc) #
# When the battery is discharging and its capacity/voltage_now_millivolts <= sc and phone has been running for 15 minutes or more, acc daemon turns the phone off to reduce the discharge rate and protect the battery from potential damage induced by voltage below the operating range.
# sc=-1 disables it.

# cooldown_capacity (cc) #
# Capacity/voltage_now_millivolts at which the cooldown cycle starts.
# Cooldown reduces battery stress induced by prolonged exposure to high temperature and high charging voltage.
# It does so through periodically pausing charging for a few seconds (more details below).

# resume_capacity (rc) #
# Capacity or voltage_now_millivolts at which charging should resume.

# pause_capacity (pc) #
# Capacity or voltage_now_millivolts at which charging should pause.

# capacity_sync (cs) #
# Some devices, notably from the Pixel lineup, have a capacity discrepancy issue between Android and the kernel.
# capacity_sync forces Android to report the actual battery capacity supplied by the kernel.
# The discrepancy is usually detected and corrected automatically by accd.
# This setting overrides the automatic behavior.
# Besides, it also prevents Android from getting capacity readings below 2%, since some systems shutdown before battery level actually drops to 0%.

# capacity_mask (cm) #
# Implies capacity_sync.
# This forces Android to report "capacity = capacity * (100 / pause_capacity)", effectively masking capacity limits (more like capacity_sync on steroids).
# It also prevents Android from getting capacity readings below 2%, since some systems shutdown before battery level actually drops to 0%.

# cooldown_temp (ct) #
# Temperature (°C) at which the cooldown cycle starts.
# Cooldown reduces the battery degradation rate by lowering the device's temperature.
# Refer back to cooldown_capacity for more details.

# max_temp (mt) #
# mtp or max_temp_pause #
# These two work together and are NOT tied to the cooldown cycle.
# On max_temp (°C), charging is paused for max_temp_pause (seconds).
# Unlike the cooldown cycle, which aims at reducing BOTH high temperature and high voltage induced stress - this is ONLY meant specifically for reducing high temperature induced stress.
# Even though both are separate features, this complements the cooldown cycle when environmental temperatures are off the charts.

# shutdown_temp (st) #
# Shutdown the system if battery temperature >= this value.

# cooldown_charge (cch) #
# cooldown_pause (cp) #
# These two dictate the cooldown cycle intervals (seconds).
# When not set, the cycle is disabled.
# Suggested values are cch=50 and cp=10.
# If charging gets a bit slower than desired, try cch=50 and cp=5.
# Note that cooldown_capacity and cooldown_temp can be disabled individually by assigning them values that would never be reached under normal circumstances.

# cooldown_custom (ccu) #
# When cooldown_capacity and/or cooldown_temp don't suit your needs, this comes to the rescue.
# It takes precedence over the regular cooldown settings.
# Refer back the command examples.

# cooldown_current (cdc) #
# Instead of pausing charging periodically during the cooldown phase, limit the max charging current (e.g., to 500 mA)

# reset_batt_stats_on_pause (rbsp) #
# Reset battery stats after pausing charging.

# reset_batt_stats_on_unplug (rbsu) #
# Reset battery stats if the charger has been unplugged for 10 seconds.

# charging_switch (s) #
# If unset, acc cycles through its database and sets the first working switch/group that disables charging.
# If the set switch/group doesn't work, acc unsets chargingSwitch and repeats the above.
# If all switches fail to disable charging, chargingSwitch is unset and acc/d exit with error code 7.
# This automated process can be disabled by appending " --" to "charging_switch=...".
# e.g., acc -s s="battery/charge_enabled 1 0 --"
# acc -ss always appends " --".
# charging_switch=milliamps (e.g., 0, 250 or 500) enables current-based charging control.
# If charging switch is set to 3700 (millivolts), acc stops charging by limiting voltage.
# For details, refer to the readme's tips section.
# Unlike the original variant, this kind of switch is never unset automatically.
# Thus, in this case, appending " --" to it leads to invalid syntax.
# A daemon restart is required after changing this (automated by "acc --set").

# apply_on_boot (ab) #
# Settings to apply on boot or daemon start/restart.
# The --exit flag (refer back to applyOnBoot=...) tells the daemon to stop after applying settings.
# If the --exit flag is not included, default values are restored when the daemon stops.

# apply_on_plug (ap) #
# Settings to apply on plug
# This exists because some /sys files (e.g., current_max) are reset on charger re-plug.
# Default values are restored on unplug and when the daemon stops.

# max_charging_current (mcc) #
# max_charging_voltage (mcv) #
# Only the current/voltage value is to be supplied.
# Control files are automatically selected.
# Refer back to the command examples.

# lang (l) #
# acc language, managed with "acc --set --lang" (acc -s l).

# run_cmd_on_pause (rcp) #
# Run commands* after pausing charging.
# * Usually a script ("sh some_file" or ". some_file")

# amp_factor (af) #
# volt_factor (vf) #
# Unit multiplier for conversion (e.g., 1V = 1000000 Microvolts)
# ACC can automatically determine the units, but the mechanism is not 100% foolproof.
# e.g., if the input current is too low, the unit is miscalculated.
# This issue is rare, though.
# Leave these properties alone if everything is running fine.

# loop_cmd (lc) #
# This is meant for extending accd's functionality.
# It is periodically executed by is_charging() - which is called regularly, within the main accd loop.
# The boolean isCharging is available.
# Refer back to COMMAND EXAMPLES.

# prioritize_batt_idle_mode (pbim) #
# If enabled charging switches that support battery idle mode take precedence.
# It is only used when charging_switch is not set.
# This is disabled by default due to issues on Samsung (store_mode) and other devices.

# current_workaround (cw) #
# Only use current control files whose paths match "batt" (default: false).
# This is necessary only if the current limit affects both input and charging current values.
# Try this if low current values don't work.
# "accd --init" is required after changing this (automated by "acc --set").

#/DC#

SETUP/USAGE

As the default configuration (above) suggests, ACC is designed to run out of the box, with little to no customization/intervention.

The only command you have to remember is acc. It’s a wizard you’ll either love or hate.

If you feel uncomfortable with the command line, skip this section and use a front-end app instead.

Alternatively, you can use a text editor to modify /data/adb/vr25/acc-data/config.txt. The config file itself has configuration instructions. Those are the same found in the default configuration section, above.

Terminal Commands

#TC#

Usage

  acc   Wizard

  accd   Start/restart accd

  accd.   Stop acc/daemon

  accd,   Print acc/daemon status (running or not)

  acc [pause_capacity/millivolts [resume_capacity/millivolts, default: pause_capacity/millivolts - 5%/50mV]]
    e.g.,
      acc 75 70
      acc 80 (resume_capacity defaults to 80% - 5)
      acc 3920 (same as acc 3920 3870, great idle mode alternative)

  acc [options] [args]   Refer to the list of options below

  acca [options] [args]   acc optimized for front-ends

  acc[d] -x [options] [args]   Sets log=/sdcard/acc[d]-${device}.log; useful for debugging unwanted reboots

  A custom config path can be specified as first parameter (second if -x is used).
  If the file doesn't exist, the current config is cloned.
    e.g.,
      acc /data/acc-night-config.txt --set pause_capacity=45 resume_capacity=43
      acc /data/acc-night-config.txt --set --current 500
      accd /data/acc-night-config.txt


Options

  -b|--rollback   Undo upgrade

  -c|--config [editor] [editor_opts]   Edit config (default editor: nano/vim/vi)
    e.g.,
      acc -c (edit w/ nano/vim/vi)
      acc -c less
      acc -c cat

  -d|--disable [#%, #s, #m or #h (optional)]   Disable charging
    e.g.,
      acc -d 70% (do not recharge until capacity <= 70%)
      acc -d 1h (do not recharge until 1 hour has passed)

  -D|--daemon   Print daemon status, (and if running) version and PID
    e.g., acc -D (alias: "accd,")

  -D|--daemon [start|stop|restart]   Manage daemon
    e.g.,
      acc -D start (alias: accd)
      acc -D restart (alias: accd)
      accd -D stop (alias: "accd.")

  -e|--enable [#%, #s, #m or #h (optional)]   Enable charging
    e.g.,
      acc -e 75% (recharge to 75%)
      acc -e 30m (recharge for 30 minutes)

  -f|--force|--full [capacity]   Charge once to a given capacity (default: 100%), without restrictions
    e.g.,
      acc -f 95 (charge to 95%)
      acc -f (charge to 100%)
    Note: if the desired % is less than pause_capacity, use acc -e #%

  -F|--flash ["zip_file"]   Flash any zip files whose update-binary is a shell script
    e.g.,
      acc -F (lauches a zip flashing wizard)
      acc -F "file1" "file2" "fileN" ... (install multiple zips)
      acc -F "/sdcard/Download/Magisk-v20.0(20000).zip"

  -i|--info [case insensitive egrep regex (default: ".")]   Show battery info
    e.g.,
      acc -i
      acc -i volt
      acc -i 'volt\|curr'

  -l|--log [-a|--acc] [editor] [editor_opts]   Print/edit accd log (default) or acc log (-a|--acc)
    e.g.,
      acc -l (same as acc -l less)
      acc -l rm
      acc -l -a cat
      acc -l grep ': ' (show explicit errors only)

  -la   Same as -l -a

  -l|--log -e|--export   Export all logs to /data/adb/vr25/acc-data/logs/acc-logs-$deviceName.tar.gz
    e.g., acc -l -e

  -le   Same as -l -e

  -p|--parse [<base file> <file to parse>]|[file to parse]   Helps find potential charging switches quickly, for any device
    e.g.,
      acc -p   Parse /logs/power_supply-\*.log and print potential charging switches not present in /ch-switches
      acc -p /sdcard/power_supply-harpia.log   Parse the given file and print potential charging switches that are not already in /ch-switches
      acc -p /sdcard/charging-switches.txt /sdcard/power_supply-harpia.log   Parse /sdcard/power_supply-harpia.log and print potential charging switches absent from /sdcard/charging-switches.txt

  -r|--readme [editor] [editor_opts]   Print/edit README.md
    e.g.,
      acc -r (same as acc -r less)
      acc -r cat

  -R|--resetbs   Reset battery stats
    e.g., acc -R

  -s|--set   Print current config
    e.g., acc -s

  -s|--set prop1=value "prop2=value1 value2"   Set [multiple] properties
    e.g.,
      acc -s charging_switch=
      acc -s pause_capacity=60 resume_capacity=55 (shortcuts: acc -s pc=60 rc=55, acc 60 55)
      acc -s "charging_switch=battery/charging_enabled 1 0" resume_capacity=55 pause_capacity=60
    Note: all properties have short aliases for faster typing; run "acc -c cat" to see these

  -s|--set c|--current [milliamps|-]   Set/print/restore_default max charging current (range: 0-9999 Milliamps)
    e.g.,
      acc -s c (print current limit)
      acc -s c 500 (set)
      acc -s c - (restore default)

  -sc [milliamps|-]   Same as above

  -s|--set l|--lang   Change language
    e.g., acc -s l

  -sl   Same as above

  -s|--set d|--print-default [egrep regex (default: ".")]   Print default config without blank lines
    e.g.,
      acc -s d (print entire defaul config)
      acc -s d cap (print only entries matching "cap")

  -sd [egrep regex (default: ".")]   Same as above

  -s|--set p|--print [egrep regex (default: ".")]   Print current config without blank lines (refer to previous examples)

  -sp [egrep regex (default: ".")]   Same as above

  -s|--set r|--reset   Restore default config
    e.g.,
      acc -s r
      rm /data/adb/vr25/acc-data/config.txt (failsafe)

  -sr   Same as above

  -s|--set s|charging_switch   Enforce a specific charging switch
    e.g., acc -s s

  -ss    Same as above

  -s|--set s:|chargingSwitch:   List known charging switches
    e.g., acc -s s:

  -ss:   Same as above

  -s|--set v|--voltage [millivolts|-] [--exit]   Set/print/restore_default max charging voltage (range: 3700-4300 Millivolts)
    e.g.,
      acc -s v (print)
      acc -s v 3920 (set)
      acc -s v - (restore default)
      acc -s v 3920 --exit (stop the daemon after applying settings)

  -sv [millivolts|-] [--exit]   Same as above

  -t|--test [ctrl_file1 on off [ctrl_file2 on off]]   Test custom charging switches
    e.g.,
      acc -t battery/charging_enabled 1 0
      acc -t /proc/mtk_battery_cmd/current_cmd 0::0 0::1 /proc/mtk_battery_cmd/en_power_path 1 0 ("::" is a placeholder for " " - MTK only)

  -t|--test [file]   Test charging switches from a file (default: /dev/.vr25/acc/ch-switches)
    Control files that trigger reboots or kernel panics are automatically backlisted
    e.g.,
      acc -t (test known switches)
      acc -t /sdcard/experimental_switches.txt (test custom/foreign switches)

  -T|--logtail   Monitor accd log (tail -F)
    e.g., acc -T

  -u|--upgrade [-c|--changelog] [-f|--force] [-k|--insecure] [-n|--non-interactive]   Online upgrade/downgrade (requires curl)
    e.g.,
      acc -u dev (upgrade to the latest dev version)
      acc -u (latest version from the current branch)
      acc -u master^1 -f (previous stable release)
      acc -u -f dev^2 (two dev versions below the latest dev)
      acc -u v2020.4.8-beta --force (force upgrade/downgrade to v2020.4.8-beta)
      acc -u -c -n (if update is available, prints version code (integer) and changelog link)
      acc -u -c (same as above, but with install prompt)

  -U|--uninstall   Completely remove acc and AccA
    e.g., acc -U

  -v|--version   Print acc version and version code
    e.g., acc -v

  -w#|--watch#   Monitor battery uevent
    e.g.,
      acc -w (update info every 3 seconds)
      acc -w0.5 (update info every half a second)
      acc -w0 (no extra delay)


Exit Codes

  0. True/success
  1. False or general failure
  2. Incorrect command syntax
  3. Missing busybox binary
  4. Not running as root
  5. Update available ("--upgrade")
  6. No update available ("--upgrade")
  7. Failed to disable charging
  8. Daemon already running ("--daemon start")
  9. Daemon not running ("--daemon" and "--daemon stop")
  10. "--test" failed
  11. Current (mA) out of 0-9999 range
  12. Initialization failed
  13. Failed to lock /dev/.vr25/acc/acc.lock
  14. ACC wont initialize because the Magisk module disable flag is set

  Logs are exported automatically ("--log --export") on exit codes 1, 2, 7 and 10.


Tips

  Commands can be chained for extended functionality.
    e.g., charge for 30 minutes, pause charging for 6 hours, charge to 85% and restart the daemon
    acc -e 30m && acc -d 6h && acc -e 85 && accd

  Sample profile
    acc -s pc=45 rc=43 mcc=500 mcv=3920
      This keeps battery capacity between 43-45%, limits charging current to 500 mA and voltage to 3920 millivolts.
      It's great for nighttime and "forever-plugged".

  Refer to acc -r (or --readme) for the full documentation (recommended)

#/TC#