Advanced Charging Controller icon

Advanced Charging Controller

v2023.10.16guide

Advanced Charging Controller

★2,416 stars
•Battery & Power Management•by VR-25•GPL-3.0•Updated Oct 16, 2023
Platforms:
✓ Magisk✓ KernelSU✓ APatch

Overview

The Advanced Charging Controller (ACC), developed by VR25, is the most comprehensive, versatile power management daemon available for rooted Android devices.

Standard Android operating systems charge lithium-ion batteries to 100% capacity at maximum permissible voltages (often 4.35V to 4.45V) and sustain high charging currents even as internal temperatures rise. This rapid charging and high-voltage saturation accelerates battery degradation, causing premature cell swelling, permanent capacity loss, and decreased discharge endurance.

ACC transforms your device’s power behavior by interfacing directly with the Linux kernel’s power supply subsystem (/sys/class/power_supply/). It enables fine-grained control over charging thresholds, maximum charging current (milliamps), voltage cutoffs, and battery thermal policies.


Technical Architecture & Kernel Power Switches

Modern Android devices manage power through hardware PMICs (Power Management Integrated Circuits) controlled by kernel drivers. These drivers expose writable attribute nodes in sysfs:

┌────────────────────────────────────────────────────────┐
│                   acc daemon (accd)                    │
│   - Reads battery temperature & capacity               │
│   - Enforces pause/resume rules                        │
└───────────────────────────┬────────────────────────────┘
                            │ writes 0 or 1
┌───────────────────────────▼────────────────────────────┐
│      Kernel Sysfs Power Nodes (/sys/class/power_supply)│
│  - battery/charging_enabled                            │
│  - battery/input_suspend                               │
│  - bms/charge_control_limit_max                        │
└───────────────────────────┬────────────────────────────┘
                            │ I2C / SPMI bus
┌───────────────────────────▼────────────────────────────┐
│           Hardware PMIC (Qualcomm / MediaTek)          │
│  Directs electrical current to battery vs motherboard  │
└────────────────────────────────────────────────────────┘

When the battery capacity reaches your configured threshold (e.g. 80%), accd writes the appropriate disable byte to the kernel charging switch. If the kernel supports Battery Idle Mode, charging current to the battery drops to 0 mA while the device draws operational current directly from the wall charger.


Installation & Initial Configuration

Installation

  1. Download acc_v*.zip from the official release page.
  2. Flash the module in Magisk, KernelSU, or APatch.
  3. Reboot your device.

Verifying Installation & Status

Open any root terminal emulator (e.g. Termux or Material Terminal) and run:

su
acc -i

This displays real-time battery diagnostics:

  • Current capacity (%)
  • Real-time current flow (mA)
  • Battery temperature (°C)
  • Current charging status and active charging switch

Essential CLI Commands & Common Configurations

ACC provides a rich CLI interface via the acc binary:

1. Setting Capacity Thresholds

To pause charging at 80% and resume charging when the battery drops to 70%:

su -c acc 80 70

2. Setting Maximum Charging Current

To protect battery health during overnight charging by restricting maximum current to 1500 mA (1.5A):

su -c acc -s c_max=1500

3. Setting Temperature Limits

To prevent battery degradation caused by high ambient heat or heavy gaming, halt charging if temperature exceeds 40°C and resume at 37°C:

su -c acc -s temp=40-37

4. Running the Switch Discovery Test

To ensure your device uses the most stable kernel charging switch:

su -c acc -t

ACC will test each available switch, monitor current draw, verify whether the phone enters true idle mode, and blacklist switches that trigger sudden reboots.


Hardware Warnings & OEM Quirks

Xiaomi Devices (Poco X3 Pro & Similar PMICs)

  • Known Issue: Certain Xiaomi devices have buggy PMIC hardware that can occasionally lock up if charging is suspended while the battery is extremely low.
  • Guideline: Ensure the low-battery auto-shutdown threshold is maintained (default is 5% capacity):
    su -c acc -s shutdown_capacity=5
  • If charging ever becomes non-responsive, boot the device into Fastboot/Bootloader mode and select Reboot System to reset the hardware PMIC registers.

Emergency Recovery & Safe Disabling

ACC is engineered with fail-safe mechanisms to prevent unrecoverable bootloops:

  1. 60-Second Post-Boot Timer: The daemon waits 60 seconds after the boot animation ends before loading the charging configuration.
  2. Instant Emergency Disable: Connect via ADB:
    adb wait-for-device shell
    su
    touch /data/adb/vr25/acc-data/disable
    reboot
  3. Module Uninstallation:
    rm -rf /data/adb/modules/acc
    rm -rf /data/adb/vr25

Frequently Asked Questions

Why is limiting charging to 80% beneficial for my device?

Lithium-ion cells experience exponential electrochemical stress when charged above 4.10V (approx. 80-85% state-of-charge). By capping charging at 80% and avoiding high-temperature saturation phases, ACC can increase battery cycle lifespan by 300% to 500%.

What should I do if my phone reboots when charging stops?

Some device kernels panic when an incompatible charging switch is toggled. Run su -c acc -t in a terminal; this automated test systematically tests every charging switch in /sys/class/power_supply/ and automatically blacklists switches that cause reboots.

How does the emergency disable safety feature work?

ACC incorporates a 60-second safety delay after boot animation stops before starting the daemon. If you ever experience issues upon boot, you have a full minute to run su -c accd -x or touch /data/adb/vr25/acc-data/disable, which immediately halts and prevents the daemon from launching.