Skip to content

Instantly share code, notes, and snippets.

@ncornette
Last active February 25, 2017 23:24
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 ncornette/3370010 to your computer and use it in GitHub Desktop.
Save ncornette/3370010 to your computer and use it in GitHub Desktop.
An interactive Bash function for Android that runs emulator by prompting you a list of all installed avd
# Display a list of all installed avd,
# prompt user to select,
# then run emulator with option -avd set
# Example of use : # emulator-avd
function emulator-avd()
{
avds=($(for f in `find ~/.android/avd/*.ini -iname "*.ini"`; do echo `basename $f .ini`; done))
select avd in ${avds[*]}
do
emulator -avd $avd $*
break
done
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment