Skip to content

Commit 281aeb3

Browse files
committed
Misc fixes
1 parent caaac0d commit 281aeb3

File tree

5 files changed

+7
-20
lines changed

5 files changed

+7
-20
lines changed

install/acc.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ parse_switches() {
222222
! grep -q "$i " $1 || continue
223223

224224
# blacklist
225-
i="$(echo "$i $n" | grep -Eiv 'authentic|brightness|calibrat|capacitance|count|curr|cycle|daemon|demo|design|detect|disk|empty|factory|fast|fcc|flash|full|info|init|mask|moist|nvram|online|otg|parallel|present|priority|protect|reboot|refcnt|report|resistance|reset|reverse|scale|time|rx_|ship|shutdown|state|status|step|sync|temp|timer|tx_|type|update|user|vbus|verif|volt|wait|wake')" || :
225+
i="$(echo "$i $n" | grep -Eiv 'authentic|brightness|calibrat|capacitance|count|curr|cycle|daemon|demo|design|detect|disk|empty|factory|fast|fcc|flash|full|info|init|learn|mask|moist|nvram|online|otg|parallel|present|priority|protect|reboot|refcnt|report|resistance|reset|reverse|scale|time|rx_|ship|shutdown|state|status|step|sync|temp|timer|tx_|type|update|user|vbus|verif|volt|wait|wake')" || :
226226

227227
[ -z "$i" ] || echo "$i"
228228

install/batt-interface.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ online() {
7979

8080

8181
online_f() {
82-
ls -1 */online | grep -Ei '^ac/|^dc/|^mains/|^mtk\-.*(chg|charger)/|^pc_port/|^smb[0-9]{3}\-usb/|^usb/|^wireless/' || :
82+
ls -1 */online | grep -Ei '^ac/|^dc/|^mains/|^mtk\-.*(chg|charger)/|^pc_port/|^smb[0-9]{3}\-usb/|^usb/|ucsi.*pmic|^wireless/' || :
8383
}
8484

8585

install/misc-functions.sh

+2-15
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,13 @@ cycle_switches() {
8787

8888
[ ! -f ${chargingSwitch[0]:-//} ] || {
8989

90+
[ $1 = on ] || { set_temp_level 50; set_ch_curr 500; } > /dev/null
91+
9092
flip_sw $1 || :
9193

9294
if [ "$1" = on ]; then
9395
not_charging || break
9496
else
95-
{ set_temp_level 50; set_ch_curr 500; } > /dev/null
9697
if not_charging ${2-}; then
9798
# set working charging switch(es)
9899
s="${chargingSwitch[*]}" # for some reason, without this, the array is null
@@ -306,16 +307,6 @@ flip_sw() {
306307
}
307308

308309

309-
handle_bootloop() {
310-
local newZygotePID="$(getprop init.svc_debug_pid.zygote)"
311-
[ "$newZygotePID" = "$zygotePID" ] || {
312-
cat $log > $dataDir/logs/bootloop-${device}.log
313-
write() { :; }
314-
exit 0
315-
}
316-
}
317-
318-
319310
invalid_switch() {
320311
$isAccd || print_invalid_switch
321312
unset_switch
@@ -433,19 +424,16 @@ write() {
433424
if [ -n "${exitCode_-}" ]; then
434425
[ -n "${swValue-}" ] && swValue="$swValue, $f" || swValue="$f"
435426
fi
436-
handle_bootloop
437427
[ $i = x ] && return ${3-1} || {
438428
for i in $(seq $seq); do
439429
if eval "echo $1 > $2"; then
440430
[ $i -eq $seq ] || usleep $((1000000 / $seq))
441431
else
442-
handle_bootloop
443432
return 1
444433
fi
445434
done
446435
chmod 0444 $2
447436
}
448-
handle_bootloop
449437
}
450438

451439

@@ -472,7 +460,6 @@ trap exxit EXIT
472460
. $execDir/set-ch-volt.sh
473461

474462
device=$(getprop ro.product.device | grep .. || getprop ro.build.product)
475-
zygotePID="$(getprop init.svc_debug_pid.zygote)"
476463

477464
cd /sys/class/power_supply/
478465
. $execDir/batt-interface.sh

install/service.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ TMPDIR=/dev/.$domain/$id
99
execDir=/data/adb/$domain/$id
1010
dataDir=/data/adb/$domain/${id}-data
1111

12-
[[ -f $execDir/disable || -f $dataDir/logs/bootloop-*.log ]] && exit 14
12+
[ -f $execDir/disable ] && exit 14
1313

1414
# wait til the lockscreen is ready and give some bootloop grace period
1515
slept=false

module.prop

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
id=acc
22
domain=vr25
33
name=Advanced Charging Controller (ACC)
4-
version=v2024.6.2-rc
5-
versionCode=202406020
4+
version=v2025.1.11.1-rc
5+
versionCode=202501111
66
author=VR25
77
description=Extend your battery's service life by controlling charging current, temperature, and voltage. Any root solution is supported. The installation is always "systemless". Works on Android and KaiOS.
88
updateJson=https://raw.githubusercontent.com/VR-25/acc/master/module.json

0 commit comments

Comments
 (0)