32

I have windows 10 Home and AMD ryzen 5 processor. I'm using android studio 4.0 canary 7 (I also tried the latest stable version with the same error). I'm following the official tutorial to enable the Android Emulator for AMD Processors here..

https://androidstudio.googleblog.com/2019/12/emulator-29211-and-amd-hypervisor-12-to.html

This is relatively new and I created an issue for them but wanted to see if someone might help with this or had this problem before. So everything looks good until the step to install gvm as administrator by going to the directory (Android_Emulator_HyperVisor_Driver) and running silent_install.bat. For some reason it is failing to run the service and I get the following error

[SC] ControlService FAILED 1062:

The service has not been started.

[SC] DeleteService SUCCESS
[SC] StartService FAILED with error 4294967201.

Hypervisor platform is disabled (It should according to this latest tutorial as this is different than how it was last year). Any feedback or suggestions are appreciated.

Rabbid76
  • 202,892
  • 27
  • 131
  • 174
laserany
  • 1,257
  • 1
  • 8
  • 17
  • 6
    I had the same error, it was because Device Guard wasn't correctly disabled, you should follow this tutorial [https://www.youtube.com/watch?v=VIBdY-5zr58](https://www.youtube.com/watch?v=VIBdY-5zr58) After that restart your computer and try again with admin command prompt – lucas Apr 07 '20 at 16:47
  • @Xlucxs This is the real, correct answer. You should edit you previously deleted answer and add more details as it was useful to me. Thanks. – Metafaniel Jun 30 '20 at 20:26

7 Answers7

22

If you tried everything (turning windows features off, enabling svm in bios..etc) and still didn't work, type bcdedit in the command prompt, and press ENTER. If you see an entry for hypervisorlaunchtype set to Auto, Hyper-V is still enabled. You can try setting the launch type to Off by running the command below.

bcdedit /set hypervisorlaunchtype off

That's the only thing that worked for me after trying literally everything.

abdou-tech
  • 687
  • 1
  • 8
  • 16
12

If You are using AMD Ryzen Just go to bios setting check for SVM Mode if it is Disabled then Enable it .. Emulator work perfectly..Below Link show where to enable SVM Mode in Aorus Gigabyte Motherboard BIOS..

https://www.youtube.com/watch?v=46DfLwX5AFQ

also Disable hyper-v in windows feature.. sample below

https://github.com/google/android-emulator-hypervisor-driver-for-amd-processors/wiki/Is-Hyper-V-really-disabled%3F

After this emulator will works like a charm...

ram sankar
  • 121
  • 1
  • 3
  • This is the only solution that worked for me. Thanks mate. Remember when doing a BIOS flash updating, the SVM feature may get disabled again for some stupid reason, which is what happened in my case. – Mana Jun 26 '22 at 13:37
  • Unfortunately, this breaks Docker, because Docker requires VM support. So, one cannot have both Docker (Desktop) and Android Studio on the same (Windows) AMD Ryzen based computer. – Adrian W May 09 '23 at 15:54
7

Go to BIOS setting of your laptop/PC, and enable the SVM setting and save it. This should work. This issue is because Virtualization on the PC is disabled once it is enabled it works. Please let me know if it doesn't work.

NOTE : BIOS - As your PC’s most important startup program, BIOS, or Basic Input/Output System, is the built-in core processor software responsible for booting up your system.

Restart your machine and press the hotkey, your BIOS setting will be opened.

These are some brands hotkey, might be useful.

  • Acer: F2 or DEL

  • ASUS: F2 for all PCs, F2 or DEL for motherboards

  • Dell: F2 or F12

  • HP: ESC or F10

  • Lenovo: F2 or Fn + F2

  • Lenovo (Desktops): F1

  • Lenovo (ThinkPads): Enter + F1.

  • MSI: DEL for motherboards and PCs

  • Microsoft Surface Tablets: Press and hold volume up button.

  • Origin PC: F2

  • Samsung: F2

  • Sony: F1, F2, or F3

  • Toshiba: F2

CHAITANYA
  • 71
  • 1
  • 7
6

If you are using Avast antivirus (or AVG), this can be the cause of this problem.

So things to do to fix this:

  • Activate Virtualization in bios
  • Deactivate Hyper-v and hypervisor platform in "activate/desactivate windows function" & run powershell as admin and run the following command: Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V
  • In Avast Antivirus. In settings click Troubleshoot on the left side of the screen, uncheck the box next to Enable hardware assisted virtualization, then click OK to confirm and restart your computer

I've got the solution from https://github.com/google/android-emulator-hypervisor-driver-for-amd-processors/issues/10#issuecomment-715423881.

riQQ
  • 9,878
  • 7
  • 49
  • 66
Anwar Benhamada
  • 301
  • 3
  • 12
  • 1
    If you are using AVG Free you may also need to disable virtualization. Do this in Settings > Troubleshooting and then uncheck "Activate hardware virtualization". Then restart computer. – AsusT9 Mar 03 '21 at 09:30
2

I found the answer after long time. I had to enable Virtualization on my machine.

Rabbid76
  • 202,892
  • 27
  • 131
  • 174
laserany
  • 1,257
  • 1
  • 8
  • 17
1

I have tried everything that's written here, with no success.

For me an option in BIOS (AMD V(TM), which is actually the same (or maybe almost the same) as SVM or SVM Mode) was ON already. And I didn't try to touch it at all. So I was going to write to support already. And in the process of gathering information for that I have turned that option off in BIOS. And then ON again (with restarts on every step ofc). Then I have discovered, that the folder with silent_install.bat has dissapeared. So I went to Android Studio and discovered that Emulator just works.

So, If you had tried everything, try to just turn off virtualization in BIOS and after restart turn it back On.

Eric Aya
  • 69,473
  • 35
  • 181
  • 253
Ruslan Zhomir
  • 842
  • 9
  • 27
-3

I'm just a hobbyist so I have no idea why this works but if you install NoxPlayer (Android emulator), Android Studio emulator works perfectly.

MMG
  • 3,226
  • 5
  • 16
  • 43