Download and install the Surface Duo Android emulator
The Surface Duo emulator image (to use with the Android Emulator) can be used to develop and test your apps with different screen sizes for both Surface Duo and Surface Duo 2.
Set up the Surface Duo development environment
You should have your Android development environment set-up and up to date before you install the Surface Duo SDK. If you don't have Android Studio installed, download the latest version and command line tools from developer.android.com. You must include Google's Android emulator, which you install using the SDK manager in the Android Studio Tools menu. For new installs, the default options will do this automatically.
Surface Duo emulator prerequisites
To get the full functionality of Surface Duo emulator, please install Android Emulator 30.9.5 or newer.
Use the SDK manager to ensure all the required dev tools (Android SDK Build-Tools, Android SDK Platform-Tools, and Android Emulator) are up to date.
Environment variables update
If you changed the install location of the Android SDK from the default, you need to update the environment variables based on how your Android SDK tools is set, especially ANDROID_SDK_ROOT, if you use Android Studio.
Hardware virtualization is available for the Surface Duo emulator. Follow the guidelines outlined in emulator acceleration in the Android Studio docs to configure your system.
Microsoft Visual Studio/Xamarin
- Complete the installation prerequisites.
- Get the latest version of Visual Studio and ensure Xamarin is installed.
- Ensure the Android SDK is installed via these Visual Studio instructions.
- Review the hardware acceleration guide to get the best emulator performance.
- Complete the installation prerequisites.
- The KVM software package is required. Complete the steps at Configure VM acceleration on Linux to install KVM.
After installing KVM, ensure the current (logged in) user is added to the KVM group.
$ groups <current user> sudo plugdev kvm libvirt
If the current user is not in the KVM group, run the following command to add them:
sudo usermod -a -G kvm <current user>
Reboot the machine.
The Android Studio installation instructions with default settings are all that is required. Be sure to perform updates if you already have Android Studio installed.
Download and install the Surface Duo emulator image
Download the Surface Duo emulator image from the Microsoft Download Center. The files are named SurfaceDuoEmulator_[Android API]_[version]_[platform]. There are Android 10 and Android 11 Surface Duo emulator. Only the Android 11 Surface Duo emulator supports different screen sizes for both Surface Duo and Surface Duo 2. Select combination of API level and platform that matches your requirements.
Download Surface Duo SDK on the Microsoft Download Center.
Return to this page when you have downloaded the file.
Install and run the SDK and emulator
Do not install the new AVD version(beyond March 2022) in the existing directory of the old version on the emulator (prior to March 2022), or overwrite between different Android versions, like the Android 11 emulator over the Android 10 version.
run.sh scripts should never be executed directly. They are indirectly called from the other device specific scripts. Use
- Launch the SurfaceDuoEmulator_[version]_windows.exe installer and follow the Setup Wizard to install the emulator.
- After completing the SDK Setup, you will find two new app icons in the desktop and the Start menu. You can launch the Surface Duo Emulator or Surface Duo 2 Emulator via the app icons or the Start menu links.
- If you changed the install location of the Android SDK from the default, don't forget to update your environment variables or update the pointer to your Android SDK.
Update the pointer to your Android SDK
If you installed the Android Studio SDK to a non-default location, you will need to either update the relevant environment variables, or update the run script to point to the correct install location. Otherwise, the emulator will not run when you click the shortcut or run the script.
Find the installation location of the Surface Duo Emulator. The default location is
%USERPROFILE%\SurfaceDuoEmulator. You can right-click the app icon in the desktop to
Open file location.
Open the file
run.batin a text editor.
DEFAULT_ANDROID_SDK_LOCATION_WIN_VSif you use Visual Studio inside the script file, the following path value matches the installation location of your Android SDK.
rem ##### ENSURE THE ANDROID SDK LOCATION BELOW IS CORRECT ####### set "DEFAULT_ANDROID_SDK_LOCATION_WIN=%LOCALAPPDATA%\Android\Sdk" set "DEFAULT_ANDROID_SDK_LOCATION_WIN_VS=C:\Program Files (x86)\Android\android-sdk"
Read how to get started with the Surface Duo emulator, then start building and testing apps with your preferred development tools:
- Kotlin and Java developers can add the Surface Duo SDK to their projects to access dual-screen controls and helpers.
- Xamarin developers can add the Surface Duo SDK NuGets to their projects and follow these instructions for using the emulator with Visual Studio.
- React Native developers can add these modules.
- Unity developers can get started with a sample project.
- Flutter developers should start with these examples.
- Web developers can use Edge in the emulator, or build and test with desktop developer tools.