Blog post. We've made several changes to the emulator that are quality-oriented.

The major area of effort was dedicated to reducing resource usage of the emulator, especially CPU usage at idle.

We've also introduced quality-of-life changes that make it easier to work with the emulator in a wider variety of environments.

At the same time, we've continued to address general emulator quality issues.

The major Marble-related changes follow.

Host audio is now blocked from being passed to the emulator. To pass through host audio data, there is now a toggle in the UI: Extended Controls > Microphone > "Virtual microphone uses host audio input". More details

We also provide a command line and console command for toggling:

-allow-host-audio : Microphone activated on startup

: Microphone activated on startup adb emu avd hostmicon , adb emu avd hostmicoff : Control whether host audio input is used.

Upgraded Qt UI libraries to 5.12 LTS.

Worked around crash in Qt's libpng decoding when starting certain system images; we now use our own copy of libpng to decode PNG images.

To address issues with some Linux installs containing incompatible versions of some Qt dependent libraries, we now package libfreetype , libsoftokn , libsqlite3, and libxkbcommon with the emulator.

, , with the emulator. We no longer use Qt libraries to get the monitor dimensions as it is unreliable. Instead, we use the platform's native windowing libraries to do so.

To address CPU usage, we now run the following ADB commands on a cold boot when det ecting boot complete:

adb shell settings put screen_off_timeout 214783647

adb shell pm revoke com.google.android.googlequicksearchbox android.permission.RECORD_AUDIO

More details

This is not applied to system images with API level < 26 as there is not a reliable boot complete signal communicated back to the host for those system images.

Added feature to immediately pause all vCPUs on the emulator via the following console commands:

adb emu avd pause

adb emu avd resume

Greatly reduced overhead of OpenGL drawing, which will help CPU usage when the emulator is playing animations.

Fixed twitching, incorrect frame display on Intel GPUs when running Q system images.

Fixed black screen when using Q system images with Pixel 2 XL skins, or any skin that had a notch or rounded corners.

Fixed issue where -partition-size command line option would not set the data partition size.

Restored support for mainline QEMU's e1000 virtual network device. This can be useful for using the emulator in a bridged network setup where one wants to seamlessly show the emulator on the host network, and vice versa with the host network on the emulator.

The QEMU 2.12-appropriate BIOS binaries are now used to start up the emulator.

Upgraded ffmpeg version to 3.4.5 for video encoding/decoding.

Fixed issue where pulseaudio on the Linx emulator would spin and take up an entire CPU core in some situations.

Greatly reduced overhead of QEMU main loop I/O on macOS via replacing the select() -based main loop with a kqueue- based main loop.

Logcat buffer size increased to 2M to address issues with flaky unexpected EOF when running logcat with the emulator.

Added a headless build of the emulator ( more details here ) which can run in a minimal-dependency environment without the UI. At the same time, we minimized the Linux system library dependency footprint of the headless build ( more details ). This can facilitate setup of the emulator in Docker or other CI environments.

Although the emulator binary with the -no-window flag is still available, the headless build is meant to supersede -no-window .

The headless build does not link pulseaudio nor X11. The system dependent shared libraries are the following minimal set:

linux-vdso.so.1

libutil.so.1

libm.so.6

libdl.so.2

librt.so.1

libpthread.so.0

libgcc_s.so.1

libc.so.6

ld-linux-x86-64.so.2

We now export the environment variable LC_ALL=C by default. This addresses crash and incompatibility issues associated from running the emulator in different locales.

We've added a way to track emulator CPU and RAM usage in Extended Controls > Settings > Advanced > Performance Stats. This provides a quick way to diagnose if the emulator seems to be using too much CPU or RAM.

Added performance monitoring environment variables SHOW_PERF_STATS=1 and ANDROID_EMU_TRACING=1 More details

Fixed out of bounds memory access when processing compressed textures.

Fixed GL error on host in glTexSubImage2D when updating certain gralloc buffers (with format RGB 565, RGB10A2, RGB(A)16F).

glReadPixels GL_IMPLEMENTATION_COLOR_READ_TYPE will now use the host GPU's result instead of an emulated one, which can fix issues with images/assets not showing up because of improper format for readback.

Added support for the OpenGL ES extensions GL_EXT_texture_format_BGRA8888 and GL_APPLE_texture_format_BGRA8888 if supported on the host.

Fixed display issue in Q system images with snapshots where the notification shade's geometry was rendered with an improper instance divisor setting.

Added more diagnostic info to the Bugreport UI and made emulator bugreports available from the console via

telnet localhost 5554

avd bugreport

Fixed a few hard-to-reproduce crash and freeze issues on launch that happened due to Qt losing signals or having flaky inconsistent states on startup.

Fixed many concurrency issues. We are now able to build the Linux emulator with ThreadSanitizer (TSAN), which can easily uncover flaky or "unreproducible" bugs.

On Android Q system images, we now bump the minimum RAM size to 2 GB.

We now add more logging and printing whenever OpenGL or hypervisor initialization fails.

Linux: We have found that on certain host kernels, the guest Android kernel can error out and exit in KVM with a "hardware error." We now abort() the emulator when this happens in order to increase debuggability (previously, it just hung).

Linux: For convenience with CI setups, added command line option -stdouterr-file <file-name> to redirect both stdout and stderr to a file.

To improve reliability of multiple emulator instances, if launching multiple instances of the emulator with -read-only , sometimes the previous writable emulator instance is not yet done cleaning up stale files. The emulator now retries to launch multiple instances 3 times over 3 seconds in that case.

On some remote desktop setups, it was possible to get a black screen when launching the emulator on Linux. We now explicitly configure MESA_RGB_VISUAL to avoid this. Details

Fixed incorrect usage of SO_REUSEADDR . Details

Fixed a long-standing issue with the Windows emulator where sub-processes (such as adb commands) failed to start if the username had spaces in it.

Fixed missing initialization of RCU in HAXM vCPU threads. This can possibly address some crashes and race conditions.

Fixed crash that happened in certain patterns of saving and loading snapshots from the snapshots UI in recent Q system images.

Fixed issue where virtual scene camera was blank because emulated device state would be initialized improperly from snapshot if an AR macro was playing while that snapshot was saved.

For upcoming system images, the emulator now supports Hardware Composer 2.0. This should result in lower driver overhead when running most animations.

The emulator build is now based on CMake/Ninja.

In the emulator extended controls UI, divider lines in the keyboard shortcuts table have been restored.

Fixed issue where rotate buttons would appear on TV AVDs. https://issuetracker.google.com/127956599

Fixed issue where if emulator was set always on top, the extended controls window would mysteriously appear every time the emulator was rotated. https://issuetracker.google.com/128455869

Metrics: We now send CPU/RAM usage metrics in a 10 second interval for opt-in users. This gives us a clearer picture of what are the real emulator resource usages in actual application.