Skip to content

Commit

Permalink
**v2022.6.4 (202206040)**
Browse files Browse the repository at this point in the history
- `-n|--notif [[string] [user]]`: post Android notification; may not work on all systems;
- `-t|--test [p|parse]`: parse potential charging switches from power supply log (as `acc -p`), test them all, and add the working ones to the list of known switches; implies `-x`;
- `acc -p`: exclude all known switches and additional troublesome ctrl files;
- `acc -s`: Enforce valid pause_capacity and resume_capacity difference;
- `acc -t`: show more useful information; source read-ch-curr-ctrl-files-p2.sh;
- `accd`: if possible, avoid idle mode when capacity > pause_capacity;
- Additional charging switches;
- Blacklisted usb/vbus_disable;
- Fixed `accd /path/to/config --init`;
- Fixed `runCmdOnPause` and `loopCmd` parsing issues;
- Fixed: "after a reboot, accd doesn't control charging, until the keyguard is unlocked";
- General refactor;
- Hard reset wipes config and control file blacklists (`acc -sr a` or acc --set --reset a);
- Improved advanced battery status detection;
- Misc fixes & optimizations;
- New config variables: `batt_status_override=Idle|Discharging|'custom'`, `batt_status_workaround=true`, `reboot_resume=false`, `reset_batt_stats_on_plug=false`, `schedule='HHMM command...'` (refer to the config or readme files for details);
- One-line scripts;
- Parse config `ampFactor` from `batt-interface.sh` as well;
- Post exit code notification if accd stops due to an error;
- Removed obsolete source code files;
- Run dexopt-job only once per boot session (if battery is charging, and system has been up for at least 15 minutes);
- Save acc -t output to /sdcard/Download/acc-t_output.txt;
- Tuning variables for not_charging() timeout (seqCount) and voltage-based idle mode (voltOff);
- Updated documentation;
- Updates can be downloaded with busybox's wget as well (may not work on all systems). Try upgrading with `acc -u`.
  • Loading branch information
VR-25 committed Jun 4, 2022
1 parent 1d06f21 commit e44eae6
Show file tree
Hide file tree
Showing 53 changed files with 1,279 additions and 946 deletions.
20 changes: 10 additions & 10 deletions META-INF/com/google/android/update-binary
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ trap exxit EXIT

# set up busybox
#BB#
bin_dir=/data/adb/bin
bin_dir=/data/adb/vr25/bin
busybox_dir=/dev/.vr25/busybox
magisk_busybox=/data/adb/magisk/busybox
[ -x $busybox_dir/ls ] || {
Expand All @@ -51,7 +51,7 @@ magisk_busybox=/data/adb/magisk/busybox
}
done
[ -x $busybox_dir/ls ] || {
echo "(!) Install busybox or simply place it in $bin_dir/"
echo "Install busybox or simply place it in $bin_dir/"
echo
exit 3
}
Expand All @@ -66,7 +66,7 @@ unset f bin_dir busybox_dir magisk_busybox

# root check
[ $(id -u) -ne 0 ] && {
echo "(!) $0 must run as root (su)"
echo "$0 must run as root (su)"
exit 4
}

Expand Down Expand Up @@ -97,7 +97,7 @@ set -eu
srcDir="$(cd "${0%/*}" 2>/dev/null || :; echo "$PWD")"

# extract flashable zip if source code is unavailable
[ -d $srcDir/$id ] || {
[ -d $srcDir/install ] || {
srcDir=/dev/.$domain.${id}-install
rm -rf $srcDir 2>/dev/null || :
mkdir $srcDir
Expand Down Expand Up @@ -153,7 +153,7 @@ echo "$name $version ($versionCode)
Copyright 2017-2022, $author
GPLv3+
(i) Installing in $installDir/$id/..."
Installing in $installDir/$id/..."


# backup
Expand All @@ -162,8 +162,8 @@ mkdir -p $data_dir/backup
cp -aH /data/adb/$domain/$id/* $config $data_dir/backup/ 2>/dev/null || :


/system/bin/sh $srcDir/$id/uninstall.sh install
cp -R $srcDir/$id/ $installDir/
/system/bin/sh $srcDir/install/uninstall.sh install
cp -R $srcDir/install/ $installDir/$id
installDir=$(readlink -f $installDir/$id)
cp $srcDir/module.prop $installDir/
cp -f $srcDir/README.* $data_dir/
Expand Down Expand Up @@ -267,21 +267,21 @@ cat $srcDir/changelog.md


printf "\n\n"
echo "(i) Rebooting is unnecessary
echo "Rebooting is unnecessary.
- $id commands may require the "/dev/.$domain/$id/" prefix (e.g., /dev/.$domain/$id/$id -v) until system is rebooted.
- Daemon started."


case $installDir in
/data/adb/modules*) ;;
*) echo "
(i) Non-Magisk users can enable $id auto-start by running /data/adb/$domain/$id/service.sh, a copy of, or a link to it - with init.d or an app that emulates it.";;
Non-Magisk users can enable $id auto-start by running /data/adb/$domain/$id/service.sh, a copy of, or a link to it - with init.d or an app that emulates it.";;
esac

#legacy
f=$data_dir/logs/ps-blacklist.log
[ -f $f ] || mv $data_dir/logs/psl-blacklist.txt $f 2>/dev/null
rm $data_dir/${id}-uninstaller.zip 2>/dev/null
rm $data_dir/${id}-uninstaller.zip $data_dir/logs/*.tar.gz $data_dir/curr 2>/dev/null

# initialize $id
/data/adb/$domain/$id/service.sh --init
Expand Down
Loading

0 comments on commit e44eae6

Please sign in to comment.