install_magisk.sh 571 B

1234567891011121314151617
  1. #!/bin/env bash
  2. echo "This file is untested, and is intended for documentation purposes only."
  3. exit 1
  4. ### UNTESTED!!! ###
  5. ## Execute from inside the MagiskOnEmulator directory
  6. IMAGE_PATH=~/Android/Sdk/system-images/android-30/google_apis/x86/
  7. if [ ! -f "$IMAGE_PATH/ramdisk.bak.img" ] ; then
  8. cp "$IMAGE_PATH/ramdisk.img" "$IMAGE_PATH/ramdisk.bak.img"
  9. fi
  10. cp "$IMAGE_PATH/ramdisk.bak.img" ramdisk.img
  11. $EMULATOR_EXECUTABLE -avd $DEVICE_NAME -noaudio -camera-back none -qemu -enable-kvm &
  12. ./patch.sh
  13. cp ramdisk.img "$IMAGE_PATH/ramdisk.img"
  14. pkill $EMULATOR_EXECUTABLE