If needed, replace 5555 with the other port you like from step 4.
Replace "ip-address-of-the-mac" with the IP address of the Mac, for example as listed by ifconfig vmnet8 | grep 'inet '. The appropriate network interface inĬonnect to the emulator from the Windows machine: C:\> adb connect ip-address-of-the-mac:5555 The name of the special NAT device for the Shared Networking Interface name from vmnet8 if you're using Parallels. This command sets up port forwarding using the pf packet filter In this example): sed '/rdr-anchor/a rdr pass on vmnet8 inet proto tcp from any to any port 5555 -> 127.0.0.1 port 5555' /etc/pf.conf | sudo pfctl -ef. The odd-numbered port on the loopback interface ( 127.0.0.1:5555 To redirect TCP packets from port 5555 (or any other port you (Option 1 is usually easier than Option 2, especially if System Preferences > Security & Privacy > Firewall is switched on.) The Terminal window to quit the nc commands once you're done Outbound packets back the other way: cd /tmpĪs long as the nc commands stay running in a Terminal window, the Interface ( 127.0.0.1 5555 in this example), and to forward the To forward inbound TCP packets received externally on port 5555 (orĪny other port you like) to the odd-numbered port on the loopback
The odd-numbered port is the one used to connect to adb. Network interface: lsof -iTCP -sTCP:LISTEN -P | grep 'emulator\|qemu'Įmulator6 94105 macuser 20u IPv4 0xa8dacfb1d4a1b51f 0t0 TCP localhost:5555 (LISTEN)Įmulator6 94105 macuser 21u IPv4 0xa8dacfb1d845a51f 0t0 TCP localhost:5554 (LISTEN) Note that the emulator is listening on 2 TCP ports on the loopback Kill the adb server on the Mac: adb kill-server Still in the android tool, click on Virtual Devices on the left, and then click New.We recommend using an Android Emulator that does not include the Google Play Store. Select Available Packages, pick some platform versions and install.
To install platforms run the android command located in the tools folder of the SDK (use Terminal.app on a Mac, or the Command Prompt on Windows, Linux folks you know what to do :). Step 3 - Install Android PlatformsĪt this point, I tried running the emulator command, but the SDK doesn't contain any Android Platforms, the Android platform is essentially Android OS, you need to install at least one version (eg 1.6, 2.1, 2.2, etc) to run the emulator. Since we are using the command line you might find it useful to add the android-sdk- platform/tools folder to your system path so you can run the android commands from any folder. I placed the android-sdk-mac_86 folder in my /Applications/ folder, but you can put it wherever you want. Step 1 - Download the Android SDKĭownload the Android SDK, and unzip it somewhere. Also, I'm using a Mac, but I think the steps should be pretty close if you are running Windows or Linux.
I should mention that there is also an Eclipse Plugin for Android Development as well that you can use instead. So I thought I would give a quick and easy guide for folks to follow, that might be interested in getting started with Android Development and running the Android Emulator.
I am in the process of building some mobile apps for one of my clients, and while I'm pretty familiar with running the iPhone simulator and building iPhone apps, I'm pretty new to the Android development tools at this point.