From 1a964e78dd651a2ba7f8d2ebe8e00ff235d879fe Mon Sep 17 00:00:00 2001 From: canyie Date: Thu, 21 Jul 2022 16:55:27 +0800 Subject: [PATCH] Support 32-bit emulators This would be helpful when debugging arch-related bugs, there is no reason to prevent it. --- scripts/avd_magisk.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/avd_magisk.sh b/scripts/avd_magisk.sh index 5445e0135..a98219d98 100755 --- a/scripts/avd_magisk.sh +++ b/scripts/avd_magisk.sh @@ -3,7 +3,7 @@ # AVD Magisk Setup ##################################################################### # -# Support emulator ABI: x86_64 and arm64 +# Support emulator ABI: ALL # Support API level: 23 - 31 (21 and 22 images do not have SELinux) # # With an emulator booted and accessible via ADB, usage: @@ -135,7 +135,11 @@ cp -af ./magiskboot $MAGISKBIN/magiskboot cp -af ./magiskinit $MAGISKBIN/magiskinit cp -af ./busybox $MAGISKBIN/busybox -ln -s ./magisk64 $MAGISKTMP/magisk +if [ "$IS64BIT" = "true" ]; then + ln -s ./magisk64 $MAGISKTMP/magisk +else + ln -s ./magisk32 $MAGISKTMP/magisk +fi ln -s ./magisk $MAGISKTMP/su ln -s ./magisk $MAGISKTMP/resetprop ln -s ./magisk $MAGISKTMP/magiskhide