Skip to content

Instantly share code, notes, and snippets.

@ricardopereira
Forked from hidroh/avd.sh
Created November 16, 2023 11:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ricardopereira/22f943ae84e8160237d74fedce122e03 to your computer and use it in GitHub Desktop.
Save ricardopereira/22f943ae84e8160237d74fedce122e03 to your computer and use it in GitHub Desktop.
Handy bash script to prompt for an Android virtual device (AVD) selection and launch it. Assuming that Android SDK has been set up and is in user PATH.
pushd ${ANDROID_HOME}/emulator
./emulator -list-avds | cat -n
printf "Select AVD: "
read index
avd=$(./emulator -list-avds | sed "${index}q;d")
echo "Selected $avd"
./emulator -netdelay none -netspeed full -avd $avd
popd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment