We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 54878c0 commit ab6b4aeCopy full SHA for ab6b4ae
1 file changed
scripts/start-android-emulator.sh
@@ -0,0 +1,21 @@
1
+#!/usr/bin/env bash
2
+# Start the local Android emulator used for testing pythonnative apps.
3
+#
4
+# Usage:
5
+# ./scripts/start-android-emulator.sh [avd-name]
6
7
+# Defaults to the "Medium_Phone" AVD. List available AVDs with:
8
+# ~/Library/Android/sdk/emulator/emulator -list-avds
9
+
10
+set -euo pipefail
11
12
+AVD_NAME="${1:-Medium_Phone}"
13
+EMULATOR_BIN="${ANDROID_SDK_ROOT:-$HOME/Library/Android/sdk}/emulator/emulator"
14
15
+if [[ ! -x "$EMULATOR_BIN" ]]; then
16
+ echo "Error: emulator binary not found at $EMULATOR_BIN" >&2
17
+ echo "Set ANDROID_SDK_ROOT or install the Android SDK emulator." >&2
18
+ exit 1
19
+fi
20
21
+exec "$EMULATOR_BIN" -avd "$AVD_NAME"
0 commit comments