From bf1912d8f87b903025125a0594b15e4cad4ad05b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AF=BA=E9=B8=A1=E9=B8=AD?= <107602367+chase535@users.noreply.github.com> Date: Fri, 1 Sep 2023 13:16:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=8B=E6=9C=BA=E5=90=AF=E5=8A=A8=E5=AE=8C?= =?UTF-8?q?=E6=AF=95=E5=90=8E=E5=86=8D=E6=89=A7=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- module/common/service.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/module/common/service.sh b/module/common/service.sh index 3b9413b..b711ee6 100644 --- a/module/common/service.sh +++ b/module/common/service.sh @@ -1,4 +1,10 @@ #!/system/bin/sh MODDIR=${0%/*} capacity_file=capacity_file_not_defined -nohup ${MODDIR}/accurate_battery ${capacity_file} & +echo "等待手机启动完毕,以确保时间准确。若只看到这一行内容,请立即联系模块作者!" > /data/adb/accurate_battery/log.txt +until [[ "$(getprop service.bootanim.exit)" == "1" ]]; do + sleep 1 +done +echo "手机启动完毕" >> /data/adb/accurate_battery/log.txt +echo "" >> /data/adb/accurate_battery/log.txt +nohup ${MODDIR}/accurate_battery ${capacity_file} >> /data/adb/accurate_battery/log.txt 2>&1 &