WickedW
WickedW

Reputation: 2591

Xamarin, Windows 10 Parallels and connecting to a MAC based Android Emulator

I am trying to get my Parallels Visual Studio install to talk to the Android Studio Emulators on my MAC (for whatever reason I am struggling to start the windows ones such as Android Player / Microsoft Android Emulator as they ask for Hyper-V or whatever etc).

Also, having it connect to my MAC reduces the need to install emulators on every VM instance.

I have followed the steps in this guide -

https://taco.visualstudio.com/en-us/docs/run-android-emulator-on-osx-using-parallels/

And after I run the putty SSH script to connect to the MAC, I sadly cannot see any emulators using

adb devices

But, if I run from windows command prompt after the script has connected -

adb connect localhost:5555 

I then see via

adb devices 

List of devices attached
emulator-5554 offline

So it is "sort of" connecting, but the device is registering as offline and I cannot seem to do anything to get it online so that it could finally show up in the Xamarin Visual Studio Device list.

Does anyone have experience of this who could help out? Is this doable for Xamarin Visual Studio?

NOTES

I have tried kill-server / start-server on both machines to no avail to remove the offline

Upvotes: 1

Views: 1512

Answers (3)

tribal
tribal

Reputation: 297

Another option for connecting from Visual Studio inside Parallels to the emulator on the Mac. This one doesnt require SSH or saving the password in cleartext

https://learn.microsoft.com/en-us/xamarin/android/troubleshooting/questions/connect-android-emulator-mac-windows

Upvotes: 1

Bicskei Tibor
Bicskei Tibor

Reputation: 146

Thank you WickedW, I'm glad it helped!

So the solution is:

I had the same problem and I found that if Xamarin studio is running on Mac, it will block ports 5554 and 5555. Close it, run in Parallels Windows adb kill-server (Visual Studio will restart it) and restart the SSH connection.

Upvotes: 2

WickedW
WickedW

Reputation: 2591

Thanks to "bitibi" on -

https://forums.xamarin.com/discussion/comment/249573#Comment_249573

I always had Xamarin Studio open during a working day when trying to fix this, and it was basically blocking the ports, soon as turned off Xamarin Studio and re-tried the process, all started working!!

Upvotes: 1

Related Questions