mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-08-11 08:57:27 +00:00
Check util_functions.sh version
This commit is contained in:
@@ -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() {
|
|||||||
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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user