How do I launch SurfaceDuo Emulator from Visual Studio

49 views Asked by At

I can open and run the Surface Duo Emulator from the command line, create a Xamarin Mobile app (Android, UWP) but when I try to deploy using the Android as the Startup Project, I am unable to select the Surface Duo Emulator as an available Android Device.

There is no error msg, because the device is not available. Other Android (x86) emulators are available.

If I create and open an Android project using Android Studio, the Surface Duo is recognized and is available as a device.

I've also added the Xamarin.SurfaceDuo from Nuget.

Any ideas?

1

There are 1 answers

2
nevermore On BEST ANSWER

There is a document about how to use the Surface Duo emulator with Xamarin apps.

  1. Find the installation location of the Surface Duo Emulator. The default location is %USERPROFILE%\SurfaceDuoEmulator.
  2. Open the artifacts folder inside of the installation folder.
  3. Make a backup copy of run.bat - You can copy it to something like run_androidstudio.bat.
  4. Open the file run.bat in a text editor.
  5. Replace the entire contents of the file with the snippet for your platform below:
  6. Verify the ANDROID_SDK_LOCATION path value near the top of the file is correct (the default Visual Studio install location is specified).