Commit 2fb46a11 authored by vvb2060's avatar vvb2060 Committed by John Wu

Check MAGISKBIN/magiskpolicy

parent 9a114127
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment