Microsoft announced they will be releasing the new Surface Duo in December of 2020. The Duo runs on Android and is one of their dual-screen devices that gives users new ways to interact with their apps. It also introduces new challenges for developers to provide the optimal experience for our users. So, Microsoft has released the Surface Duo Emulator to allow developers to get a head start optimizing their apps.
In this article, we will go over 2 different ways to run the Surface Duo Emulator on Windows:
- Android Studio
- Visual Studio
Shared Requirements
There are a few things that need to be set up any way you run the Emulator.
- Install Android Studio
- Set up Android SDK Settings:
Tools > Android SDK Manager > SDK Tools
Make sure all these SDK tools are installed.
4. In File Explorer, navigate to the Emulator run.bat file. The default path is :
users/[USER]/SurfaceDuoEmulator/artifacts/run.bat
Open this file in any text editor and make sure the ANDROID_SDK_LOCATION is set to the location of your Android SDK. You can find your Android SDK Location here:
For example, this is what the ANDROID_SDK_LOCATION path looks like for the above path:
set ANDROID_SDK_LOCATION=%LOCALAPPDATA%\Android\android-sdk
Great! Now we can start on the platform specific setup.
Android Studio
If everything above is properly configured, you can now run the emulator from the command line.
cd into the directory and run the run.bat
script.
The emulator should start running!
Note: It can take a while the first time
Visual Studio
To run the emulator using visual studio, we have a few more steps.
-
1 . Open either an existing or new project with an Android head (including Uno, Xamarin, etc.) in Visual Studio 2019.
I will be using a new Uno project.
2. Set up your Android SDK settings
Tools > Android > Android SDK Manager
Make sure you have these tools installed:
3. In order to run our app, the emulator will need to be running. Search for Duo Emulator in windows and select “Duo Emulator for Visual Studio”
4 . Select “Open”
This will run a different run.bat
script. The difference only being that the visual studio version removes the port definitions.
5. Back in Visual Studio, you should now see the emulator as an option in your devices dropdown. It will look like this:
6. Click the big green arrow and your app will pop up in the emulator!
There you have it! Two ways to run the Surface Duo Emulator on Windows. To learn more about developing for Dual Screen Devices, check out the docs.
1 thought on “2 Ways to Run Surface Duo Emulator”