Maximizing Performance on Android Device Emulators - Amazon Mobile App Distribution Blog

Maximizing Performance on Android Device Emulators

Derek Gebhard, Solutions Architect for Amazon, is our guest blogger for this post.

One of the things you will spend time on when building a Kindle Fire app is testing and debugging. Using a Kindle Fire emulator is the recommended way to test and debug your mobile apps if you do not have the device available. This post will cover tips on increasing the performance of the KindleFire emulators, including the newly released KindleFire HD 8.9” emulator, but will also apply to most other Android emulators.

For Ice Cream Sandwich-based Kindle Fire emulators(Android SDK 4.0.3, API level 15) you can enableGPU emulation to significantly improve the performance. One thing to be aware of: GPU emulation is currently an experimental feature in the Android tools suite, and may not work on all host hardware configurations or operating systems. If you experience issues, you may need to disable this functionality.

To enable GPU emulation, launch the Android Virtual Device Manager. This can be done by running “android avd” or clicking the Android Virtual Device Manager icon in Eclipse.

For existing emulators:

  1. Select the emulator for which to enable GPU emulation
  2. Click “Edit…”
  3. Check “Use Host GPU” under the Emulation Options section.
  4. Click “OK” to save your configuration changes.

When creating a newemulator:

  1. Click the “New…”button
  2. Add the Kindle Fire details according to our configurationguide.
  3. Check “Use Host GPU” under the Emulation Optionssection.
  4. Click “OK” to create your emulator.

Image 1:Changing the GPU emulation property

To showcase the effect of GPU emulation property, there are two screenshots below. These GPU measurements were taken on a Windows desktop,using the Kindle Fire HD 7” emulator. This test included starting the emulator,running SDK Tester, and accessing the Kindle Fire settings. As you can see, GPU emulation must be enabled in order for the emulator to leverage the GPU’s dedicated memory. 


Image 2:GPU emulation set to “no”


Image 3:GPU emulation set to “yes”

There are also a few other things that can help when running apps on the Kindle Fire emulators. Below is a list of the other ways we can increase performance and save time:

  • Close any non-essential processes and programs as the emulator uses a large amount of CPU time and memory when emulating the device.
  • Make the SD card as small as possible, as large card sizes increase the start-up time
  • Enable snapshots to save and restore state to a‘Snapshot’ file in each AVD, so you can avoid booting when you start the emulator.  Note: This feature is alpha-quality feature so the emulator window will freeze while its saving the state after you close the emulator. Also, GPU emulation and Snapshot cannot be used together.
  • Lower the screen size if your app does not depend upon screen size.
  • Restart the adb server if you experience ani ncrease in the time it takes to install applications on the emulator. This can occur over time and is solved by running adb kill-server followed by adb start-server.