Skip to content

Commit

Permalink
**v2021.8.2 (202108020)**
Browse files Browse the repository at this point in the history
- Fixed AccA related issues.
- Fixed charging switch list tester (-t /path/to/list).
- Fixed charging switch parser (-p).
  • Loading branch information
VR-25 committed Aug 2, 2021
1 parent cec6b17 commit 3808949
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 48 deletions.
3 changes: 1 addition & 2 deletions META-INF/com/google/android/update-binary
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,7 @@ ls -d ${accaFiles%/*}* > /dev/null 2>&1 && acca=true || acca=false ###
# ensure AccA's files/ exists - to prevent unwanted downgrades ###
if $acca && [ ! -d $accaFiles ]; then
mkdir -p $accaFiles
chmod 0777 ${accaFiles%/*} \
$accaFiles
chmod 0777 ${accaFiles%/*} $accaFiles
fi


Expand Down
43 changes: 8 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -655,10 +655,9 @@ Options
-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 " ")
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)
This will also report whether "battery idle" mode is supported
e.g.,
acc -t (test known switches)
acc -t /data/media/0/experimental_switches.txt (test custom/foreign switches)
Expand Down Expand Up @@ -1138,39 +1137,6 @@ A common workaround is having `resume_capacity = pause_capacity - 1`. e.g., resu
## LATEST CHANGES


**v2020.11.20 (202011200)**

- Additional charging switches
- Current control enhancements
- Fixed `acc -sr` (reset config command).
- General fixes & optimizations
- Improved power supply logger.
- Updated translations.

Release Notes

- If cooldown_current is set or current-based charging control is enabled (e.g., charging_switch=0), reboot after upgrading.

- If custom charging current limit is set, reboot after upgrading then reapply the limit (e.g., acc -sc 1000).

- Nexus 7 users, I'm yet to find charging and current control files for this family of devices.
The power supply logs contain nothing relevant.


**v2021.2.25 (202102250)**

- Added back `battery/op_disable_charge 0 1` charging switch for OnePlus devices.

- Enforce control files mode 0644, so that other processes cannot reset/override changes made by acc.

- Fixed current control issues.
For details, refer to `config.txt > current_workaround` or `readme > default config > current_workaround`.

- General optimizations

Release note: those who have current-related settings must reboot after upgrading, then reapply those settings manually (e.g., `acc -sc 1800`).


**v2021.7.28 (202107280)**

- acc -p|--parse: helps find potential charging switches quickly, for any device; refer to --help for details.
Expand Down Expand Up @@ -1211,3 +1177,10 @@ The results can be batch tested with `acc -t /path/to/list` or `acc -t file on o
**v2021.7.28.1 (202107281)**

- Fixed "ghost charging" issue.


**v2021.8.2 (202108020)**

- Fixed AccA related issues.
- Fixed charging switch list tester (-t /path/to/list).
- Fixed charging switch parser (-p).
3 changes: 1 addition & 2 deletions customize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,7 @@ ls -d ${accaFiles%/*}* > /dev/null 2>&1 && acca=true || acca=false ###
# ensure AccA's files/ exists - to prevent unwanted downgrades ###
if $acca && [ ! -d $accaFiles ]; then
mkdir -p $accaFiles
chmod 0777 ${accaFiles%/*} \
$accaFiles
chmod 0777 ${accaFiles%/*} $accaFiles
fi


Expand Down
9 changes: 4 additions & 5 deletions install-tarball.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,11 @@ tar -xf ${1:-$id}[-_]*.tar.gz
# prevent AccA from downgrading/reinstalling modules ###
case "$PWD" in
*mattecarra.accapp*)
get_ver() { sed -n '/^versionCode=/s/.*=//p' $1/module.prop 2>/dev/null || echo 0; }
bundled_ver=$(get_ver ${1:-$id}[-_]*)
regular_ver=$(get_ver /data/adb/$domain/$id)
get_ver() { sed -n '/^versionCode=/s/.*=//p' ${1}module.prop 2>/dev/null || echo 0; }
bundled_ver=$(get_ver ${1:-$id}[-_]*/)
regular_ver=$(get_ver /data/adb/$domain/${1:-$id}/)
if [ $bundled_ver -le $regular_ver ] && [ $regular_ver -ne 0 ]; then
ln -s $(readlink -f /data/adb/$domain/$id) .
(cd ./${1:-$id}/; ln -fs service.sh ${1:-$id}-init.sh)
ln -s $(readlink -f /data/adb/$domain/${1:-$id}) .
exit 0
fi 2>/dev/null || :
;;
Expand Down
3 changes: 1 addition & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,7 @@ ls -d ${accaFiles%/*}* > /dev/null 2>&1 && acca=true || acca=false ###
# ensure AccA's files/ exists - to prevent unwanted downgrades ###
if $acca && [ ! -d $accaFiles ]; then
mkdir -p $accaFiles
chmod 0777 ${accaFiles%/*} \
$accaFiles
chmod 0777 ${accaFiles%/*} $accaFiles
fi


Expand Down
4 changes: 2 additions & 2 deletions module.prop
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
id=acc
domain=vr25
name=Advanced Charging Controller (ACC)
version=v2021.7.28.1
versionCode=202107281
version=v2021.8.2
versionCode=202108020
author=VR25
description=Mainly intended for extending battery service life on Android devices. In a nutshell, this is achieved through limiting charging current, temperature and voltage. Any root solution is supported. The installation is always "system-less", whether or not the system is rooted with Magisk.

0 comments on commit 3808949

Please sign in to comment.