Skip to content

Instantly share code, notes, and snippets.

@caveda
Created January 3, 2024 20:01
Show Gist options
  • Save caveda/26099d14d29bd88eeccc79f2e4d1a546 to your computer and use it in GitHub Desktop.
Save caveda/26099d14d29bd88eeccc79f2e4d1a546 to your computer and use it in GitHub Desktop.
Script to Launch an Emulator and Wait for it
#!/bin/sh
$ANDROID_SDK_HOME/emulator/emulator -avd testDevice -no-audio -no-boot-anim -no-window -read-only &
echo "Waiting for emulator to launch"
timeout 5m adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 5; done;'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment