[Magisk] Uluru25:
How to monitor the charging process configured by acc?

If you have configured acc according to your wishes but want to check, if your configuration works as foreseen (e. g. stopping charging at your pause capacity, charging only with the configured current and/or voltage, considering temperature limits, charging in accordance with time-depending profiles), there are a few options at hand.

In this first post, a method directly available within acc and the terminal is shown:

If you have opened your terminal and switched to the superuser (just enter su), you can enter acca -i and will see a lot of (more or less) helpful batterie info. (I use here acca -i and not acc -i since acca gives here more condensed results). See screenshot [1].

To reduce the info, you could specify which lines should be shown, try e. g. acca -i current (gladly, acca -i is case insensitive) to see only lines containing current. Or enter acca -i curr,volt,temp (without spaces after the commata!) to get info on all lines containing one of these words. See screenshot [2].

Thus, check with acca -i the available info and choose what interests you. For my phone,

acca -i REAL_CAPACITY,CURRENT_NOW,VOLTAGE_NOW,TEMP=

would report me the most interesting values (in case your phone returns other variables on acca -i, use these variables instead). See screenshot [3]. (If REAL_CAPACITY is not available for your phone, just use CAPACITY, but you might get more lines containing this phrase).

The disadvantage of acca -i here is that it's result is static and thus returns only one result for the moment you entered the command.

Better for continuously monitoring is acca -w which automatically updates similar information and can be specified very similar to acca -i. If you add a number directly after the "w", this will define the period in seconds acca updates the information. For my phone,

acca -w5 REAL_CAPACITY,CURRENT_NOW,VOLTAGE_NOW,TEMP=

shows me the most interesting values with an update interval of 5 seconds (also here, in case your phone returns other variables on acca -w, use these variables instead). See screenshot [4].

There is also the possibility to write the battery info into a text file, so that you can read it later (all kudos to @VR25 for his help!).

This can be achieved by a terminal command like

while :; do echo $(date +%Y-%m-%d_%H-%M-%S); echo $(acca -i real_capacity) [%]; echo $(acca -i current_now) [A]; echo $(acca -i voltage_now) [V]; echo $(acca -i temp=) [ºC x 0.1]; echo; sleep 10; done | tee /sdcard/Documents/charging_logfile.txt

Again, in case your phone returns other variables on acca -i, use these variables (or truncated fragments) instead.

As you can imagine, the value following "sleep" controls the time to wait before writing the next set of values into the file, whereas the arguments following the acca -i commands define, which values to write into the file. The filename itself and the path are defined by the last argument.

As you may know, using the single "tee" will override each time the previously logged data, thus replace it by a double "tee -a" if you prefer that new logs are appended to the existing file.

This command will show the results both in the terminal and in the specified file. See screenshot [5].

If you don't want it also on the screen, just replace the "| tee" by a ">" so that the command reads like

while :; do echo $(date +%Y-%m-%d_%H-%M-%S); echo $(acca -i real_capacity) [%]; echo $(acca -i current_now) [A]; echo $(acca -i voltage_now) [V]; echo $(acca -i temp=) [ºC x 0.1]; echo; sleep 10; done > /sdcard/Documents/charging_logfile.txt

Also here, as you may know, using the single ">" will override each time the previously logged data, thus replace it by a double ">>" if you prefer that new logs are appended to the existing file.

Since the above while-loops are indefinite, the commands will run until you stop them with ctrl-c (or terminate the terminal by other ways).

Pro:

1) you don't need any additional app

Con:

1) you always have to start and stop the command manually

2) logging is done on a fixed time interval

3) if you do not some adaptions the command line to format the output, the logging might be not really "eyefriendly"

4) no graphical output

In a later post I will highlight other options...