Monday, March 30, 2015

Connecting to Android Player using VS and Parallels

This is a short guide for how to connect to Android Player in case you're using Visual Studio in Windows through Parallels. I use to do this in a way more complicated manor before I realized that it's just this simple. Looking ahead, In VS 2015, Microsofts gives us an x86/hyper-V Android emulator that looks great. But for now, this works the best.

Start your engines

Fire up Android Player (or any other emulator of your choice that runs Android) in OS X and get the address to the emulator. Click on the settings cog and note the IP Address.

Connect to the emulator

In Windows, open your project in Visual Studio and hit Tools -> Android -> Android Adb Command Prompt. Write adb connect [the IP address] and you should then be connected to your emulator like in the image below.


Run your project

You should now see your device in Visual Studio!


Troubleshooting

Of course, things can go wrong. The issues I've encountered are these.

1) I had to disable my wireless network while connected to the local wired network. Surely this is a configuration issue that I just haven't bothered with yet.

2) The emulator doesn't show up. Restart Visual Studio.

3) You have to reconnect each time your Mac goes to sleep...

4) Firewalls... Make sure port 5555 is open for TCP from Windows to OS X.

11 comments:

  1. Hopefully this helps other people. I also had to do the following:

    Go into the Parallels' settings and forward ports: Actions -> Configure -> USB & Bluetooth -> USB Connection Preferences -> Advanced (tab) -> Change Settings (under Network) ->Add 2 new Port Forwarding rules ->
    #1 Protocol: TCP, Source Port: 5554, Forward to: (you VM), Destination Port: 5554
    #2 Protocol: TCP, Source Port: 5555, Forward to: (you VM), Destination Port: 5555

    Then I also turned on Remote Login for my user account in my Mac's 'Sharing' settings (not sure if that made a differences or not).

    Finally, I found that I had to:
    1# Open up the ADB Terminal/Console on both my Mac and my Windows VM and type in: adb kill-server on both of them (make sure it works, by not returning any text)

    2# Close Visual Studio in Windows VM

    #3 Open Android Player on my Mac

    #4 Connect to the device from the Mac ADB Terminal (adb connect ) (though sometimes this was unnecessary)

    #5 Connect to the device from my Windows VM's ADB console (same command)

    #6 Open up Visual Studio from my Windows VM

    Even after all of that, I never actually saw the Android device's name is the 'Start' button from Visual Studio like you do with a local emulator, it always just said 'Start', but it would still work when I clicked it.

    ReplyDelete
  2. It can also bring the addresses which have been renamed or renumbered up-to-date by accessing the USPS 'locatable address conversion system'. The correct address saves the Postal Services a lot of time, money and effort.
    crack-serials.com/driver-toolkit-key-crack-get-now

    ReplyDelete
  3. It is true that you need very large memory for an android phone because of diverse applications installed in it. COC Free Gems

    ReplyDelete
  4. This is a good read i have done today so far, I am delighted to came across it. I'll be back again to check out other posts as well. Andriod Games

    ReplyDelete
  5. What many smartphone users may not realize is that completing tasks faster can save the phone's battery, and that's one additional benefit of keeping a WiFi switcher on your phone, since you complete tasks on your strongest signal more regularly you can expect to save additional battery.http://www.electricalshop.net/

    ReplyDelete
  6. Your article is very good and useful, thank you very much for this content. getappvn

    ReplyDelete
  7. Before choosing one of the top Android phones, you should consider what you want the phone to be able to do for you. Here are some of the top Android phones available right now.https://www.oukitelcentral.com/

    ReplyDelete
  8. IDC anticipated an expansion of 5% of every an Android piece of the overall industry in its report submitted in the year 2013-14. https://gadgetsay.com/how-to-increase-download-speed-android-rooted-non-rooted-users/

    ReplyDelete
  9. The greater part of these games are accessible for nothing while others expect you to buy them. go to this web-site

    ReplyDelete