Skip to content

Commit

Permalink
Update avd_test API versions
Browse files Browse the repository at this point in the history
  • Loading branch information
topjohnwu committed Dec 3, 2024
1 parent 0661665 commit 837c679
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@ jobs:
strategy:
fail-fast: false
matrix:
version: [23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34]
version: [23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35]
type: [""]
include:
- version: 35
- version: "Baklava"
type: "google_apis"

steps:
Expand Down
22 changes: 16 additions & 6 deletions scripts/avd_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ lsposed_url='https://github.com/LSPosed/LSPosed/releases/download/v1.9.2/LSPosed
emu_pid=

atd_min_api=30
atd_max_api=34
atd_max_api=35
lsposed_min_api=27
lsposed_max_api=34
huge_ram_min_api=26
Expand All @@ -25,6 +25,7 @@ cleanup() {
}

wait_for_bootanim() {
set -e
adb wait-for-device
while true; do
local result="$(adb exec-out getprop init.svc.bootanim)"
Expand All @@ -38,6 +39,7 @@ wait_for_bootanim() {
}

wait_for_boot() {
set -e
adb wait-for-device
while true; do
local result="$(adb exec-out getprop sys.boot_completed)"
Expand Down Expand Up @@ -79,8 +81,15 @@ test_emu() {

test_setup $variant

# Install LSPosed
local lsposed
if [ $api -ge $lsposed_min_api -a $api -le $lsposed_max_api ]; then
lsposed=true
else
lsposed=false
fi

# Install LSPosed
if $lsposed; then
adb push out/lsposed.zip /data/local/tmp/lsposed.zip
echo 'PATH=$PATH:/debug_ramdisk magisk --install-module /data/local/tmp/lsposed.zip' | adb shell /system/xbin/su
fi
Expand All @@ -91,7 +100,7 @@ test_emu() {
test_app

# Try to launch LSPosed
if [ $api -ge $lsposed_min_api -a $api -le $atd_max_api ]; then
if $lsposed; then
adb shell rm -f /data/local/tmp/window_dump.xml
adb shell am start -c org.lsposed.manager.LAUNCH_MANAGER com.android.shell/.BugreportWarningActivity
while adb shell '[ ! -f /data/local/tmp/window_dump.xml ]'; do
Expand All @@ -113,6 +122,7 @@ run_test() {
TiramisuPrivacySandbox) api=33 ;;
UpsideDownCakePrivacySandbox) api=34 ;;
VanillaIceCream) api=35 ;;
Baklava) api=36 ;;
*)
print_error "! Unknown system image version '$ver'"
exit 1
Expand Down Expand Up @@ -211,11 +221,11 @@ curl -L $lsposed_url -o out/lsposed.zip
if [ -n "$1" ]; then
run_test $1 $2
else
for api in $(seq 23 34); do
for api in $(seq 23 35); do
run_test $api
done
# Android 15 Beta
run_test 35 google_apis
# Android 16 Beta
run_test Baklava google_apis
# Run 16k page tests
run_test 35 google_apis_ps16k
fi
Expand Down

0 comments on commit 837c679

Please sign in to comment.