Check zygisksu before execute magisk

This commit is contained in:
3a06fa5cf14d569c 2024-10-26 23:10:25 +08:00 committed by GitHub
parent cd22f0361a
commit 721c93e7f0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -8,8 +8,7 @@ if ! $BOOTMODE; then
fi
# Module requires Zygisk to work
isZygiskEnabled=$(magisk --sqlite "SELECT value FROM settings WHERE key='zygisk';")
if [ "$isZygiskEnabled" == "value=0" ] && [ ! -d "/data/adb/modules/zygisksu" ]; then
if [ ! -d "/data/adb/modules/zygisksu" ] && [ "$(magisk --sqlite "SELECT value FROM settings WHERE key='zygisk';")" == "value=0" ]; then
abort "! Zygisk is not enabled. Please, enable Zygisk in Magisk settings or install ZygiskNext or ReZygisk module."
fi