Support ./build.py emulator with an APK argument

This commit is contained in:
topjohnwu
2025-02-28 16:14:07 -08:00
committed by John Wu
parent afbfb81837
commit 494615d9a0
6 changed files with 153 additions and 126 deletions

View File

@ -2,14 +2,7 @@
# AVD Magisk Setup
#####################################################################
#
# Support API level: 23 - 34
#
# Push files to AVD:
# /data/local/tmp/magisk.apk
# /data/local/tmp/busybox (extract from apk)
# /data/local/tmp/avd_magisk.sh (this file)
# Then execute, you must use non-interactive shell:
# adb shell sh /data/local/tmp/avd_magisk.sh
# Support API level: 23 - 35
#
# For developing Magisk, just use:
# ./build.py emulator

View File

@ -2,7 +2,7 @@
# AVD MagiskInit Setup
#####################################################################
#
# Support API level: 23 - 34
# Support API level: 23 - 35
#
# With an emulator booted and accessible via ADB, usage:
# ./build.py avd_patch path/to/booted/avd-image/ramdisk.img
@ -18,7 +18,7 @@
# rootfs w/o early mount: API 23 - 25
# rootfs with early mount: API 26 - 27
# Legacy system-as-root: API 28
# 2 stage init: API 29 - 34
# 2 stage init: API 29 - 35
#####################################################################
if [ ! -f /system/build.prop ]; then

View File

@ -146,7 +146,7 @@ test_main() {
if [ -z "$AVD_TEST_SKIP_DEBUG" ]; then
# Patch and test debug build
./build.py avd_patch -s "$ramdisk" magisk_patched.img
./build.py avd_patch "$ramdisk" magisk_patched.img
kill -INT $emu_pid
wait $emu_pid
test_emu debug $api
@ -154,7 +154,7 @@ test_main() {
if [ -z "$AVD_TEST_SKIP_RELEASE" ]; then
# Patch and test release build
./build.py -r avd_patch -s "$ramdisk" magisk_patched.img
./build.py -r avd_patch "$ramdisk" magisk_patched.img
kill -INT $emu_pid
wait $emu_pid
test_emu release $api

View File

@ -84,11 +84,11 @@ test_main() {
adb wait-for-device
# Patch and test debug build
./build.py avd_patch -s "$CF_HOME/init_boot.img" magisk_patched.img
./build.py avd_patch "$CF_HOME/init_boot.img" magisk_patched.img
test_cf debug
# Patch and test release build
./build.py -r avd_patch -s "$CF_HOME/init_boot.img" magisk_patched.img
./build.py -r avd_patch "$CF_HOME/init_boot.img" magisk_patched.img
test_cf release
# Cleanup