Commit 9396288c authored by vvb2060's avatar vvb2060 Committed by John Wu

Check util_functions.sh version

parent f89f0883
...@@ -145,7 +145,7 @@ class HomeViewModel( ...@@ -145,7 +145,7 @@ class HomeViewModel(
) )
if (invalidStates.any { it == stateMagisk } || shownDialog) return if (invalidStates.any { it == stateMagisk } || shownDialog) return
val result = Shell.su("env_check").await() val result = Shell.su("env_check ${Info.env.magiskVersionString} ${Info.env.magiskVersionCode}").await()
if (!result.isSuccess) { if (!result.isSuccess) {
shownDialog = true shownDialog = true
EnvFixDialog().publish() EnvFixDialog().publish()
......
...@@ -10,6 +10,8 @@ env_check() { ...@@ -10,6 +10,8 @@ env_check() {
for file in busybox magiskboot magiskinit util_functions.sh boot_patch.sh; do for file in busybox magiskboot magiskinit util_functions.sh boot_patch.sh; do
[ -f $MAGISKBIN/$file ] || return 1 [ -f $MAGISKBIN/$file ] || return 1
done done
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 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