Xamarin Android Emulator Mac

  1. Xamarin Android Player
  2. Xamarin Android Hyper V
  3. Xamarin Android Emulator Mac Download
  4. Xamarin Mac Android Emulator Not Starting
Xamarin Android Emulator Mac

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

Rebooting the Mac seems to fix it for a while. I've tried re-building the AVD. I've tried it with several different types of AVDs. It happens with both Intel Atom and ARM AVDs. It seemed to start when the menus for starting the emulator changed in Xamarin Studio, but I can't be sure if it's a Xamarin problem or an Android emulator issue. These articles explain how to setup the Android Emulator fortesting and debugging Xamarin.Android applications. Mac For Xamarin Development Android Device Setup. This article explains how to setup a physical Android device andconnect it to a development computer so that the device may be used torun and debug Xamarin.Android applications.

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
source ~/.bash_profile
adb devices

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:

#!/bin/bash
echo ‘Starting android pipe listener’
cd /tmp
mkfifo backpipe
nc -kl 5555 0<backpipe | nc 127.0.0.1 5555 > backpipe

In TextEdit go to the Format menu and choose Make Plain Text

Xamarin Android Player

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)

Xamarin Android Hyper V

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)Androidandroid-sdkplatform-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:

Xamarin Android Emulator Mac Download

Enjoy!

Problems?

Xamarin Mac Android Emulator Not Starting

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.