Skip to content

Instantly share code, notes, and snippets.

@brotoo25
Last active July 29, 2021 13:35
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brotoo25/246d8767982ed74ce98ed165ea099a5d to your computer and use it in GitHub Desktop.
Save brotoo25/246d8767982ed74ce98ed165ea099a5d to your computer and use it in GitHub Desktop.
Script to run Android Emulator on Mac when wifi not running
#!/bin/bash
~/Library/Android/sdk/emulator/emulator -avd Nexus_5X_API_28_x86 -dns-server 8.8.8.8,8.8.4.4 &
osascript -e 'tell application "Terminal" to close first window' & exit
# Instead of 'Nexus_5X_API_28_x86', use your own emulator AVD image name, which can be found running the following command:
# ~/Library/Android/sdk/emulator/emulator -list-avds
#
# Also don't forget to give it execution permissions with "chmod +x".
#
# Naming the file with the ".command" extension makes it launch when double clicked on OSX.
@Neeraj222
Copy link

wtf man, doesn't work

@brotoo25
Copy link
Author

Have you replaced the AVD name to your own?

@gblnovaes
Copy link

very good , script 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment