Skip to content

Commit 0448bd1

Browse files
committed
Run avdmanager from the job-local SDK
The system `avdmanager` failed with `Package path is not valid`, because it could not see the system image in the job-local SDK. --- Generated with the help of Claude Code (Opus 5.5), https://code.claude.com
1 parent 9f3acf7 commit 0448bd1

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎.buildkite/commands/connected-tests.sh‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ ln -s "$BUILD_SDK/platform-tools" "$EMULATOR_SDK/platform-tools"
1414
ln -s "$BUILD_SDK/platforms" "$EMULATOR_SDK/platforms"
1515
export ANDROID_HOME="$EMULATOR_SDK"
1616
export ANDROID_SDK_ROOT="$EMULATOR_SDK"
17-
export PATH="$EMULATOR_SDK/emulator:$EMULATOR_SDK/platform-tools:$PATH"
17+
export PATH="$EMULATOR_SDK/cmdline-tools/latest/bin:$EMULATOR_SDK/emulator:$EMULATOR_SDK/platform-tools:$PATH"
1818

1919
stop_emulator() {
2020
adb emu kill || true
@@ -23,7 +23,8 @@ stop_emulator() {
2323
}
2424

2525
echo "--- :package: Installing emulator and system image"
26-
sdkmanager --sdk_root="$EMULATOR_SDK" "emulator" "$SYSTEM_IMAGE" > /dev/null
26+
# `avdmanager` resolves the SDK from its own location, ignoring `ANDROID_HOME`, so it has to live in this SDK too.
27+
sdkmanager --sdk_root="$EMULATOR_SDK" "cmdline-tools;latest" "emulator" "$SYSTEM_IMAGE" > /dev/null
2728

2829
echo "--- :mag: Checking hardware acceleration"
2930
ls -la /dev/kvm

0 commit comments

Comments
 (0)