How to Boost, Speedup Android Emulator
The ADT 17 comes with lots of new features and bug fixes. Among our favorite features is the speed boost for the Android Emulator. Thanks to the AOSP & Intel, the android emulator now translates x86 instructions to ARM way more efficiently. To summarize two new improvements have been achieved to boost the performance of the Emulator:
- GPU Accelerated UI for Emulator
- x86 optimizations and speed Boost (plus OpenGL)
1. GPU Accelerated UI for Emulator
This is in an experimental stage, but it should enable basic Open ES 2.0 graphics possible on Emulator, along with GPU UI rendering, to speedup the OS.
In order to make the Android emulator run faster and be more responsive, you can configure it to take advantage of hardware acceleration, using a combination of configuration options, specific. You need:
- Android SDK Tools, Revision 17 or higher
- Android SDK Platform API 15, Revision 3 or higher
Use the Android SDK Manager to install these components:
Note: Not all applications are compatible with graphics hardware acceleration. In particular, the Browser application and applications using the
WebView component are not compatible with graphics acceleration.
To configure a new AVD to use graphics acceleration:
- From AVD Manager create a new AVD with the Target value of Android 4.0.3 (API Level 15), revision 3 or higher.
- If you want to have graphics acceleration enabled by default for this AVD, in the Hardware section, click New, select GPU emulation and set the value to Yes.
- Name the AVD instance and select any other configuration options.Caution: Do not select the Snapshot: Enabled option. Snapshots are not supported for emulators with graphics acceleration enabled.
- Click Create AVD to save the emulator configuration.
Alternatively, you can enable it at Runtime:
emulator -avd <avd_name> -gpu on
In Eclipse, click your Android project folder and then select Run > Run Configurations > dialog, select your Android project run configuration or create a new configuration. Click Target tab. Select the AVD you created in the previous procedure. In the Additional Emulator Command Line Options field, enter: “-gpu on”. That’s it, Run your Android project using this run configuration.
2. x86 optimizations and speed Boost
Many modern CPUs provide extensions for running virtual machines (VMs) more efficiently. Taking advantage of these extensions with the Android emulator requires some additional configuration of your development system, but can significantly improve the execution speed.
Once you have determined that your CPU supports virtualization extensions, make sure you can work within these additional requirements of running an emulator inside an accelerated virtual machine, more details at the official development page.