19
votes

I'm trying to use emulator.exe as android emulator for Charles Proxy. But I have problem, when I launch

emulator @5.1_WVGA_API_28 

I get this error:

PANIC: Missing emulator engine program for 'x86' CPU.

But I can run the emulator from android studio and it's working fine! I have an intel processor.

4
Are you trying to run emulator from command line? - shizhen
Yes %00%00%00%00%00%00%00%00%00 - Marat Mkhitaryan
Try the answer I provided below. - shizhen
have u got your problem solved? @Cookie - shizhen

4 Answers

55
votes

If you want to run emulator from command line,

<your-full-path>/emulator -avd 5.1_WVGA_API_28 

For newer version of Android SDK, the emulator path should be something as below:

/<xxx>/Android/sdk/emulator/emulator

For older version of Android SDK, the emulator path is as below:

/<xxx>/Android/sdk/tools/emulator

Try either one of above to see which is your case.

Here is the official document for Android emulator command line usage: https://developer.android.com/studio/run/emulator-commandline

4
votes

That was not a path/location problem on my PC.

I have to use x86_64 system images to get the emulator working from the command line...

https://stackoverflow.com/a/56099493/531322

2
votes

I have solved the problem. You must install HAX drivers. You can do it here: https://software.intel.com/en-us/articles/intel-hardware-accelerated-execution-manager-intel-haxm Or just do update of SDK:

C:\Users\%username%\AppData\Local\Android\Sdk\tools\android.bat update sdk

0
votes

@shizen answer worked for me using "...emulator/emulator" but even after changing the path in .zprofile (I use zsh on Mac), it was finding the old emulator. To find out which emulator your system is using, use "which emulator". In my case it was still loading the old one so I deleted the old path (rm -R /usr/local/bin/emulator) and now the correct (new) emulator loads.