Android Developers Blog
The latest Android and Google Play news for app and game developers.
🔍
Platform Android Studio Google Play Jetpack Kotlin Docs News

18 Dezember 2017

Quick Boot & the Top Features in the Android Emulator


Link copied to clipboard
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.