How can I run emulator without GUI (headless Android)?
My requirement is to run the headless Android on the emulator. Is it correct if I use ro.config.headless 1
? Or disable zygote?
Appium has the ability to start Android emulators and iOS simulators in a "headless" mode. This means that the devices won't have any graphical user interface; you won't see them on your desktop, but they will still be running silently, testing your app. Actually, the devices won't run silently.
Assuming you have installed Android studio properly,Open a command prompt and type emulator -list-avds which will display all the devices and then type emulator @avd_name where avd_name is the the name of your emulator installed.
Starting the emulator Use the emulator command to start the emulator, as an alternative to running your project or starting it through the AVD Manager. Here's the basic command-line syntax for starting a virtual device from a terminal prompt: emulator -avd avd_name [ {- option [ value ]} … ]
Android Emulator allows you to run emulations of Android devices on Windows, macOS or Linux machines. The Android Emulator runs the Android operating system in a virtual machine called an Android Virtual Device (AVD). The AVD contains the full Android software stack, and it runs as if it were on a physical device.
Android Emulator 28.1.8 now supports running the emulator in headless mode (emulator-headless
): https://androidstudio.googleblog.com/2019/02/emulator-2818-canary.html
As of 29.2.11
, you need to use the -no-window
option instead of the emulator-headless
binary:
The binary
emulator-headless
is now retired. Headless builds of the engine are now launched viaemulator -no-window
, thus unifying the previously separate (but similar) paths.
https://androidstudio.googleblog.com/2019/12/emulator-29211-and-amd-hypervisor-12-to.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With