From d6fdbfe9b7a08aed4b464990e1d19086600737c4 Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Sun, 8 Mar 2020 23:27:06 -0700 Subject: [PATCH] Utilize standalone mode for emulator.sh --- scripts/emulator.sh | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/scripts/emulator.sh b/scripts/emulator.sh index 9775736b5..ffe795928 100755 --- a/scripts/emulator.sh +++ b/scripts/emulator.sh @@ -45,17 +45,10 @@ chmod 777 busybox chmod 777 magiskinit if [ `./busybox id -u` -ne 0 ]; then - # Re-run script with root - exec /system/xbin/su 0 sh $0 + # Re-exec script with root + exec /system/xbin/su 0 ./busybox sh -o standalone $0 fi -# First setup a good env to work with -rm -rf bin -./busybox mkdir bin -./busybox --install -s bin -OLD_PATH="$PATH" -PATH="/data/local/tmp/bin:$PATH" - # Remove previous setup if exist pgrep magiskd >/dev/null && pkill -9 magiskd [ -f /sbin/magisk ] && umount -l /sbin