viber visual studio

How to run Viber on Visual Studio Emulator for Android


Recently I needed to set up a Viber app for the phone number that is not used on a smartphone. Obviously, Viber could be installed as a desktop app but it still requires an app on a mobile device for the same number. The same is true for WhatsApp and some other messengers.


Let’s consider Windows 10 (build 1803) with installed Hyper-V role. A user needs Viber and WhatsApp applications and could be able to access emulated device. Also, a user is not a mobile developer so it is necessary just emulate mobile phone without digging too deep inside development stuff.

As Android Studio emulator couldn’t be used along with Hyper-V role, Microsoft proposes to use Visual Studio emulator for Android that could be installed as a standalone application. Then required apps will be installed and the emulator will be run by a startup script.



Find and download apk files for required applications:

SDK tools

The emulator has its own device images but requires adb.exe to install applications.

Download and extract Android command line tools to a folder which path doesn’t include spaces, for example, %ProgramData%\Android\sdk. By using sdkmanager  install platform-tools:

"%ProgramData%\Android\sdk\tools\bin\sdkmanager" "platform-tools"

In order to prevent “File transfer failed. Error: Unable to install the file through Adb. Adb.exe not found. Make sure you have Android SDK Tools installed” error until drag-and-drop apk file to emulated device window, you need update Path environment variable with the path to platform tools and merge the following reg file to the registry:

Path variable:




Windows Registry Editor Version 5.00


"Path"="C:\\Program Files\\Android\\Android Studio"

"StartMenuGroup"="Android Studio"





Visual Studio emulator for Android

Download, install and run Visual Studio emulator for Android.

The application provides the list of pre-configured devices. Currently, the latest API version that is used by the proposed devices is API 23, so let’s choose 5.5" Marshmallow (6.0.0) XXHDPI Phone device. Click on the button to download device image, and wait until it is downloaded and installed. Hyper-V manager shows a new virtual machine “VS Emulator 5.5-inch Marshmallow (6.0.0) XXHDPI Phone.admin”. It will be automatically run and stopped by an emulator.

Run the device, and wait until it has been launched.

Drag downloaded apk files to device windows and wait until they have been installed. For this step mentioned above, platform tools are required.
Run Viber and WhatsApp, set your phone number and applications are ready to use.

Auto run

The last step is to start an emulated device when a user logs to a session. It is necessary to find id of the installed device and add command file that runs emulator.

A short note – when the emulator is run from a command line it fails to install a new application. So you need to run Visual Studio emulator for Android, launch emulated device, and then install the required applications.

To run from command line, open the following file %ProgramFiles(x86)%\Microsoft Emulator Manager\1.0\Skus\Android\configurations.xml and search for the name of the installed image (for ex., “5.5” Marshmallow (6.0.0) XXHDPI Phone”):

<configuration id="4C0496D6-53F0-470C-9B20-CF0FD4DF71C4" type="device">
  <settings type="plaintext">
    device.description=Similar to Motorola Moto X Play
    device.vm.vhd=vhd\\5.5_Marshmallow_(6.0.0)_XXHDPI_Phone\\image.vhd" Marshmallow (6.0.0) XXHDPI Phone
  <payload target="settings" type="plaintext"/>

Then copy id from the first line and create start.cmd file:

"%ProgramFiles(x86)%\Microsoft Emulator Manager\1.0\emulatorcmd" launch /sku:Android /id:4C0496D6-53F0-470C-9B20-CF0FD4DF71C4

This file could be added to Startup folder as described in the article. It outputs the following:

C:\>"%ProgramFiles(x86)%\Microsoft Emulator Manager\1.0\emulatorcmd" launch /sku:Android /id:4C0496D6-53F0-470C-9B20-CF0FD4DF71C4
Validating emulator arguments...
Determining if emulator is already running...
Preparing virtual machine...
Launching emulator...
Emulator launched successfully.



  • Visual Studio emulator for Android works along with Hyper-V virtual machines;
  • Could be launched from a command line;
  • Provide GUI and allows interaction with a user.


  • A limited set of environments.


1. All used IP-addresses, names of servers, workstations, domains, are fictional and are used exclusively as a demonstration only.
2. Information is provided «AS IS».

Illya Reznykov - Svitla Systems
by Illya Reznykov
CTO and Senior Cloud Architect
A seasoned and certified Cloud Architect with over 25 years of experience, Illya has a proven track record of transforming legacy applications through codebase review, refactoring, optimization, migration, and integrating new features. His hands-on experience with CI/CD pipelines, on-premises, and cloud deployments in AWS and Azure and supporting multiple environments further illustrates his versatility as a leader in the cloud domain.

Related articles

Let's discuss your project

We look forward to learning more and consulting you about your product idea or helping you find the right solution for an existing project.

Thank you! We will contact very shortly.

Your message is received. Svitla's sales manager of your region will contact you to discuss how we could be helpful.