Skip to content

Commit

Permalink
**2019.10.13-r1-dev (201910131)**
Browse files Browse the repository at this point in the history
- `acc --upgrade`: use `curl` over `wget`
  • Loading branch information
VR-25 committed Oct 13, 2019
1 parent 9c7a34e commit 025a8d7
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ ACC is primarily intended for [extending battery service life](https://batteryun
- Android or Android based OS
- Any root solution (e.g., Magisk)
- Busybox (only if not rooted with Magisk)
- curl (for `acc --upgrade`, your ROM may already have it; if not, there's the Magisk module `curl for Android` by Zackptg5)
- Terminal emulator (e.g., Termux)
- Text editor (optional)

Expand Down Expand Up @@ -622,6 +623,9 @@ It's a software (Android/kernel) issue. Use the `capacityOffset` feature.
---
## LATEST CHANGES

**2019.10.13-r1-dev (201910131)**
- `acc --upgrade`: use `curl` over `wget`

**2019.10.13-dev (201910130)**
- `acc-en` executable for front-ends (to ensure acc language is always English)
- `acc -I|--lang`: Show available, as well as the default and currently set languages
Expand Down
7 changes: 3 additions & 4 deletions acc/acc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -405,8 +405,8 @@ test_charging_switch() {
fi

if [ -n "${1:-}" ]; then
chmod +w $file && echo $off > $file && sleep $(get_value chargingOnOffDelay)

chmod +w $file && echo $off > $file && sleep $(get_value chargingOnOffDelay)
grep -iq not $batt/status && battIdleMode=true || battIdleMode=false

if not_charging \
Expand All @@ -424,6 +424,7 @@ test_charging_switch() {
fi

else

disable_charging > /dev/null

if not_charging && enable_charging > /dev/null && ! not_charging; then
Expand All @@ -432,7 +433,6 @@ test_charging_switch() {
else
print_unsupported
(enable_charging > /dev/null 2>&1 &) &

return 1
fi

Expand Down Expand Up @@ -617,8 +617,7 @@ EOF
dev|master) :;;
*) reference=master;;
esac
wget https://raw.githubusercontent.com/VR-25/acc/$reference/install-latest.sh \
--output-document ${modPath%/*}/install-latest.sh
curl -Lo ${modPath%/*}/install-latest.sh https://raw.githubusercontent.com/VR-25/acc/$reference/install-latest.sh
trap - EXIT
set +euo pipefail
installDir=$(readlink -f $modPath)
Expand Down
Binary file modified bin/acc-uninstaller.zip
Binary file not shown.
4 changes: 2 additions & 2 deletions install-latest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ get_ver() { sed -n 's/^versionCode=//p' ${1:-}; }
reference="$(echo "$*" | sed -E 's/-c|--changelog|-f|--force|-n|--non-interactive|%.*%| //g')"
tarball=https://github.com/VR-25/$id/archive/${reference:-master}.tar.gz
instVer=$(get_ver /sbin/.$id/$id/module.prop 2>/dev/null || :)
currVer=$(wget https://raw.githubusercontent.com/VR-25/$id/${reference:-master}/module.prop --output-document - | get_ver)
currVer=$(curl -L https://raw.githubusercontent.com/VR-25/$id/${reference:-master}/module.prop | get_ver)

[ -f $PWD/${0##*/} ] || cd ${0%/*}
rm -rf "./${id}-${reference:-master}/" 2>/dev/null || :
Expand Down Expand Up @@ -83,7 +83,7 @@ if [ ${instVer:-0} -lt ${currVer:-0} ] || [[ "$*" == *-f* ]] || [[ "$*" == *--fo
set +euo pipefail
trap - EXIT
echo
wget $tarball --output-document - | tar -xz \
curl -L $tarball | tar -xz \
&& sh ${id}-${reference:-master}/install-current.sh
else
echo
Expand Down
4 changes: 2 additions & 2 deletions module.prop
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
id=acc
name=Advanced Charging Controller (acc)
version=2019.10.13-dev
versionCode=201910130
version=2019.10.13-r1-dev
versionCode=201910131
author=VR25 (xda-developers.com)
description=This is primarily intended for extending battery service life. On the flip side, the name says it all. Any root solution is supported. A recent stable Magisk version is recommended. Refer to README.md for details. If you are in Magisk Manager > Downloads, click here to open the documentation.

0 comments on commit 025a8d7

Please sign in to comment.