fix: Allow mounting without Magisk

This commit is contained in:
Ushie 2023-12-31 03:32:04 +03:00
parent 9ed43efe5d
commit 3f96608398
No known key found for this signature in database
GPG Key ID: B3AAD18842E34632

View File

@ -144,8 +144,12 @@ class RootAPI {
);
final String mountScript = '''
#!/system/bin/sh
MAGISKTMP="\$(magisk --path)" || MAGISKTMP=/sbin
MIRROR="\$MAGISKTMP/.magisk/mirror"
# Mount using Magisk mirror, if available.
MAGISKTMP="$( magisk --path )" || MAGISKTMP=/sbin
MIRROR="${'$'}MAGISKTMP/.magisk/mirror"
if [ ! -f ${'$'}MIRROR ]; then
MIRROR=""
fi
until [ "\$(getprop sys.boot_completed)" = 1 ]; do sleep 3; done
until [ -d "/sdcard/Android" ]; do sleep 1; done