2

I am using Android Studio emulator, but it keeps crashing upon opening. I get failed to sync vcpu reg error multiple times in the output and nothing else.

I have tried the solutions to similar questions posted on here to no avail. I tried: reinstalling HAXM, I don't have the docker application, I used BIOS to check that VT-x and VT-d are both enabled. I don't get any logcat from Android Studio.

Attached is picture of the output from running the emulator from cmd

This question is different from apparent duplicates because my emulator worked the day before. I don't have any virtual machines running. The only difference is that my laptop auto updated last night.

TheEngineer
  • 31
  • 1
  • 6
  • Possible duplicate of [How do I fix "Failed to sync vcpu reg" error?](https://stackoverflow.com/questions/17024538/how-do-i-fix-failed-to-sync-vcpu-reg-error) – paulsm4 Oct 25 '19 at 18:01
  • SUGGESTIONS: 1) Try running from inside Android Studio, 2) Try running a simple "hello world" app, If the emulator still won't come up with a minimal "Hello World" in either "Run" or "Debug" from A/S, then 3) Create a new AVD, with minimal features. Please post back what you find. – paulsm4 Oct 25 '19 at 18:07
  • 1) Same issue, 2) same issue, 3) same issue, Emulator: failed to sync vcpu reg – TheEngineer Oct 25 '19 at 18:13
  • I am wondering, could new firewall or antivirus settings be the problem. As I stated above, my laptop just updated and the emulator stopped working. – TheEngineer Oct 25 '19 at 18:42
  • What was "auto-updated"? Windows 10? Any chance you can roll the update back and re-test? Or delete Android Studio/Android SDK and reinstall? And yes, anything is "possible". But my guess is that you made a "Windows Update", and that update contained some "security feature" that broke something the AVD emulator needs... – paulsm4 Oct 25 '19 at 21:51
  • Yes the windows was updated and I checked the details: regular windows and a security update as well. After uninstalling the updates, I get a new error show up: "emulator: ERROR: AdbHostServer.cpp:93: Unable to connect to adb daemon on port: 5037". EDIT: Nevermind, I removed the set partition size and that error went away. – TheEngineer Oct 26 '19 at 03:37
  • Q: Did you resolve the "unable to connect ... on port 5037" error? Q: Are you still getting "Failed to sync vcpu reg", or did you resolve that, too? Please update your post. – paulsm4 Oct 26 '19 at 05:07
  • Yes after taking out partition-size 512 command or when running directly from android studio I only get failed to sync vcpu reg error. – TheEngineer Oct 26 '19 at 21:24
  • Q: Have you tried rolling back the Windows update: https://www.laptopmag.com/articles/roll-back-windows-10-creators-update? Or, alternatively, a) uninstall A/S and the SDK, b) reboot, c) re-install A/S? – paulsm4 Oct 26 '19 at 22:29
  • So I tried to roll back windows but I found out that since my windows updated twice it will not allow me roll back before the first one. Additionally, I uninstalled AS and the SDK and sdk cache, then rebooted and reinstalled AS and the Sdk and HAXM. However, I still get the failed to sync vcpu reg error and nothing else. I open to more suggestions, and have to finish a project so I am running android studio and the emulator on another laptop which runs the emulator fine. – TheEngineer Oct 27 '19 at 19:43
  • If you need to finish your assignment and you've got a laptop that works - cool! More power to you! Final suggestions: 1) Try turning off your A/V and see if that helps (a pure shot in the dark), 2) scour task manager for *ANYTHING* that might be doing "virtualization" of *ANY* kind: Docker, VBox, VMWare, etc etc. and 3) Consider buying a cheap ($20) physical handset for testing. – paulsm4 Oct 28 '19 at 02:17

4 Answers4

10

I solved this problem on my HP laptop by uninstalling HP SureClick.

eje
  • 116
  • 1
  • 4
  • Later down the line, I ran into the same issue and uninstalling sure click worked. Thanks! The other method I tried by paulsm4 was only a temporary fix. – TheEngineer Nov 10 '20 at 00:09
  • Yep, this worked for me too. After two whole days of researching, uninstalling, reinstalling, etc...THIS got the emulator working again. Uninstalled HP SureClick and it worked again. Thanks #eje – d410 Nov 23 '20 at 23:16
  • Are you kidding me? What a logical reason for emulator not working. How could this take you guys so long to figure it out... Thanks a lot for tip. – David Vareka May 07 '21 at 20:24
  • Saved my life. Tried reinstalling android studio multiple times! – Giovanni Jun 09 '21 at 14:47
5

I am using Windows 10 and tried almost everything the internet had to offer to fix this issue (the Virtual Machine in Android Studio loaded but then closed almost immediately)

The fix I found was to enable "Virtual Machine Platform" on Windows features.

Instructions:

  1. Right click on the Windows button and select 'Apps and Features'
  2. Select Programs and Features on the right under related settings
  3. Select the checkbox below

CHECKBOX TO CLICK

You then get prompted to restart - after that, everything worked for me ! ...hope it does for you !

  • have a look here https://stackoverflow.com/questions/17024538/how-do-i-fix-failed-to-sync-vcpu-reg-error – RobM May 25 '21 at 03:01
  • 1
    Worked for me. Was ready to give up. The guide here - https://developer.android.com/studio/run/emulator-acceleration shows to specifcally disable Virtual Machine Platform. Re-enabled it and restarted and my emulator booted up! – drwbns Dec 15 '22 at 20:39
  • Like the above comments, I also banged my head against the wall with this for an entire day. Enabling VMP fixed the issue. – NimbusHex Dec 18 '22 at 05:02
  • Great. This saved a lot of time – Viswanath Kumar Sandu Jan 04 '23 at 18:19
3

I had this same problem and all the solutions here did not appear to fix it. Strangely enough I managed to fix it by turning windows virtual machine platform ON, even though it very specifically says here that this is something that should be turned OFF.

Tom Ryan
  • 397
  • 2
  • 6
  • 26
  • Thanks for the link this provided me with the info I needed to fix this reliably. So it turns out that while turning virtual mahcine platform worked for you, I needed to ensure that all these were also disabled when disabling hyper-v: Virtual Machine Platform, Windows Hypervisor Platform, Windows Sandbox, Core Isolation, Credential Guard. Since those implicitly activate hyper-v which doesn't allow the android emulator to run properly. – TheEngineer Jul 25 '20 at 23:30
  • Emulator booted up for me after re-enabling Virtual Machine Platform! – drwbns Dec 15 '22 at 20:41
0

I tried what paulsm4 said and the emulator works now. I was looking around in my anti virus settings and found something that uses virtualization. I just turned it on rebooted and then back off and rebooted. The emulator runs!

security setting screenshot

TheEngineer
  • 31
  • 1
  • 6