Advanced Charging Controller

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. Regardless of whether the system is rooted with KernelSU/Magisk, the installation is always “systemless”.


LICENSE

Copyright 2017-2024, VR25

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.


DISCLAIMER

Always read/reread this reference prior to installing/upgrading this software.

While no cats have been harmed, the author assumes no responsibility for anything that might break due to the use/misuse of it.

To prevent fraud, do NOT mirror any link associated with this project. Do NOT share builds (tarballs/zips)! Share official links instead.


WARNINGS

ACC manipulates Android low level (kernel) parameters which control the charging circuitry. The author assumes no responsibility under anything that might break due to the use/misuse of this software. By choosing to use/misuse it, you agree to do so at your own risk!

Some devices, notably from Xiaomi (e.g., Poco X3 Pro), have a faulty PMIC (Power Management Integrated Circuit) that can be triggered by acc. The issue blocks charging. Ensure the battery does not discharge too low. Using acc’s auto shutdown feature is highly recommended (default shutdown_capacity is 5).

Refer to this XDA post for additional details.

lybxlpsv suggests booting into bootloader/fastboot and then back into system to reset the PMIC.


DONATIONS

Please, support the project with donations (links at the bottom). As the project gets bigger and more popular, the need for coffee goes up as well.


PREREQUISITES

* A busybox binary can simply be placed in /data/adb/vr25/bin/. Permissions (0755) are set automatically, as needed. Precedence: /data/adb/vr25/bin/busybox > KernelSu’s or 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.


QUICK START GUIDE

  1. All commands/actions require root.

  2. Install/upgrade: flash* the zip or use a front-end app. There are two additional ways of upgrading: acc --upgrade (online) and acc --flash (zip flasher). Rebooting after installation/removal is generally unnecessary. Manual uninstall before upgrade is unnecessary.

  3. [Optional] run acc (wizard). That’s the main command to remember.

  4. [Optional] run acc pause_capacity resume_capacity (default 75 70) to set the battery levels at which charging should pause and resume, respectively.

  5. If you come across any issues, refer to the troubleshooting, tips and FAQ sections below. Read as much as you can, prior to reporting issues and/or asking questions. Oftentimes, solutions/answers will be right before your eyes.

Notes

Steps 2 and 3 are optional because there are default settings. For details, refer to the default configuration section below. Users are encouraged to try step 2 - to familiarize themselves with the available options.

Settings can be overwhelming. Start with what you understand. The default configuration has you covered. Don’t ever feel like you have to configure everything. You probably shouldn’t anyway - unless you really know what you’re doing.

Uninstall: run acc --uninstall or flash* /data/adb/vr25/acc-data/acc-uninstaller.zip.

ACC runs in some recovery environments as well. Unless the zip is flashed again, manual initialization is required. The initialization script is /data/adb/vr25/acc/service.sh.


BUILDING AND/OR INSTALLING FROM SOURCE

Dependencies (Build)

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

Install from Local Source or GitHub

curl -sSL https://raw.githubusercontent.com/VR-25/acc/dev/install-online.sh | /system/bin/sh -s dev

wget -qO- https://raw.githubusercontent.com/VR-25/acc/dev/install-online.sh | /system/bin/sh -s dev

Notes


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

#UOET#Tspxi/CaaaaaaaaaAINt-------------------------------------------------i01234567891111111LpCOSRT#gccccccccfoibcccdDDefFhHillllnprRssssssssssssssssssssstttTuUwt..........0123456osonaeCeccccceccccet--o||e|e|e|e|e|e|e|e|e|||e|ea|ee|e|e||e|e|e|eN|ec|el|ed|p|er|es|es|es|ev|e|e|Ie|e|e|ee[e.......gmeaemaf#ddd.a[ut.en--.-.-.-.-.-.-.-.-.---.-.-.-.-.--.-.-.-.o-.-.-.--.-.-.:-.:-.-.-.-m.-.-.-..#.CTFIMNUNFDDsm.cpce.,[gaaa[dshgaaasTTs--gaaa-gaa-g-gaaa-g-gaaa-gaaa-gaaa-gaaa---gaaa-gaaaa-g-g-gaaa--g-g-g-gaaat-gaaa[-g-gaaa[-[-ga[-g-g-g:-gaaaa[-gaa-gaa-pg-g-gaaaaaaa-gg]gaaaaoraniopoaaaACIFAIFagcclcTIrp.ccco[]te.ccchhrc.cccc.ccc.d.cccd.d.ccce.cccf.cccf.ccchhi.cccl.ccccl.n.p.cccrr.s.s.s.ccces.cccms.s.ccceses.cas.s.s.s.ccccmt.cct.cctl.l.u.cccccccu.v..ccccdulcstdieelunaCdaan.aehtWa,cccpoo,cccreeoo,ccco,cco,i,ccca,a,cccn,ccco,cccl,ccceen,ccco,ccccSo,So,a,cccee,e,e,e,ccc:e,cccie,Se,cccgege,c]e,e,e,e,ccccie,cce,ccei,o,p,cccccccn,e,,cccceesosaulmmlriiClird,-n-i'tiSutp-mfdelnnnseedaralafgagatrasttttltatrtrttStSttlssseggir-s/erirtpeoortlelesepsssoztSPs783itxi//goclf---f--faa---mam--b---c---s---plo-------mamias---deaaa---a---lam---ee-aaaaaS----lt--t--tsatar-------nasaw----srnueddnnceiewectraatre509oicldd/arobiccciccicbdddocoDD-leeeefffhFFFtiii[lllle-cefcepppmtccfcpssslcsssilcedsssppprsscmscmscassssittttcacauuuuuuuscicawwwwuoegnahnadomdech3aopkgarroi_0no[oeaadrdnagggclncnDe|[h[-eccebccicrl|a|c|||S|ce:ce:cmv[[[-cicdtcoct00crcnattanatlnoxaa0kfcercdtpnc7(0snonttadefc(lcade714sr734-9(-[(""[ca(r-ga|a[[//sPlocp"-cccm-a-ddcr-r-rac|:evvvvocb/f(/pxled(m-v--anc(.cctbiveolorit'dtpnrmei=eec/ta0r]spfdaatirik[eeaah-0h0-[tes[500-5cs"lf/e<aoo|smars--s[-<ss[-r-e-phacp-p--s-ae-e-mh-ac-a|-ltapits|,--elaf2ccl-hu5(uegunartg(zoteoogl6parape(]tio//ang[dst|:sc[%0Dsast#%m0fhzaisdmsll-ae-l"nbPddgRiss1auhrc(5-slsp(cpgpgreasshsscsa(33trtrledptT[vas0lU[pnrsecsgiadeimarbe&ae0st-ecaass[igeaa/go[eisdls#(0Ptrto%0u(amiuldiAett-mcp-e-Saaccn=rsaoup0|aarpa,ereerahsop99sltoescaa-ttd2-(#d(orsnoylviarnAtliiete&drscccuaa[osccafpndtseth%(dmr(atap,((mlcrcpcecth,aealx-lT"sraafRt/vgerprr0(-nlbirptxixsagsarsaaslr0(0|_ec]tarspMc(eee0nsP]au,embaaasdug)ionsnefvmbft/cimmranpncccaavisler,doviarrrrvlhgc_h1ao>icct'peRHesrroeGdai_gerir]gonienesibg:br:ati0r0-fr/rso|usrv.artpevrmosbiaynociadcoaacaoad/teegrsa'--cc"t]twtepironlt(t(#eeae=fe"rrnuca:-o-Ieeddrscealnciren(evtn(m(t(tnoiog:bane]iymkdean-pt^^4(mCi[edxoaaxllbnsonktsbhrcnctrorady_sg]ttnn-c-ho/rent#n(ti|aascc([r5isd]sr]sareNlf/euttugantntsse-tppddagvnviogt(sl/tn]ci-g12.ieonpatllnrealriwuiulaact=trtea/ca]shiind-rip(gsnodasl(l,hhrcgt0l"/er'tGlipcGtrae_pgitetdre[e[b_egenve)st-[eckTectcrv8fmtaitrtdbobeunitf/apeui3a5enmemas][eggi:is]nnr,otodstiaiaaeaeo0eafD[Pn[a"ollohUrcsa_ectoSCeei(fefaosSgeeoe-1h_ewxohae-(-aptneafio(lngtaalptn0-g0riaomipacxhhgntRagpeota:oala#rrcp"ioers([c(,eowaIbec"wcss[u)rahfnnmaga]vwwS[trx-absnp-radrftbuslatfasnt"ecncoiciocoede0yg-cnolaaraitthire[n|rmr#rnepsismgghat1(]zlwdiimecs(>ger]annopiiwmremaattuurueiiwm)eieoratePxneswepeceoidiya-hi(hflczrhmdmhrcnlccRgns--ttiseorooPmreom"|:a:,eeaco0cienintudhEdWsrg]ttfnrttihirenuillelttiitxngtsraagi(otdatcrnelnr-(an"ee.etaai6omctediiceastcc-|ntd/efvrr,ectoarsri0hp2lttili-oxeo</_itifocytaledglrottptcctldiitcwir-cetopaabeneflutyu"rg-s0dl,ertfnhfcatasvtfc]b,ooc-goivgieiechncea:"#tfgt9%a"oovttlwpfrfpsnecgiph=cvlneaeteni::Rhhcle(tonehimstclonrdtolv1voarap-g--odgiouvpidtoy3ecennoirtielns#harcscahooey5)rFfareeiooaliougrog2=6heitfslpre:hifs]fgrateedoeeevye,eyexg-i(df9cbicrt&o=ammal9rtffn"seomxeatuharesdtcacr]%gll"d_sprlerudlwp-Oynf=0=aal[dyl"e"s:vatf_yrcnpgtfvv-erpre)run"aa9kenae&n3ceettd0oshiifhr/,lmrgct,adcco7t)eaaf/otel]extl!eepspfrvbsmluaaeee.g.t:ouoe_ghtpl]hrifi,rsayvapg-ei9cglese9i)use0tpSpeggidap_vlceogeha"r)cdr53o[ssiMpigespt"rlwesioarahpilbngfe"e"oEllp[ncieaooeoovoseitedg-ml9a-lx,a-0tasfotee..golroiao_reat)td.%0athhlatmr[sla:t_yintgmletosmtogranp)x)rnLttScamnsltg[muerbmotsrerdoutytcl0ynf[a3itcctt.elep)Atlnturu])"#)4doiegsaepe)ilos-taustr|i)vueuta]]efis)tatbdg)_e-lsrcauoneey"aanrseepcido(ru8tmsiuxxtsvtpife#ungs)mm0danNi]tpadcl"uhcttfeuet-teaplrt(osL|hmrl/sn(fatsevtvrc)de"aes-(nanbrrel7hifrttxnisp2nimmnte,vi0i1ng"setii:ppahhsi1mr])gitddrti-eelecswtt|thsiaeanohem-ntt"du-ee"ust0ezlirtnoo]e2egpvtin0t0yk|drtttl)apreeleyaerceeeecs]_duwiia-eeto(iwn2na"oatgt)e-esetftnus,eoeeotun:s)ilu(Mumi0w-eeoo"rlpsev_/leosrSfSfektdafritai-sanfliad,dl)nneehs-deswohnmldgdn--ts|d0hlnaaotVo%zivgbgrreg)syi.maccignnaaaan[asi1rtcllftcbsoatc.)fdsetl8cereietgi=tss-c0meo1tnnpe)niz2aen_rs]e-ata(lahaSefmsmumuaow-elechoulrbhcv.st)ofc5reen_orsf/aeeimoig(alpcidatsawpa0ftxsor>\.xniupasexia)elelwo-mae0nhec-rdrebcle.at")Mguhinvfgcetosscttnannaatptahlgi)lir(.ot)pot[]*ltunearetgtttsnreob2teshFcereeeiar]a-ana&peua8ardoittsf)ccipoieotfdi0re(troU.oa2cgs/()ca:apkxno_s.a)everl,nnssr-gcr&t5rlop0tocfnpttatochtoaubfnohi)n(rdssS|lg/l""iipdhssceciivoctr]neousdietdi-tgs5-lra%ffaifa-eiaroiencradapls2Gye]/Eosatnfrei"ochntaenmfxgvtlwpptoc"aseiia-pcirrriucrnlr-nxaitraltaet0UfosR<gdcygoifna.aniag]fdrti[eegraAnMo)ekxonca6ldni-doodsgsu.lGsgtlthtue)ssa0Iha|ndfcc=_rnagb"bffrtoon-rbatrilconmpngcn0uootlpn/ter"aUd)yaenm]/5l0]eulcIiaPaS5etuo)oiigcef0m(gnsrshanlccndomoadd%gcty5ettDi_r-tIep"a]srnoa0wl0algyaDlnar-e5nf/l"v]vgcihrf:t|iaeedtAoi)norlf,gu)/)i-opsce-i]lcss<yinr0h)lt)redrdstaartceenaS]:aes-on)espdtdtiotemmmoewaanioe=ls=pngom.t:fd(s/"(bse:a(cgrea]0sw-ncl/reosu"trhldeionnnrcptnnt5eoagEsmsuzPho/dtpep[sltsp"hgtpftin)hadvortl)yei"nldsdlalai;e0ecD7so)n]Aelir"rDeorofmheet""Paasi/p0ito)toemoe.6m.tlesomoc5tEpii0slatpi.ofitwouodro.)r"rwnpl:lccnewrpbpobiaibaeni0|wd(m"as%etvblui"n"Gwapnherlrr"igigryT:euh-snsta"dnhuttvaedtet0-iidc)ta)daelippt)Unuatermtt1te)niitiie1seitgi)t)ioisioll/edyitt)ceb)greCmdl]Illr_aicy_]tsncsnns(tsnrotseuloltoar.="h=dleshiaet]otspgstpu0pdghwtgt/dotdaneaxrtcntewc4.cs5eicattha:eoiu)lt"iecfei/pemfeedrbis-hsrc(5"ot0w<ohr)ezid>tvp;esnfuosstrscrf/rrvecylt,ia(,n[snnr0ic=nag-isS/2]eep]:rgaPrrwceeuoafoa)oenrrader"fithrebphPa0nnlte;urrihstscuomctduccgedt]ceinmha4agishorc0tyhpaslie"tettt/lrtoeefoh"icei-osfggcr0nion)ewic0if-ercurtnnacsoiomtetivldaanofv$nul/v"g0dnnaln-Haihocmuttlhrnmt:ihvv(eaertgmae{dma(p=si0gcrpbtl(ellafpenmlaegkgee2ingsg"mu)degda3tnmPeya/oslerie-_adc"n_sc_/n]0ntecelei_,et9rgVItteghpcplrsc"xeo:dd)hbcp2ti1funtvfcft0i)Dtietdseshaietaafneaahso0es,turd:iatae0nosxei-lana'ippccafcmfrt-ww.gonrec-phur,gtrt$lfrd.secachuiocagtsieO4es2cedpexaeln"aa,yd)igls=calgncuiewtrn.re8tn)a}ctaae)nipop6i-rtf,lnricl8)ta5itu.iictc(gspicv]dnrga0tcgwitgythsi-n%oslstoeoccihlnci]gityicigm_ceunbadnteoynd/oveufdcpnhr=cnotcmschspeenao_gu=fif-nelsoeostc5agnhavawme)ptd7ntc;s4itrnfnllNtwPm=5tfonxidslua.do5ae3gooitoaPeipau5"ciud&t/)yp)c0pudrmsgcshgmontors5pugtcceghrs0as)i:waceestctst,atrcthhnlraecce.scivpr(.tiheeuorwbolae_oanshmifnotaaicdtaenbaseilnrspgdgteAtunancrcpoegAlst/ecesntatsgoeeadylonfhiitnfznisc_ethnruiw(/lrua/toieatfadcnadaceokopneadotlnmf/gdbyiurholcb6a(ulpgrsogediorvlgloatas0ptrtlo_w)tlreite(tircroahaifrp"nhplsmo)d)dgphdl5cenbnitoaageroidt/eira/u5imglelltcrolveovsfonnerpt)teasesthcadftobrilarogsgoey:ntadaialue)euteiw;=k(bag1-eelgtgdelaisnne60rltepmeesg;ptcfwtgrp0-leau0"osi:cii_a9ifcs()nt-nwpctissr9nekr(,(ogir1lacnwut9erla"r5to0othipi9sin:te3%uhf0gie/tpatsg:ef9/ni%osccllmote"se05w"l)nhhyAs:tr00ave,-;q-e-c)p,imn"ausshor3stbmVt(w|miwanee7hai]efai-acitrfvs0aecl]dlpt-ykthpiis0mklaphalcaigoe-pirgeocnyhtaun4latve,nuco,e.ist3aloobdt)tsalsi0cllonfroea0e,-tooarwoegsxlhcstteorualmoa|.shssrnapmyVln-ictkaonpp)dd-nhrntdolaecgeioyreraodcnaptshdniutdlre)afdfsliaeridroieolvendrtgd)nliath)oscdr"e.nseypeeyos"wsiteootnet-rten)khm/tMiesciTnrhaKg-ltsoohwcnnaihlentayscr)phgtreioisnngtthisenwgiltitcshhteesovfearbkssnieoonwntntfshrwaoitmtcw/hoseudslcdarhda/vcehabregeinngr-esswtiotrcehdes.txt

PLUGINS

Those are scripts that override functions and some global variables. They should be placed in /data/adb/vr25/acc-data/plugins/. Files are sorted and sourced. Filenames shall not contain spaces. Hidden files and those without the .sh extension are ignored.

There are also volatile plugins (gone on reboot, useful for debugging): /dev/.vr25/acc/plugins/. Those override the permanent.

A daemon restart is required to load new/modified plugins.

An alternative to plugins are one-line scripts. Refer to the default configuration section above.


NOTES/TIPS FOR FRONT-END DEVELOPERS

Basics

ACC does not require KernelSU/Magisk. Any root solution works, as long as busybox is installed.

Use /dev/acca instead of regular acc. It’s optimized for front-ends, guaranteed to be readily available after installation/upgrades and significantly faster than its acc counterpart. Additionally, /dev/acca --set prop1=bla prop2="bla bla" ... runs asynchronously (non-blocking mode) - meaning, multiple instances of it work in parallel.

It may be best to use long options over short equivalents - e.g., --set charging_switch= instead of -s s=. This makes code more readable (less cryptic).

Include provided descriptions of ACC features/settings in your front-end. Provide additional information (trusted) where appropriate. Explain settings/concepts as clearly and as concisely as possible.

Take advantage of acc exit codes. Refer back to SETUP/USAGE > [Terminal Commands](#terminal-commands) > Exit Codes.

Installing/Upgrading ACC

This should be trivial. The simplest way is flashing acc from KernelSU/Magisk module manager.

Alternatively, install.sh, install-online.sh or install-tarball.sh can be used. For details, refer back to install from local source or GitHub.

Developers can also use the updateJSON API. The front-end downloads and parses this JSON file. The format is as follows:

{}""""""""bccttvvzuhuggeeisarzzrrpynl"IssUbg":niiroe:soolxl"tnn""o"ha"C::ghtl:o"ttld"":tpe"ehhpsrS"tt"s:"T:tth::RpptIIsstg"NN::pgihGT//sitt",//:tht,gg/hupii/ubsttrb.:hha.cuuwc/bb.omg..gmicciVtootZRhmmha-u//uc2bVMbk5.Raupc-gstao2iegcm5sr5c/kcVa-CrRcMnre-cotol2/dese5runsa/elt-sale.Cecescosca-om//sRmpdree/ioespVlwl/oRened/-dlaob2-oswu5Baens/idslyan//obca$daocrvodx/iew/-mern$nasslvds-ioektAoar"ennds,rd//i/ra$ococvnhice/ad_ran/$scgt{icervo_leen$oer/{gsiv.minemaosrdsnts"t}ai,e_lor$ln/{-}cvt_uea$rrr{lsbv"iae,olrnlsC.iosodhne"C},o.dteg}z."z,ip"

Uninstalling ACC

Either run /data/adb/vr25/acc/uninstall.sh (no reboot required) or uninstall from KernelSU/Magisk module manager and reboot.

Initializing ACC

On boot_completed receiver and main activity, run:

test -f /dev/acca || /data/adb/vr25/acc/service.sh

Explanation:

ACC’s working environment must be initialized - i.e., by updating the stock charging config (for restoring without a reboot) and pre-processing data for greater efficiency. This is done exactly once after boot. If it were done only after installation/upgrade, one would have to reinstall/upgrade acc after every kernel update. That’s because kernel updates often change the default power supply drivers’ settings.

Since acc’s core executables are dynamic ([expected to] change regularly), those are linked to /dev/ to preserve the APIs. The links must be recreated once after boot (since /dev/ is volatile).

accd is a symbolic link to service.sh. If service.sh is executed every time the main activity is launched, accd will be repeatedly restarted for no reason. Thus, we run test -f /dev/acca || /data/adb/vr25/acc/service.sh, as opposed to just /data/adb/vr25/acc/service.sh

Notes

Managing ACC

As already stated, front-ends shall use the executable /dev/acca. Refer to the default configuration and terminal commands sections above.

The default config reference has a section entitled “aliases”. Use ONLY those with /dev/acca --set! i.e., /dev/acca --set chargingSwitch=... is not supported! Use either s or charging_switch. chargingSwitch and all the other “camelcase” style variables are for internal use only (i.e., private APIs).

Do not parse the config file directly. Use --set --print ['regex'] and --set --print-default ['regex']. Refer back to terminal commands for details.


TROUBLESHOOTING

acc -t Results Are Inconsistent

Refer to “default config > batt_status_workaround”.

Charging Switch

By default, ACC uses whichever charging switch works (“automatic” mode). However, things don’t always go well.

In such situations, one has to enforce a switch that works as expected. Here’s how to do it:

  1. Run acc -t to see which switches work.
  2. Run acc -ss to enforce a working switch.
  3. Test the reliability of the set switch. If it doesn’t work properly, try another.

Since not everyone is tech savvy, ACC daemon automatically applies settings for certain devices for greater compatibility. These are in acc/oem-custom.sh.

Custom Max Charging Voltage And Current Limits

Unfortunately, not all kernels support these features. While custom current limits are supported by most (at least to some degree), voltage tweaking support is exceptionally rare.

That said, the existence of potential voltage/current control file doesn’t necessarily mean these are writable* or the features, supported.

* Root is not enough. Kernel level permissions forbid write access to certain interfaces.

Sometimes, restoring the default current may not work without a system reboot. A workaround is setting the default max current value or any arbitrary high number (e.g., 9000 mA). Don’t worry about frying things. The device will only draw the max it can take.

WARNING: limiting voltage causes battery state of charge (SoC) deviation on some devices. The battery management system self-calibrates constantly, though. Thus, as soon as the default voltage limit is restored, it’ll start “fixing” itself.

Limiting current, on the other hand, has been found to be universally safe. Some devices do not support just any current value, though. That’s not to say out-of-range values cause issues. These are simply ignored.

If low current values don’t work, try setting current_workaround=true. Refer to the default configuration section for details.

One can override the default lists of max charging current/voltage control files by copying acc/ctrl-files.sh to /data/adb/vr25/acc-data/plugins/ and modifying it accordingly. Note that default limits must be restored prior to that to avoid the need for a system reboot. Reminder: A daemon restart is required to load new/modified plugins.

Diagnostics/Logs

Volatile logs (gone on reboot) are stored in /dev/.vr25/acc/ (.log files only). Persistent logs reside in /data/adb/vr25/acc-data/logs/.

acc -le exports all acc logs, plus Magisk’s and extras to /data/adb/acc-data/logs/acc-$device_codename.tgz. The logs do not contain any personal information and are never automatically sent to the developer. Automatic exporting (local) happens under specific conditions (refer back to SETUP/USAGE > Terminal Commands > Exit Codes).

Install, Upgrade, Stop and Restart Processes Seem to Take Too Long

The daemon stop process implies complete reversal of changes made to the charging management system. Sometimes, this requires the charger to be plugged. That’s because some devices have kernel bugs and/or bad charging driver implementations. That said, accd is always stopped gracefully to ensure the restoration takes place. One who knows what they’re doing, can force-stop accd by running pkill -9 -f accd.

Kernel Panic and Spontaneous Reboots

Control files that trigger these are automatically backlisted (commented out in /data/adb/acc-data/logs/write.log).

Restore Default Config

This can potentially save a lot of time and grief.

acc --set --reset, acc -sr or rm /data/adb/vr25/acc-data/config.txt (failsafe)

Samsung, Charging Always Stops at 70% Capacity

This is a device-specific issue (by design?). It’s caused by the store_mode charging control file. Switch to batt_slate_mode to prevent it. Refer back to charging switch above for details on that.

Slow Charging

At least one of the following may be the cause:

Unable to Charge

Refer back to the warnings section above.

Unexpected Reboots

Wrong/troublesome charging control files may trigger unwanted reboots. ACC blacklist [some of] these automatically (registered in /data/adb/vr25/acc-data/logs/write.log, with a leading hashtag). Sometimes, there may be false positives in there - i.e., due to unexpected reboots caused by something else. Thus, if a control file that used to work, suddenly does not, see if it was blacklisted (acc -t also reveals blacklisted switches). Send write.log to the developer once the reboots have stopped.

WARP, VOOC and Other Fast Charging Tech

Charging switches may not work reliably with the original power adapter. This has nothing to do with acc. It’s bad design by the OEMs themselves. If you face issues, either try a different charging switch or a regular power brick (a.k.a., slow charger). You may also want to try stopping charging by limiting current/voltage.

Why Did accd Stop?

Run acc -l tail to find out. This will print the last 10 lines of the daemon log file.

A relatively common exit code is 7 - meaning all charging switches failed to disable charging. It usually happens due to kernel issues (refer to the previous subsection - charging switch). The daemon only stops due to this if acc is set to automatically determine the switches to use (default behavior). Manually setting a working switch with acc -ss or acc -s s="SWITCHES GO HERE --" disables auto mode and prevents accd from stopping if the set the charging switches fail.


POWER SUPPLY LOGS (HELP NEEDED)

Please run acc -le and upload /data/adb/vr25/acc-data/logs/power_supply-*.log to my dropbox (no account/sign-up required). This file contains invaluable power supply information, such as battery details and available charging control files. A public database is being built for mutual benefit. Your cooperation is greatly appreciated.

Privacy Notes

See current submissions here.


LOCALIZATION

Currently Supported Languages and Translation Levels (default, full, good, fair, minimal)

Translation Notes

  1. Start with copies of acc/strings.sh and, optionally, README.md.

  2. Modify the header of strings.sh to reflect the translation (e.g., # Español (es)).

  3. Anyone is free and encouraged to open translation pull requests. Alternatively, a compressed archive of translated strings.sh and README.md files can be sent to the developer via Telegram (link below).

  4. Use acc -sl (–set –lang): language switching wizard or acc -s l=<lang_string> to set a language.


TIPS

Always Limit the Charging Current If Your Battery is Old and/or Tends to Discharge Too Fast

This extends the battery’s lifespan and may even reduce its discharge rate.

750-1000mA is a good range for regular use.

500mA is a comfortable minimum - and also very compatible.

If your device does not support custom current limits, use a dedicated (“slow”) power adapter.

Generic

Force fast charge: appy_on_boot="/sys/kernel/fast_charge/force_fast_charge::1::0 usb/boost_current::1::0 charger/boost_current::1::0"

Google Pixel Devices

Force fast wireless charging with third party wireless chargers that are supposed to charge the battery faster: apply_on_plug=wireless/voltage_max::9000000.

This may not work on all Pixel devices. There are no negative consequences when it doesn’t.

Export/import Config

Export: acc -s > /sdcard/Download/config.txt

Import: acc -s /sdcard/Download/config.txt

Partial import is supported - meaning, users can share just a portion of the config (e.g., acc -sp curr,volt > file); whoever imports this, gets just those changes.

Override Battery mAh Capacity

An “extended” battery won’t charge fully if the kernel still has the stock charge_full_design value. Some devices allow that to be modified. If that’s the case for you, use apply_on_boot to set the desired value(s) in /sys/class/power_supply/*/charge_full_design.

Override Broken Temperature Sensor

If your battery’s thermistor always reports a negative value, and charging is very slow or even off, see if the following helps (paste and run):

acc -c d temp_cool; acc -c a ':; for i in */temp_cool */temp_cold; do [ -f $i ] || continue; chown 0:0 $i && chmod 0644 $i && echo "-999" > $i && chown 0444 $i || :; done'


FREQUENTLY ASKED QUESTIONS (FAQ)

How do I report issues?

Open issues on GitHub or contact the developer on Telegram (preferred) or XDA (links below). Always provide as much information as possible. Attach /sdcard/Download/acc-logs-*.tgz - generated by acc -le right after the problem occurs. Refer back to TROUBLESHOOTING > Diagnostics/Logs for additional details.

Why won’t you support my device? I’ve been waiting for ages!

Firstly, have some extra patience! Secondly, several systems don’t have intuitive charging control files; I have to dig deeper - and oftentimes, improvise; this takes time and effort. Lastly, some systems don’t support custom charging control at all; in such cases, you have to keep trying different kernels and uploading the respective power supply logs. Refer back to POWER SUPPLY LOGS (HELP NEEDED).

Why, when and how should I calibrate the battery manager?

With modern battery management systems, that’s generally unnecessary.

However, if your battery is underperforming, you may want to try the procedure described at https://batteryuniversity.com/article/bu-603-how-to-calibrate-a-smart-battery .

I set voltage to 4080 mV and that corresponds to just about 75% charge. But is it typically safer to let charging keep running, or to have the circuits turn on and shut off between defined percentage levels repeatedly?

It’s not much about which method is safer. It’s specifically about electron stability: optimizing the pressure (voltage) and current flow.

As long as you don’t set a voltage limit higher than 4200 mV, and don’t leave the device plugged in for extended periods of time, you’re good with that limitation alone. Otherwise, the other option is actually more beneficial - since it mitigates high pressure (voltage) exposure/time to a greater extent. If you use both, simultaneously - you get the best of both worlds. On top of that, if you enable the cooldown cycle, it’ll give you even more benefits.

Ever wondered why lithium ion batteries aren’t sold fully charged? They’re usually ~40-60% charged. Why is that? Keeping a battery fully drained, almost fully drained or 70%+ charged for a long times, leads to significant (permanent) capacity loss

Putting it all together in practice…

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

* https://batteryuniversity.com/article/bu-808-how-to-prolong-lithium-based-batteries/

I don’t really understand what the “-f|–force|–full [capacity]” is meant for.

Consider the following situation:

You’re almost late for an important event. You recall that I stole your power bank and sold it on Ebay. You need your device and a good battery backup. The event will take the whole day and you won’t have access to an external power supply in the middle of nowhere. You need your battery charged fast and as much as possible. However, you don’t want to modify ACC config nor manually stop/restart the daemon.

Do I have to install/upgrade both ACC and AccA?

To really get out of this dilemma, you have to understand what ACC and AccA essentially are.

ACC is a Android program that controls charging. It can be installed as an app (e.g., AccA) module, Magisk module or standalone software. Its installer determines the installation path/variant. The user is given the power to override that.

A plain text file holds the program’s configuration. It can be edited with any root text editor. ACC has a command line interface (CLI) - which in essence is a set of Application Programing Interfaces (APIs). The main purpose of a CLI/API is making difficult tasks ordinary.

AccA is a graphical user interface (GUI) for the ACC command line. The main purpose of a GUI is making ordinary tasks simpler. AccA ships with a version of ACC that is automatically installed when the app is first launched.

That said, it should be pretty obvious that ACC is like a fully autonomous car that also happens to have a steering wheel and other controls for a regular driver to hit a tree. Think of AccA as a robotic driver that often prefers hitting people over trees. Due to extenuating circumstances, that robot may not be upgraded as frequently as the car. Upgrading the car regularly makes the driver happier - even though I doubt it has any emotion to speak of. The back-end can be upgraded by flashing the latest ACC zip. However, unless you have a good reason to do so, don’t fix what’s not broken.

Does acc work also when Android is off?

No, but this possibility is being explored. Currently, it does work in recovery mode, though.

I have this wakelock as soon as charging is disabled. How do I deal with it?

The best solution is enforcing a charging switch that doesn’t trigger a wakelock. Refer back to TROUBLESHOOTING > Charging Switch. A common workaround is having resume_capacity = pause_capacity - 1. e.g., resume_capacity=74, pause_capacity=75.

What’s idle mode, and how do I set it up?

It’s the ability of running off the charger. The battery behaves as if it were physically disconnected from the device. The primary indicator of idle mode is charging current around 0 mA. One can customize idleThreshold (absolute value).

Idle mode is great for extended device use (e.g., GPS navigation, gaming, server). Use it when the charger must be plugged for a long time (or permanently).

IMPORTANT: lithium batteries have the longest lifespan when kept about 40-60% charged (about 3.7-3.9ish Volts). That said, try not to use idle mode above 60% too often.

Not all devices support the “native” idle mode. Hence, variants of “emulated” idle mode are available:

  1. Limit the charging voltage (requires kernel support) to a value that gets you close to the desired battery level. To avoid false positives, determine the value only after the device has been unplugged for a minute or so.
  2. Pause/resume charging based on voltage thresholds (e.g., acc 3900 keeps voltage within 3850 and 3900 millivolts).
  3. Set resume_capacity to (pause_capacity - 1), e.g., acc 50 49.

Notes

How do I enable “smart charging”?

Configure day and night profiles:

acc -c a ": day profile; at 6:00 \"acc -s pc=75 mcc= mcv=4100; acc -n 'Switched to day profile'\""; acc -c a ": night profile; at 22:00 \"acc -s pc=50 mcc=500 mcv=3900; acc -n 'Switched to night profile'\""


Download Link

Module Info

Module By : VR-25
Magisk : ✅ Supported
KernelSu : ✅ Supported
KernelSuNext : ✅ Supported
APATCH : ✅ Supported
Date Release :
If the link is broken or there is something that needs to be updated in the post contact us.

© 2025 Magisk Community