You can’t run Android in a VM so if you are running Windows on a Mac using VMWare Fusion, you’ll need to connect to the Android running on the Mac. More detail
Once you have installed Visual Studio for Mac, open it and run the emulator for Android.
On the Mac
Open a Terminal on your Mac and enter this to add the Android platform tools into the path:
echo ‘export PATH=$PATH:~/Library/Developer/Xamarin/android-sdk-macosx/platform-tools/’ >> ~/.bash_profile
If you get a permission error on the bash_profile, run this:
sudo chown YOURACCOUNTNAME ~/.bash_profile
You should see a nice list of the emulators running. That will show you that you have completed the first step. You do not need to ever run this again.
Open TextEdit and add this as a text file:
echo ‘Starting android pipe listener’
nc -kl 5555 0<backpipe | nc 127.0.0.1 5555 > backpipe
In TextEdit go to the Format menu and choose Make Plain Text
In TexEdit save the file to your desktop but without the .txt extension. Note that we unchecked the .txt extension
We now need to tell OSX that the file is an executable. Open Terminal and use the following command and path (yours will be a bit different than mine)
chmod 700 /Users/<your account>/Desktop/adb
Now we can run it by double clicking the adb file. This should will run in the background always. so many sure it’s run when you want to connect to Android from the Windows VM
On the PC
Now that you are running the bash script on the Mac, it’s ready to be connected to.
Add a Windows Batch file on your desktop there with the following. Run it one to have the connection set up. It will appear then disappear. If you loose connection, then run it again.
cd C:\Program Files (x86)\Android\android-sdk\platform-tools
adb.exe connect <IP address of the Mac, get it from the Mac Settings app-> network>
You’ll see the Android device in your Visual Studio:
If when you use the adb devices command on the PC, you get an “unauthorized” go check the running android and ensure it isn’t asking for permission. If it is, grant it then run both script on the Mac and PC to re-establish connection.