Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Run Android emulator without GUI (headless Android)

Tags:

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?

like image 604
Android0077 Avatar asked Jan 01 '14 13:01

Android0077


People also ask

What is a headless emulator?

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.

Can we open Android emulator without opening Android Studio?

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.

How do I run an emulator from command prompt?

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 ]} … ]

Can you run android emulator on virtual machine?

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.


2 Answers

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

like image 125
marius bardan Avatar answered Sep 21 '22 16:09

marius bardan


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 via emulator -no-window, thus unifying the previously separate (but similar) paths.

https://androidstudio.googleblog.com/2019/12/emulator-29211-and-amd-hypervisor-12-to.html

like image 23
Heath Borders Avatar answered Sep 21 '22 16:09

Heath Borders