From 21b3c9a3bc6f9bfd3114e0ae4c4ca249367249aa Mon Sep 17 00:00:00 2001 From: KOWX712 Date: Sun, 20 Oct 2024 21:43:20 +0800 Subject: [PATCH] update service.sh --- module/service.sh | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/module/service.sh b/module/service.sh index c42e4ba..f73c0aa 100644 --- a/module/service.sh +++ b/module/service.sh @@ -1,18 +1,15 @@ MODDIR=${0%/*} COMPATH="$MODDIR/common" -# Check pm command functionality -sleep 10 -until pm list packages > /dev/null 2>&1; do - sleep 1 -done - -# Check tricky store status TS="/data/adb/modules/tricky_store" -if [ -f "$TS/disable" ]; then - cat "$COMPATH/disabled" > "$MODDIR/module.prop" -elif [ ! -d "$TS" ]; then + +if [ ! -d "$TS" ]; then cat "$COMPATH/ninstalled" > "$MODDIR/module.prop" +elif [ -f "$TS/disable" ]; then + cat "$COMPATH/disabled" > "$MODDIR/module.prop" else cat "$COMPATH/normal" > "$MODDIR/module.prop" - sh "$MODDIR"/common/UpdateTargetList.sh || true + until [ "$(getprop sys.boot_completed)" = "1" ]; do + sleep 1 + done + . "$COMPATH/common/UpdateTargetList.sh" fi \ No newline at end of file