Wednesday, May 13, 2020

Emulator 30.0.12 Stable, PSA: If emulator not starting on Windows, look for and uninstall Riot Vanguard

Emulator 30.0.12 is now available in all channels. Changes versus previous stable version, 30.0.5:

Embedded emulator

The emulator can now run embedded inside Android Studio. This requires Android Studio 4.1 Canary 8 or later, and needs to be enabled manually via Android Studio's Preferences > Tools > Emulator.

We are excited to introduce this and hope this feature makes the emulator easier to use in the typical developer workflow! If you experience issues, please file feedback in https://issuetracker.google.com/issues?q=componentid:192727.

Some known issues that we will address are:
  • Many Extended Controls UI components are not available
  • Frame rate is lower
  • Emulator image is more aliased
  • Some device form factors are not compatible with the embedded view
Support for host-side video decode (requires future Android R system image)

To save CPU usage and enable playback of higher resolutions and frame rates up to 4k60, the emulator now supports host-side video decode of H264 and VPx through a variety of host-side backends. This requires a future Android R system image release.
  • Windows/Linux: ffmpeg, vpx, NVIDIA CUVID
    • Linux w/ NVIDIA: requires libnvcuvid1, via sudo apt-get install -y libnvcuvid1
  • macOS: ffmpeg, vpx, VideoToolbox
The backend is auto-selected. VideoToolbox and NVIDIA CUVID will take advantage of decode hardware if available, while ffmpeg is the fallback if anything goes wrong or a format not supported.

Enhanced Car AVD Support

We've added experimental car data replay feature for when running Android Auto Embedded system images to the car data page in the extended controls. The feature is flagged off and is called CarVhalReplay. To enable:
  • Launch the emulator from command line with -feature CarVhalReplay
  • Or, add "CarVhalReplay = on" to ~/.android/advancedFeatures.iniMore details
Also, fixed issue in Car AVDs where in the HAL property page, LEFT_FRONT was incorrectly labeled as "Front right".

OpenGL ES
  • GLES translator libraries have been changed to be linked statically. This should very slightly improve binary size and startup time, while having fewer ways to link the wrong GLES libraries.
  • Removed libGLES12Translator as we use an internal GLES1 translator in all cases now for GLES1.
  • eglChooseConfig called with null attrib_list argument now more liberally returns the first config found rather than bailing out.
  • Fixed graphics error when orphaning EGL images in the guest via glTexImage2D.
  • Fixed issue where glTexStorage2D did not work with ASTC compressed texture formats (Requires corresponding change in system image (Android R DP3+))
Vulkan
  • Addressed a possible race condition with some versions of Vulkan loaders when creating many VkDevices/VkInstances in parallel.
  • Fixed a possible crash on guest process cleanup.
  • Worked around issue that occurs on Windows NVIDIA GPUs when creating/destroying VkPipelineLayouts in multiple threads.
  • Fixed issue where Vulkan external semaphore type OPAQUE_FD (from the guest) was not working on Windows hosts.

Other changes versus previous stable version, 30.0.5
  • Removed "Screenshot failed to find cb 0" messages.
  • Fixed possible memory corruption on Linux / macOS due to a path that used select() and did not check FD_SETSIZE limit.
  • On Linux, instructions to enable KVM if permission is denied should print more visibly now.
  • Fixed possible issue in Linux embedded emulator where the advertisement file might have been written to the wrong location.
  • Windows: Fixed a hang on AMD machines with AMD Hypervisor. This will require downloading and installing the latest Android Emulator Hypervisor for AMD Processors (v 1.5).
  • Removed prints about certs and GRPC on startup.
  • Fixed hang on starting Windows emulator that happened right after the boot animation.
  • Added support for vendor boot images (emulator side).
  • Upgraded protobuf version to 3.11.4.
  • Fixed kernel version parsing issue when running aarch64 guest kernels.
  • Metrics are now tracked for extended window usage.
  • macOS
    • macOS emulator no longer disables App Nap. If also run with -no-audio, the emulator should now stop from preventing sleep on macOS.
    • Relaxed logical core requirement to 6 from 8 on macOS so more users can run images with multiple vCPUs.
  • We now detect 3rd party graphics driver hooks that have been observed in crash reports, and alert the user if any were involved in the crashing stack trace.
PSA: If emulator not starting on Windows, look for and uninstall Riot Vanguard
Users on Reddit pointed out interference between Riot Vanguard and the emulator, leading to a possible failure to start the emulator:

https://www.reddit.com/r/androiddev/comments/gdr6pj/android_studio_emulator_killed_by_riot_vanguard/


We recommend uninstalling Vanguard.

Open a command prompt with admin privileges:

sc delete vgc
sc delete vgk


Reboot your machine, then uninstall Vanguard normally for good measure.