1

I am running latest version of Mac OS and I want to run android emulator through command line tool. I have run the following command on Mac terminal and got the following error.

 $ emulator -list-avds
Pixel_XL_API_28

 $ emulator -avd Pixel_XL_API_28
PANIC: Missing emulator engine program for 'x86' CPU.

I also run the command with available options like below that is also available on official documentation developer.android.com

$ /Users/janedoe/Library/Android/sdk/emulator/emulator -avd Pixel_XL_API_28 -netdelay none -netspeed full

What I need to do, so that I don't need to open android studios every time for only opening simulator.

Ravi Raja Jangid
  • 795
  • 9
  • 16

2 Answers2

5

Please follow the steps in your terminal in Mac

 Step 1 ( Add Environment Variable )
 export ANDROID_HOME=/Users/$(whoami)/Library/Android/sdk
 export PATH=$PATH:$ANDROID_HOME/platform-tools
 export PATH=$PATH:$ANDROID_HOME/tools

 Step 2 ( .bash_profile / .bashrc ) 
 Reload you .bash_profile Or .bashrc depending on OS

 Step 3 ( go to emulator directory )
 cd /Users/$(whoami)/Library/Android/sdk/emulator

 Step 4 ( Get all list of Advs  )
 emulator -list-avds

 Step 5 ( Run your Emulator Command Mode )
 emulator -avd Nexus_5_API_22_Android_5.1
Farid Haq
  • 3,728
  • 1
  • 21
  • 15
  • BTW I unable to run the step 2 command but still I able to run the android simulator using command line tool. thanks, @Farid Haq – Ravi Raja Jangid Feb 20 '19 at 10:06
  • While I have follow all step and try to run final step. found error "PANIC: Missing emulator engine program for 'x86' CPU. " – kuldip bhalodiya Nov 04 '19 at 06:08
  • Also ran into PANIC: Missing emulator engine program for 'x86' CPU. I had to specify the path to the kernel - see first answer here: https://stackoverflow.com/questions/51897046/mac-and-panic-missing-emulator-engine-program-for-arm-cpu – Casey L Jun 08 '20 at 00:32
0

Take a look here : Android Emulator Error Message: "PANIC: Missing emulator engine program for 'x86' CPUS."

Then go as follows by cmd :

(the path to your emulators) - C:\Users\user\AppData\Local\Android\Sdk\emulator>

(the emulator name) - emulator.exe @Nexus_5 -dns-server 8.8.8.8 -writable-system

Elio Lako
  • 1,333
  • 2
  • 16
  • 26