Utilize standalone mode for emulator.sh

This commit is contained in:
topjohnwu 2020-03-08 23:27:06 -07:00
parent 07228279a3
commit d6fdbfe9b7

View File

@ -45,17 +45,10 @@ chmod 777 busybox
chmod 777 magiskinit chmod 777 magiskinit
if [ `./busybox id -u` -ne 0 ]; then if [ `./busybox id -u` -ne 0 ]; then
# Re-run script with root # Re-exec script with root
exec /system/xbin/su 0 sh $0 exec /system/xbin/su 0 ./busybox sh -o standalone $0
fi 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 # Remove previous setup if exist
pgrep magiskd >/dev/null && pkill -9 magiskd pgrep magiskd >/dev/null && pkill -9 magiskd
[ -f /sbin/magisk ] && umount -l /sbin [ -f /sbin/magisk ] && umount -l /sbin