Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/usr/bin/env bash -e
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
source "$DIR/helper.sh"
open -a "React Native Debugger"
print_green_text 'Which simulator do you want to open?'
device=''
options=("Nexus_6_API_23" "Pixel_API_24" "Pixel_2_API_26" "Pixel_3_API_28" "Samsung_Galaxy_Xcover_4_API_28" "Quit")
select opt in "${options[@]}"
do
case $opt in
"Nexus_6_API_23")
device="Nexus_6_API_23"
break
;;
"Pixel_API_24")
device="Pixel_API_24"
break
;;
"Pixel_2_API_26")
device="Pixel_2_API_26"
break
;;
"Pixel_3_API_28")
device="Pixel_3_API_28"
break
;;
"Samsung_Galaxy_Xcover_4_API_28")
device="Samsung_Galaxy_Xcover_4_API_28"
break
;;
"Quit")
exit
;;
*) echo "invalid option $REPLY";;
esac
done
print_green_text "Booting $device..."
# https://developer.android.com/studio/run/emulator-commandline
emulator -no-snapshot @"$device"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment