Get the Surface Duo SDK
This article describes functionality and guidance that is in public preview and may be substantially modified before it's generally available. Microsoft makes no warranties, express or implied, with respect to the information provided here.
The Surface Duo SDK Preview includes a Surface Duo preview image (to use with the Android Emulator) that you can use to develop and test your apps. In also provides several new APIs that let you make your app aware of the display mask and the hinge on the Surface Duo device so you can take advantage of unique features of the device.
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 SDK Preview prerequisites
- 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.
- (Optional) Hardware virtualization is enabled. For speedy emulation, follow the guidelines outlined in emulator acceleration in the Android Studio docs.
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.
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.
To install the emulator and SDK, run the following command. (If necessary, update the package name to match what you downloaded).
sudo dpkg -i SurfaceDuoSDKPreview_EmulatorOSImage_and_APIs_ubuntu_debian_2020.117.2.deb
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.
The Surface Duo SDK
Supported Operating Systems
- Windows® 8/10 (32- or 64-bit)
- macOS® 10.10 (Yosemite) or higher
- GNOME or KDE desktop (Tested on Ubuntu® 14.04 LTS, Trusty Tahr)
- 4 GB of RAM minimum, 8 GB of RAM recommended
- 4 GB of available hard disk space minimum, more recommended
- The Surface Duo preview image requires an Android Emulator to be installed with Android Studio or Visual Studio (Xamarin).
Download and install the Surface Duo SDK
Download the Surface Duo SDK Preview from the Microsoft Download Center. The files are named "SurfaceDuoEmulatorPreview". Select the right one for your development system.
- Surface Duo SDK on the Microsoft Download Center.
Return to this page when you have downloaded the SDK.
Install and run the SDK and emulator
- Unzip the downloaded file, and launch the installer.
- After completing the SDK Setup, you can launch the Surface Duo Emulator via the start menu link.
- If the emulator does not start, you might need to update the pointer to your Android SDK installation.
Update the pointer to your Android SDK
If you changed the installation location of the Android SDK from the default, you will need to update the
run script to point to the correct installation 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
- Open the
artifactsfolder inside of the installation folder.
- Make a backup copy of
run.bat- You can copy it to something like
- Open the file
run.batin a text editor.
- Verify the
ANDROID_SDK_LOCATIONpath value near the top of the file is correct.
rem ##### ENSURE THE SDK LOCATION BELOW IS CORRECT: ####### set ANDROID_SDK_LOCATION=C:\Program Files (x86)\Android\android-sdk