Skip to content

Commit

Permalink
Utilize standalone mode for emulator.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
topjohnwu committed Mar 9, 2020
1 parent 0722827 commit d6fdbfe
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions scripts/emulator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d6fdbfe

Please sign in to comment.