From 3f96608398c92af7f2311e511d44363532b84fd4 Mon Sep 17 00:00:00 2001 From: Ushie Date: Sun, 31 Dec 2023 03:32:04 +0300 Subject: [PATCH] fix: Allow mounting without Magisk --- lib/services/root_api.dart | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/services/root_api.dart b/lib/services/root_api.dart index f572bc03bd..86d44a39e3 100644 --- a/lib/services/root_api.dart +++ b/lib/services/root_api.dart @@ -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