Skip to content

Instantly share code, notes, and snippets.

@barron9
Created February 2, 2019 18:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save barron9/98cdbdddf6bba995ef0f85f46e5edda8 to your computer and use it in GitHub Desktop.
Save barron9/98cdbdddf6bba995ef0f85f46e5edda8 to your computer and use it in GitHub Desktop.
hyper v support for google android emulator
https://blogs.msdn.microsoft.com/visualstudio/2018/05/08/hyper-v-android-emulator-support/
Hyper-V Android emulator support
★★★★★★★★★★★★★★★
May 8, 2018 by Visual Studio Blog // 88 Comments
0
0
Today, at Build 2018, we announced a preview of the Google Android emulator that’s compatible with Hyper-V, available on the Windows 10 April 2018 Update. This enables developers with Hyper-V enabled on their machines to use a hardware accelerated Android emulator, without needing to switch to Intel’s HAXM hypervisor. Amazing work was done by the Windows Hyper-V team, with help from the Xamarin team, to make to this happen.
Today’s preview means you can use Google’s Android emulator side-by-side with other Hyper-V based technologies, including Hyper-V VMs, Docker tooling, the HoloLens emulator, and more. This means that any Android developer on Windows, who also uses Hyper-V, can use a fast Android emulator that will always support the latest Android APIs, works with Google Play Services out of the box, and works with all features in the Android emulator, including camera, geolocation, and Quick Boot.
Try the preview
The Windows Hypervisor Platform was introduced in the Windows 10 April 2018 Update and enables third-party virtualization stacks to utilize the Windows Hypervisor for hardware acceleration. If you are using Hyper-V, this stack replaces Intel HAXM as the hypervisor for the Android emulator.
Support for using the Windows Hypervisor as an accelerator for the Android emulator is currently in preview and requires the Windows 10 April 2018 Update. Here are the steps to get it installed.
1. Enable Hyper-V and the Windows Hypervisor Platform
Open Turn Windows features on or off and select Hyper-V and the Windows Hypervisor Platform checkboxes. For these features to take effect, you will need to restart your machine.
2. Install the Visual Studio Tools for Xamarin preview
To enable IDE support for the Android emulator, such as debugging, you must install an updated preview of the Visual Studio Tools for Xamarin. First, ensure you have Visual Studio 2017 version 15.8 Preview 1 or higher with the Mobile development with .NET (Xamarin) workload installed.
Download and open the preview installer. Click Install.
3. Update to Android Emulator 27.2.7 or above
In Visual Studio, select Tools > Options > Android > Android SDK Manager. Click the Tools tab, select the Android Emulator component, and select Apply Changes.
Please note: More recent versions of the emulator (27.2.8, 27.3.0, or later), require an emulator flag while the feature is in the preview. To do this, create or edit the file C:\Users\<your-username>\.android\advancedFeatures.ini and add the line “WindowsHypervisorPlatform = on”, or start the emulator from the command line with “-feature WindowsHypervisorPlatform”.
4. Start debugging!
Now when you debug your Android apps, you can use the latest Android SDKs in a fast emulator, right from Visual Studio alongside Hyper-V based technologies like Docker.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment