Category: Android Emulator

Android Emulator – AMD Processor & Hyper-V Support

Android Developers July 9, 2018 AMD, Android, Android Emulator, Android Studio, HyperV

Posted by Jamal Eason, Product Manager, Android

Since the major revamp of the Android Emulator two years ago, we have focused on delivering a fast and feature-rich emulator to help you build great app experiences for users. Today, the Android Emulator is the top device deployed to from Android Studio — more than 2x over physical Android devices. We are humbled to hear from many of you that the Android Emulator has come a long way, but we are not done yet.

Making the Android Emulator faster is one of the top priorities for the Android Studio team. Over the last few releases, we have launched quick boot & emulator snapshots for quickly starting and resuming emulator sessions in under 2 seconds. Up until now, our emulator experience has almost universally worked on macOS® and Linux computers. But for users of Microsoft® Windows® or the Microsoft® Hyper-V platform, our hardware accelerated speed enhancements for the Android Emulator only worked with computers with Intel® processors. Support for AMD® processors and Microsoft Hyper-V hypervisor are two long-standing user requests from the Android developer community that we are happy to address with this Android Emulator update.

Today, you can download the latest Android Emulator release, which is enabled to run x86 based Android Virtual Devices (AVD) on computers that use AMD processors. This exciting update makes the Android Emulator more accessible to a new set of Android app developers that were previously limited to software emulation, but can now have hardware accelerated performance. Moreover, for those of you who use Hyper-V to run your local app backend, the Android Emulator can now also coexist with other Hyper-V-backed applications on Windows® 10.

Thanks to a new Microsoft Windows Hypervisor Platform (WHPX) API and recent open-source contributions from Microsoft, even more Android app developers can take advantage of all the speed improvements and features in the Android Emulator.

Android Emulator running on Windows 10 with AMD Processor
Screenshot Configuration: Asus ROG Strix GL 702ZC, Processor: AMD® Ryzen 7 1700 Processor, Chipset: AMD 5350, Graphics: AMD® Radeon RX580

Support for these technologies was initially available in the v27.3.8 Android Emulator canary release and today we are releasing this set of preview features (AMD processor & Hyper-V support) on the stable channel for more feedback. Alongside this update, we have added additional speed improvements in loading emulator snapshots for those developers using the Intel® Hardware Accelerated Execution Manager (HAXM).

How to use

Linux

If you use Linux for Android app development, the Android Emulator will continue to use the native Kernel-based Virtual Machine (KVM) hypervisor for both Intel and AMD based computers for a fast and performant virtualization solution. An update to the v27.3.8 Android Emulator will offer you the new snapshots UI along with improvements to performance, reliability and resource usage.

macOS

For OS X v10.10 Yosemite and higher, the Android Emulator uses the built-in Hypervisor.Framework by default, and falls back to using the Intel Hardware Accelerated Execution Manager (HAXM) if Hypervisor.Framework fails to initialize (such as when running on OS X v10.9 or earlier). Once you update to the latest Android Emulator on macOS, you will also have access to the new snapshots UI along with under the hood performance and reliability improvements.

Android Emulator – Snapshots Extended Controls

Microsoft Windows

On Intel x86-based computers, the Android Emulator will continue to use Intel HAXM by default. Intel HAXM is a mature and open-sourced hypervisor solution developed by Intel. Thanks to on-going development by Intel, the fastest emulator performance on Windows is still with Intel HAXM. To download the latest Intel HAXM v7.2.0, check for updates in the Android SDK Manager.

If you have an AMD processor in your computer you need the following setup requirements to be in place:

  • AMD Processor – Recommended: AMD® Ryzen processors
  • Android Studio 3.2 Beta or higher – download via Android Studio Preview page
  • Android Emulator v27.3.8+ – download via Android Studio SDK Manager
  • x86 Android Virtual Device (AVD) – Create AVD
  • Windows 10 with April 2018 Update
  • Enable via Windows Features: “Windows Hypervisor Platform”

Windows Hypervisor Platform setting in Windows 10

If you want to use Hyper-V at the same time as the Android Emulator on your Intel processor-based computer, you will also need the same Android Studio and Android Emulator versions as listed above, but with the additional requirements:

  • Enable via Windows Features: “Hyper-V” – Only available for Windows 10 Professional/Education/Enterprise
  • Intel Processor : Intel® Core processor that supports Virtualization Technology (VT-x), Extended Page Tables (EPT), and Unrestricted Guest (UG) features. Additionally VT-x needs to be enabled in the BIOS.

For more setup tips and troubleshooting details, check out the documentation page.

Again, for existing Windows users who have an Intel-based processor, the Android Emulator will continue to use the faster and recommended Intel HAXM configuration. For those using AMD processors, and those who use Hyper-V hypervisors, this should be an exciting step forward to start using the Android Emulator.

Next Steps & Feedback

Download the latest Android Emulator from the Android Studio 3.2 Beta SDK Manager for the latest performance updates across all supported platforms that you are using. We are going to continue to invest in performance improvements for each of the platforms and we look forward to your feedback and feature requests.

If you find a bug or issue, feel free to file an issue. Connect with us — the Android Studio development team ‐ on our Google+ page or on Twitter.

Quick Boot & the Top Features in the Android Emulator

Android Developers December 18, 2017 Android, Android Emulator, Android Studio

Posted by Jamal Eason, Product Manager, Android

Today, we are excited to announce Quick Boot for the Android Emulator. With
Quick Boot, you can launch the Android Emulator in under 6 seconds. Quick Boot
works by snapshotting an emulator session so you can reload in seconds. Quick
Boot was first released with Android Studio 3.0 in the canary update channel and
we are excited to release the feature as a stable update today.

In addition to this new feature, we also wanted to highlight some of the top
features from recent releases. Since the complete revamp of the Android Emulator
two
years ago
, we continue to focus on improving speed, stability and adding a
rich set of features that accelerate your app development and testing. With all
the recent changes, it is definitely worth updating to the latest version of the
Android Emulator to use it today.

Top 5 Features

  • Quick Boot – Released as a stable feature today, Quick Boot
    allows you to resume your Android Emulator session in under 6 seconds. The first
    time you start an Android Virtual Device (AVD) with the Android Emulator, it
    must perform a cold boot (just like powering on a device), but subsequent starts
    are fast and the system is restored to the state at which you closed the
    emulator last (similar to waking a device). We accomplished this by completely
    re-engineering the legacy emulator snapshot architecture to work with virtual
    sensors and GPU acceleration. No additional setup is required because Quick Boot
    is enabled by default starting with Android Emulator v27.0.2.

Quick Boot in the Android Emulator

  • Android CTS Compatibility With each
    release of the Android SDK, we ensure that the Android Emulator is ready for
    your app development needs, from testing backwards compatibility with Android
    KitKat to integrating the latest APIs of the developer preview. To increase
    product quality and reliability of emulator system images, we now qualify final
    Android System Image builds from Android Nougat (API 24) and higher against the
    Android Compatibility Test
    Suite
    (CTS)—the same testing suite that official Android physical devices
    must pass.
  • Google Play Support We know that many
    app developers use Google Play Services, and it can be difficult to keep the
    service up to date in the Android Emulator system images. To solve this problem,
    we now offer versions of Android System Images that include the Play Store app.
    The Google Play images are available starting with Android Nougat (API 24). With
    these new emulator images, you can update Google Play Services via the Play
    Store app in your emulator just as you would on a physical Android device. Plus,
    you can now test end-to-end install, update, and purchase flows with the Google
    Play Store.
  • Performance Improvements Making the
    emulator fast and performant is an on-going goal for our team. We continuously
    look at the performance impact of running the emulator on your development
    machine, especially RAM usage. With the latest versions of the Android Emulator,
    we now allocate RAM on demand, instead of allocating and pinning the memory to
    the max RAM size defined in your AVD. We do this by tapping into the native
    hypervisors for Linux (KVM) and macOS® (Hypervisor.Framework), and an
    enhanced Intel® HAXM (v6.2.1 and higher) for Microsoft®
    Windows®, which uses the new on-demand memory allocation.
  • Additionally, over the last several releases, we have improved CPU and I/O
    performance while enhancing GPU performance, including OpenGL ES 3.0 support.
    Looking at a common task such as ADB push highlights the improvements in the
    Android CPU and I/O pipelines:

    ADB Push Speed Comparison with Android Emulator

    For GPU performance, we created a sample GPU emulation stress
    test app
    to gauge improvements over time. We found that the latest emulator
    can render higher frame rates than before, and it is one of the few emulators
    that can render OpenGL ES 3.0 accurately per the Android specification.

GPU Emulation Stress Test – Android App

GPU Emulation Stress Test with Android Emulator

More Features

In addition to these major features, there are a whole host of additional
features that we have added to the Android Emulator over the last year that you
may not be aware of:

  • Wi-Fi support – Starting with API 24 system images, you can
    create an AVD that both connects to a virtual cellular network and a virtual
    Wi-Fi Access Point.
  • Google Cast support – When using a Google Play system
    image, you can cast screen and audio content to Chromecast devices on the same
    Wi-Fi network.
  • Drag and drop APKs & files – Simply drag an APK onto the
    Android Emulator window to trigger an app install. Also you can drag any other
    data file and find it in the /Downloads folder in your Android Virtual Device.
  • Host copy & paste – You can copy & paste text between the
    Android Emulator and your development machine.
  • Virtual 2-finger pinch & zoom – When interacting with apps
    like Google Maps, hold down the Ctrl Key (on Microsoft®
    Windows® or Linux) or ⌘ (on macOS® ) , and a finger
    overlay appears on screen to aid with pinch & zoom actions.
  • GPS location – Manually select a GPS point or set of GPS
    points under the Location tab of the Android Emulator.
  • Virtual sensors – There is a dedicated page in the extended
    controls panel that has supported sensors in the Android Emulator including
    acceleration, rotation, proximity and many more.
  • WebCam support – You can use a webcam or your laptop
    built-in webcam as a virtual camera in the AVD. Validate your AVD camera
    settings in the Advanced Settings page in the AVD Manager.
  • Host machine keyboard – You can use your real keyboard to
    enter text into the Android Virtual Device.
  • Virtual SMS and phone calls – In the extended controls
    panel, you can trigger a virtual SMS or phone call to test apps with telephony
    dependencies.
  • Screen zooming – On the main toolbar, click on the magnify
    glass icon to enter zoom mode, and then select a region of the screen you want
    to inspect.
  • Window resizing – Simply drag a corner of the Android
    Emulator window to change to the desired size.
  • Network proxy support – Add a custom HTTP proxy for your
    Android Emulator session by going to the Settings page under the Proxy tab.
  • Bug reporting – You can quickly generate a bug report for
    your app by using the Bug Report section in the extended controls panel to share
    with your team or to send feedback to Google.

Learn more about the Android Emulator in the Emulator
documentation
.

Getting Started

All of these features and improvements are available to download and use now
with Android Emulator v27.0.2+, which you can get via the SDK Manager in Android
Studio. For a fast experience, we recommend creating and running the x86 version
of emulator system images, with the latest Android Emulator, Intel® HAXM (if
applicable) and graphics drivers installed.

We appreciate any feedback on things you like, issues or features you would like
to see. If you find a bug, issue, or have a feature request feel free to file
an issue
. We are definitely not done, but we hope you are excited about the
improvements so far.

Page 1 of 1
Scroll Up