I've been struggling with trying to launch android emulator but no success yet. I've updated the graphic card driver and done every possible solution out there but to no avail. For some reason with the new update there is something wrong needs to be fixed.
Here is the screen of the errors
This looks like the renderer failed to initialize. The solution currently is to try another renderer. Can you also try from command line with -gpu host, -gpu angle_indirect and -gpu swiftshader_indirect?
I got this error using Android emulator version 30.2.5.0 (build_id 6953278) (CL:N/A) on Debian 9
when running Api 28 x86 in headless mode (kvm enabled) with emulator #a9 -wipe-data -no-window -no-audio -verbose -no-boot-anim -gpu off
installing libgl1-mesa-dev from here
apt install libgl1-mesa-dev
Related
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:
Windows 10
Java 8
Android Studio: 4.0
Android SDK Manager: 26.1.1
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.
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
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
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.
I have a problem when I study Android kernel Stack-buffer-overflow vulnerability.
Firstly, I create a AVD named "kernel_challenges"
and then, run it using command
"emulator64-arm -show-kernel -kernel arch/arm/boot/zImage -avd kernel_challenges -no-boot-anim -no-skin -no-audio -no-window -qemu -monitor unix:/tmp/qemuSocket,server,nowait -s"
It work well, then I panic it
Panic
Then, I resart the emulator, but it can't start anymore
The emulator can't restart
After restart the Linux, the emulator can start.
How to solve it?
I have solved the problem, when the emulator panic, we should input q in the gdb debug terminal instead of closing emulator forcely
I'm trying to run android emulator on terminal I have downloaded android sdk on VM ubuntu server (Thus I dont have graphic desktop, only terminal console).
I want to run emulator on terminal as a service that I can use for install App and run some tests(battery consumption, install, others).
I want to create some AVD and run test scripts on it.
But, I cant launch emulator without graphic desktop. Is it possible?
I find that it's possible start Android Emulator without graphic with this command:
$emulator -avd <avd_name> -no-window
Also you can add other commands to clean data on emulator
$emulator -avd <avd_name> -no-window -wipe-data
I am running my simplest Activity App in Emulator which I created in IntelliJ. I invoked Emulator from the IDEA IDE, it does show emulator in locked screen format. After unlocking I don't find icon of my application. Where am I doing wrong? or how can I run it manually on Emulator?
Emulator shows following message on Console:
Waiting for device.
/usr/local/Cellar/android-sdk/22.6/tools/emulator -avd myavd -netspeed full -netdelay none -wipe-data
emulator: ERROR: Could not load OpenGLES emulation library: dlopen(lib64OpenglRender.dylib, 1): image not found
emulator: WARNING: Could not initialize OpenglES emulation, using software renderer.
HAX is working and emulator runs in fast virt mode
Device connected: emulator-5554
Emulator Snapshot attached. As you see. I don't find my app here
If you are using windows:
Go to cmd, cd into the folder containing the platform-tools.
Then -> adb install myapp.apk . This command installs the app.
If you are using GenyMotion emulator. Just grag and drop your apk into the emulator.
If the emulator is not in sync with the ADB,which is responsible for the connection. Just restart the ADB like:
adb kill-server
adb start-server
Can I run android app in headless emulator. I tried with am command but it showed NullPointer Exception. I think as it is a gui application I can't. Is there any way around? The emulator is so slow. It takes like 5-7 mins sometimes. I'm running gingerbread by the way.
Environment: I'm running from qemu source code. From android image and kernel image. The arguments to qemu emulator are something like this:
-sysdir ../../android-image -kernel ../../android-kernel/zImage -no-window -qemu -monitor stdio
From ${android-sdk}/tools run this command:
emulator -avd NAME_OF_EMULATOR -no-skin -no-audio -no-window
In this blog it is nicely explained: http://paulemtz.blogspot.cz/2013/05/android-testing-in-headless-emulator.html