Skip to content

Instantly share code, notes, and snippets.

@picosaur
Created November 20, 2024 13:16
Show Gist options
  • Save picosaur/032e7b502d1322ac7b91390859114d83 to your computer and use it in GitHub Desktop.
Save picosaur/032e7b502d1322ac7b91390859114d83 to your computer and use it in GitHub Desktop.
check android emulator is ready
#!/usr/bin/env bash
# Kill emulator
adb -s emulator-5554 emu kill
# Start the emulator
emulator -avd NexusOne -gpu on -qemu -enable-kvm &
# Don't exit until emulator is loaded
output=''
while [[ ${output:0:7} != 'stopped' ]]; do
output=`adb shell getprop init.svc.bootanim`
sleep 1
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment