Android Emulator with WHPX (Windows Hypervisor Platform)

@vrqq  May 12, 2019

OS: Windows Server 2019.

WHPX & HAXM (conflicted by each other, can only choose one):
HAXM: Base on VT-x(Intel CPU), If you haven't hyper-V on system, using it to calling VT-x on CPU.
WHPX: Base on Hyper-V, an interface to operator Hyper-V, like /dev/kvm.
The system auto hide the VT-x technology when Hyper-V running. (But we can disable hyper-v on bcdboot temporary.)

AVD Manager: Android Virtual Device Manager. (modify the hardware of a emulator device)
SDK Manager: A entry-point to install SDK / Emulator / Other tools.
(The command prompt tools are on sdk/tools/bin/avdmanager.bat & sdk/tools/bin/sdkmanager.bat)

1. Enable Feature

  • Open Server Manager and install Hyper-V & (and Hypervisor Platform if possible).
  • (For Server2019) Exec Dism /Online /Enable-Feature:HypervisorPlatform in PowerShell.

Windows Server 安装WHPX的方法
How To install WHPX (Windows Hypervisor Platform) in Windows Server 2019
Windows Server 2019在服务器管理器中,添加角色和功能里面没有WHPX,我们需要在PowerShell里面运行
Dism /Online /Enable-Feature:HypervisorPlatform
We cannot install this feature by GUI, so we open the Powershell and run the command above.

2. Install Android Emulator by Android Studio.

  • Download Android Studio (IDE). (Guess: There may have a method to install sdk without Android Studio.)
  • Open Android Studio, click Tools -> SDK Manager to download/Update Android Emulator. (If you can't find it please click help->FindAction and input 'SDK')
  • Open Tools -> AVD Manager to config the Virtual Device, and download Android System Image.

Note: The newer version IDE cancelled the enteypoint of AVDManager, so we can only enter it by AndroidStudio, the other method is using Xamarin Android or use the older version of 'sdk/tools/android.bat'
Note: The default path of SDK is C:\Users\vrqq\AppData\Local\Android\Sdk, we can move it and delete it safety.

3. Run it.

Assume we create a Virtual Device named 'mydev'.

sdk/emulator/emulator.exe -avd mydev -accel auto

已有 5 条评论

  1. This site definitely has all the info I wanted concerning this subject and didn't know who to ask.

  2. It is perfect time to make some plans for the future and it is time
    to be happy. I've read this post and if I could I wish to suggest you few
    interesting things or tips. Maybe you could write next articles referring to this
    article. I want to read even more things about it! dildok3 (https://xvj3gsdfghhfies.link/)

  3. Some truly quality blog posts on this web site, saved to my bookmarks.

  4. Hey very cool website!! Guy .. Excellent .. Superb ..

    I'll bookmark your blog and take the feeds also? I am
    happy to find numerous useful information here in the put up, we want work out extra techniques in this
    regard, thanks for sharing. . . . . .

  5. I am pleased that I observed this web blog, just the right information that I was looking
    for!

添加新评论