Zparseopts -D -E -F -cold=cold || exit 1Įcho "$fg\n# Searching for AVDs$reset_color"Īvds=$(~/Android/Sdk/emulator/emulator -list-avds)Įcho "$fg\n# Starting '$avd'$reset_color" Getting up and running involves a lot of steps, so here’s a zsh script that starts the android emulator and sets up that netcat traffic forwarding. Automate starting the emulator and setting up the backpipe When you’re done emulating, all you have to do is kill the nc command. So the adb command looked like:Īdb connect 10.0.2.2:15555 Tear down the connection In this case, Windows was inside a qemu VM, which lets us connect to the host using 10.0.2.2. The IP address could be an address of a remote server, the VM host, etc. Connect adb to the remote emulator: adb connect :15555.On the Windowds side, add C:\Program Files (x86)\Android\android-sdk\platform-tools to your PATH so that you have easy access to adb.Use Netcat to shuttle TCP traffic from an external port to localhost:5555.Create a named pipe named /tmp/emupipe (Could be called anything):.See which port the emulator is listening on (Usually 5555): lsof -iTCP -sTCP:LISTEN -P | grep 'emulator\|qemu'.Kill the existing adb server: ~/Android/Sdk/platform-tools/adb kill-server.Use the AVD Manager to install and run an android emulator. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |