| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 54878c0 commit ab6b4ae
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -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" | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments