Skip to content

Commit 5a61ff3

Browse files
authored
Add files via upload
1 parent 09cb3f8 commit 5a61ff3

7 files changed

+26
-10
lines changed

customize.sh

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
cp "$MODPATH/module.prop" "$MODPATH/t_module"
2+
ui_print " -------------------------- "
3+
ui_print " ------ 安装中,请稍等 ------ "
4+
sleep 1
5+
ui_print " -------------------------- "
6+
sleep 1
7+
ui_print " -------------------------- "
8+
sleep 1
9+
ui_print " ----- 安装已完成,请重启 ---- "
10+
ui_print " -------------------------- "

list_switch.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
MODDIR=${0%/*}
22
find /sys/*/* -type f -iname "*input_suspend" -o -type f -iname "*disable*_charge*" -o -type f -iname "*charge*_disable*" -o -type f -iname "*disable*_charging*" -o -type f -iname "*stop_charge*" -o -type f -iname "*stop_charging*" | egrep -i -v 'limit|max|float|step|reverse|/battery_|bq2597x|/cpu/|firmware' | sed -n 's/$/,start=0,stop=1/g;p' > "$MODDIR/list_switch"
3-
find /sys/*/* -type f -iname "*charging_enable*" -o -type f -iname "*enable*_charge*" -o -type f -iname "*charge*_enable*" -o -type f -iname "*enable*_charging*" -o -type f -iname "*charge*_control*" -o -type f -iname "*charging*_state*" | egrep -i -v 'limit|prohibit|prevent|disable|stop|restrict|reverse|max|float|step|/battery_|bq2597x|/cpu/|firmware' | sed -n 's/$/,start=1,stop=0/g;p' >> "$MODDIR/list_switch"
4-
find /sys/*/* -type f -iname "*charging_enable*" -o -type f -iname "*enable*_charge*" -o -type f -iname "*charge*_enable*" -o -type f -iname "*enable*_charging*" -o -type f -iname "*charge*_control*" | egrep -i 'prohibit|prevent|disable|stop|restrict' | egrep -i -v 'limit|max|float|step|reverse|/battery_|bq2597x|/cpu/|firmware' | sed -n 's/$/,start=0,stop=1/g;p' >> "$MODDIR/list_switch"
3+
find /sys/*/* -type f -iname "*charging_enable*" -o -type f -iname "*enable*_charge*" -o -type f -iname "*charge*_enable*" -o -type f -iname "*enable*_charging*" -o -type f -iname "*charge*_control*" -o -type f -iname "*charging*_state*" | egrep -i -v 'limit|prohibit|prevent|disable|stop|restrict|reverse|max|float|step|/battery_|bq2597x|/cpu/|firmware|/qcom-battery/' | sed -n 's/$/,start=1,stop=0/g;p' >> "$MODDIR/list_switch"
4+
find /sys/*/* -type f -iname "*charging_enable*" -o -type f -iname "*enable*_charge*" -o -type f -iname "*charge*_enable*" -o -type f -iname "*enable*_charging*" -o -type f -iname "*charge*_control*" | egrep -i 'prohibit|prevent|disable|stop|restrict' | egrep -i -v 'limit|max|float|step|reverse|/battery_|bq2597x|/cpu/|firmware|/qcom-battery/' | sed -n 's/$/,start=0,stop=1/g;p' >> "$MODDIR/list_switch"
55
# ##

module.prop

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
id=QuantitativeStopCharging_switch
22
name=QSC定量停充_独立开关版
3-
version=20230121
4-
versionCode=2023012100
3+
version=20231204
4+
versionCode=2023120400
55
author=top大佬(酷安)
66
description=[ 未知状态 ] 到达指定电量、指定温度自动停止充电、自动恢复充电,配置路径:/data/adb/modules/QuantitativeStopCharging_switch/config.conf,日志log.log。
77
# ##

qsc_switch.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -194,5 +194,5 @@ if [ -f "$MODDIR/power_switch" ]; then
194194
fi
195195
fi
196196
fi
197-
#version=2023012100
197+
#version=2023120400
198198
# ##

service.sh

+4
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ echo "am start -n com.tencent.mm/.plugin.webview.ui.tools.WebViewUI -d https://p
2222
echo "echo \"\"" >> "$MODDIR/.投币捐赠.sh"
2323
echo "echo \"正在跳转QSC定量停充捐赠页面,请稍等。。。\"" >> "$MODDIR/.投币捐赠.sh"
2424
chmod 0755 "$MODDIR/.投币捐赠.sh"
25+
if [ -f "$MODDIR/t_module" -a "$(cat "$MODDIR/module.prop" | egrep '^# ##' | sed -n '$p')" != '# ##' ]; then
26+
cp "$MODDIR/t_module" "$MODDIR/module.prop"
27+
chmod 0644 "$MODDIR/module.prop"
28+
fi
2529
rm -f "$MODDIR/list_switch"
2630
"$MODDIR/list_switch.sh" > /dev/null 2>&1
2731
rm -f "$MODDIR/now_c"

upqsc.sh

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
MODDIR=${0%/*}
2-
module_version="$(cat "$MODDIR/module.prop" | egrep 'version=' | sed -n 's/.*version=//g;s/(.*//g;$p')"
2+
module_name="$(cat "$MODDIR/module.prop" | egrep 'name=' | sed -n 's/.*name=//g;s/(.*//g;1p')"
3+
module_version="$(cat "$MODDIR/module.prop" | egrep 'version=' | sed -n 's/.*version=//g;s/(.*//g;1p')"
34
Host_version="$(cat "$MODDIR/qsc_switch.sh" | egrep '^#version=' | sed -n 's/.*version=//g;$p')"
45
update_curl="http://z23r562938.iask.in/QSC_switch_magisk"
56
up1="$(curl -s --connect-timeout 3 -m 5 "$update_curl/module.prop")"
67
up2="$(curl -s --connect-timeout 3 -m 5 "$update_curl/qsc_switch.sh")"
78
if [ "$(echo -E "$up1" | egrep '^# ##' | sed -n '$p')" = '# ##' -a "$(echo -E "$up2" | egrep '^# ##' | sed -n '$p')" = '# ##' ]; then
89
echo -E "$up1" > "$MODDIR/module.prop" &&
910
echo -E "$up2" > "$MODDIR/qsc_switch.sh" &&
10-
sed -i "s/version=.*/version=${module_version}/g" "$MODDIR/module.prop"
11+
sed -i "s/^version=.*/version=${module_version}/g" "$MODDIR/module.prop"
12+
sed -i "s/^name=.*/name=${module_name}/g" "$MODDIR/module.prop"
1113
module_versionCode="$(cat "$MODDIR/module.prop" | egrep 'versionCode=' | sed -n 's/.*versionCode=//g;$p')"
1214
if [ -n "$Host_version" -a "$Host_version" -lt "$module_versionCode" ]; then
13-
sed -i "s/version=.*/version=${module_version}(有更新)/g" "$MODDIR/module.prop"
14-
sed -i "s/。 .*/。 \( 发现新版本,请到酷安或github.com搜作者动态下载更新 \)/g" "$MODDIR/module.prop"
15+
sed -i "s/^version=.*/version=${module_version}(有更新)/g" "$MODDIR/module.prop"
16+
sed -i "s/。 .*/。 \( 发现新版本,请到酷安或github.com搜作者动态下载更新 \)/g" "$MODDIR/module.prop"
1517
fi
1618
chmod 0755 "$MODDIR/qsc_switch.sh"
1719
chmod 0644 "$MODDIR/module.prop"

upqsc.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
QSC_switch_update,http://z23r562938.iask.in/QSC_switch_magisk,[2023012100]
1+
QSC_switch_update,http://z23r562938.iask.in/QSC_switch_magisk,[2023120400]
22
网盘:https://topdalao.lanzoui.com/b02dplxrc
33
密码:1111

0 commit comments

Comments
 (0)