diff --git a/next.md b/next.md index 470f762..3f4760a 100644 --- a/next.md +++ b/next.md @@ -17,3 +17,17 @@ Git repo should not contain unknown files. Then commit. ## Tasks + +fix: + +[6ms] no emulator running — booting AVD sharedinbox_test +Emulator did not become ready within 120 s +task: Failed to run task "deploy-android": task: Failed to run task "integration-android": exit status 1 + +Why does the emulator not start? Where are the logs? + +After that: task deploy-android + +fix, if it fails. + +--- diff --git a/stalwart-dev/integration_android_test.sh b/stalwart-dev/integration_android_test.sh index a07ffbf..83ddc71 100755 --- a/stalwart-dev/integration_android_test.sh +++ b/stalwart-dev/integration_android_test.sh @@ -38,6 +38,10 @@ ADB=$(command -v adb 2>/dev/null || echo "${ANDROID_HOME:-$HOME/Android/Sdk}/pla exit 1 } +# Ensure adb daemon is running before querying/starting the emulator; without it +# the emulator cannot register and adb devices always returns empty. +"$ADB" start-server >/dev/null 2>&1 || true + # Detect a connected Android emulator; auto-start the sharedinbox_test AVD if none is running. EMULATOR_ID=$("$ADB" devices | awk '/^emulator-[0-9]+[[:space:]]+device$/ {print $1; exit}') if [ -z "$EMULATOR_ID" ]; then diff --git a/stalwart-dev/run_android.sh b/stalwart-dev/run_android.sh index 16a2f94..8c69368 100755 --- a/stalwart-dev/run_android.sh +++ b/stalwart-dev/run_android.sh @@ -12,6 +12,9 @@ ADB=$(command -v adb 2>/dev/null || echo "${ANDROID_HOME:-$HOME/Android/Sdk}/pla exit 1 } +# Ensure adb daemon is running before querying/starting the emulator. +"$ADB" start-server >/dev/null 2>&1 || true + EMULATOR_ID=$("$ADB" devices | awk '/^emulator-[0-9]+[[:space:]]+device$/ {print $1; exit}') if [ -z "$EMULATOR_ID" ]; then EMULATOR_BIN="${ANDROID_HOME:-$HOME/Android/Sdk}/emulator/emulator"