From 2fb46a11dcdbb75ab04e92a4a98e2f655864cc6a Mon Sep 17 00:00:00 2001 From: vvb2060 Date: Wed, 23 Mar 2022 00:53:06 +0800 Subject: [PATCH] Check MAGISKBIN/magiskpolicy --- app/src/main/res/raw/manager.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/res/raw/manager.sh b/app/src/main/res/raw/manager.sh index f2ec60d29..888d30ec4 100644 --- a/app/src/main/res/raw/manager.sh +++ b/app/src/main/res/raw/manager.sh @@ -8,8 +8,11 @@ run_delay() { env_check() { for file in busybox magiskboot magiskinit util_functions.sh boot_patch.sh; do - [ -f $MAGISKBIN/$file ] || return 1 + [ -f "$MAGISKBIN/$file" ] || return 1 done + if [ "$2" -ge 24302 ]; then + [ -f "$MAGISKBIN/magiskpolicy" ] || return 1 + fi grep -xqF "MAGISK_VER='$1'" "$MAGISKBIN/util_functions.sh" || return 1 grep -xqF "MAGISK_VER_CODE=$2" "$MAGISKBIN/util_functions.sh" || return 1 return 0