Jonathan Lalou
Jonathan Lalou

Reputation: 344

Android Studio / Windows / `PANIC: Missing emulator engine program for 'x86' CPU.`

Context:

I have an Android virtual device that was created with Android Studio, that I must launch from command line for customization need.

Description:

Launching this command:

C:\Users\jonathan\AppData\Local\Android\Sdk\tools>emulator.exe -avd Pixel_3_API_30 -writable-system

(the -writable-system is because I need override the /etc/host/ file)

I get this error:

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

Environment:

More detail:

Running in verbose:

C:\Users\jonathan\AppData\Local\Android\Sdk\tools>emulator.exe -avd Pixel_3_API_30 -writable-system -verbose
emulator:Android emulator version 26.0.3.0 (build_id 3965150)
emulator:Found AVD name 'Pixel_3_API_30'
emulator:Found AVD target architecture: x86
emulator:argv[0]: 'emulator.exe'; program directory: 'C:\Users\jonathan\AppData\Local\Android\Sdk\tools'
emulator:  Found directory: C:\Users\jonathan\AppData\Local\Android\Sdk\system-images\android-30\google_apis_playstore\x86\

emulator:Probing for C:\Users\jonathan\AppData\Local\Android\Sdk\system-images\android-30\google_apis_playstore\x86\/kernel-ranchu: file missing
emulator:Auto-config: -engine classic (based on configuration)
emulator:  Found directory: C:\Users\jonathan\AppData\Local\Android\Sdk\system-images\android-30\google_apis_playstore\x86\

emulator:try dir C:\Users\jonathan\AppData\Local\Android\Sdk\tools
emulator:Looking for emulator-x86 to emulate 'x86' CPU
emulator:Probing program: C:\Users\jonathan\AppData\Local\Android\Sdk\tools/emulator-x86.exe
PANIC: Missing emulator engine program for 'x86' CPU.

Upvotes: 3

Views: 2180

Answers (3)

user3914794
user3914794

Reputation: 21

Try to open it directly from the sdk\tools directory.

C:\Users\DownStairs>C:\Android\android-sdk\tools\emulator -avd Nexus_5_API_28 -port 5555
PANIC: Missing emulator engine program for 'x86' CPU.

C:\Users\DownStairs>C:\Android\android-sdk\emulator\emulator -avd Nexus_5_API_28 -port 5555
INFO    | Android emulator version 31.1.4.0 (build_id 7920983) (CL:N/A)
INFO    | configAndStartRenderer: setting vsync to 60 hz
INFO    | added library vulkan-1.dll

Upvotes: 2

Mr Cadraus
Mr Cadraus

Reputation: 51

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

I had the same issue on Windows and the mklink was not helpful. What worked is the fact that you possibly calling the emulator from the old depricated path:

C:\Users\jonathan\AppData\Local\Android\Sdk\tools

Instead, call from:

C:\Users\jlalou\AppData\Local\Android\Sdk\emulator>

Call there ti run the Emulator outside of Android Studio:

C:\Users\App\AppData\Local\Android\Sdk\emulator>emulator -avd Pixel_XL_API_30

Upvotes: 5

Jonathan Lalou
Jonathan Lalou

Reputation: 344

Open a prompt in admin mode.

cd C:\Users\jlalou\AppData\Local\Android\Sdk\emulator>
mklink emulator-x86.exe emulator.exe

Then run emulator-x86 instead of emulator, ie return to former console and execute

cd C:\Users\jonathan\AppData\Local\Android\Sdk\tools
emulator-x86.exe -avd Pixel_3_API_30 -writable-system

Warning: the Android image was restored to default: all data and applications were wiped out.

Upvotes: 0

Related Questions