Support Android S AVD

This commit is contained in:
topjohnwu 2021-05-13 04:45:13 -07:00
parent 5e1fba3603
commit 7717f0a6b0
2 changed files with 4 additions and 2 deletions

View File

@ -35,7 +35,9 @@ object Info {
@JvmField var ramdisk = false
@JvmField var hasGMS = true
@JvmField val isPixel = Build.BRAND == "google"
@JvmField val isEmulator = getProperty("ro.kernel.qemu", "0") == "1"
@JvmField val isEmulator =
getProperty("ro.kernel.qemu", "0") == "1" ||
getProperty("ro.boot.qemu", "0") == "1"
var crypto = ""
var noDataExec = false

View File

@ -29,7 +29,7 @@ mount_sbin() {
if [ ! -f /system/build.prop ]; then
# Running on PC
cd "$(dirname "$0")/.."
adb push native/out/x86/busybox native/out/x86/magiskinit \
adb push native/out/x86_64/busybox native/out/x86_64/magiskinit \
native/out/x86_64/magisk scripts/emulator.sh /data/local/tmp
adb shell sh /data/local/tmp/emulator.sh
exit 0