Excited about the new Kindle Fire tablets? Can’t wait to get your hands on them to run your app? We are happy to announce the emulators for Kindle Fire HDX 8.9”, Kindle Fire HDX 7” and Kindle Fire HD 7”. For a smooth and quick experience to create and configure AVDs (Android Virtual Devices), we are also announcing the beta Amazon AVD Launcher.
Just how fast?
Via Abu Obeida Bakhach, Kindle Developer Programs Product Manager…
“Let’s be clear, Android emulators have a bad reputation. They are slow to start and use. Keeping that in mind, running the x86 system images with a capable GPU and the right virtualization options, you can run apps at near-device speed. But speed alone isn’t enough. We have built the third-generation emulators directly from Fire OS source code to provide the most accurate Kindle Fire emulation.
With Kindle Fire HDX sporting best-in-class hardware, providing true-to-device emulation requires a development machine with an equally solid graphics configuration. Both x86 and ARM system images take full advantage of the GPU. However, the optimal emulation experience is through x86 system images.
To demonstrate how much faster the x86 system images are than the ARM system images, we looked at the performance of Air Patriots, a game from Amazon Game Studios. This is a 74-MB APK that includes complex gameplay code along with a large set of assets. We ran the game on the Kindle Fire HDX 7” emulator, as well as on an actual Kindle Fire HDX 7” tablet. We hosted the emulator on a Windows 7 machine with a quad-core 3.10 GHz processor, 8 GB of memory, and AMD/ATI Radeon R6570 graphics card.
The result? Fast startup and response time for the x86 system image. The gameplay was nearly identical to that of the tablet.”
Here are the stats:
You should first set up the x86 system images for the Kindle Fire emulator as a faster alternative to ARM-based emulation, if your development computer running Windows or OS X has an Intel processor that supports virtualization extensions (VT-x). To determine the capabilities of your Intel processor, visit http://ark.intel.com/.
Typically, the better the overall processor performance, the better the emulator performance. The performance of an x86 system image can be comparable to a physical Kindle Fire tablet when the emulator is running on a development computer that has a sufficiently capable processor and GPU. Using an x86 system image eliminates the translation of ARM to x86 instructions that occurs at runtime when using the ARM-based emulator.
You can read the full documentation on Setting up Intel® Hardware Accelerated Execution Manager (Intel® HAXM) here.
If you have any issues downloading through the Android SDK Manager here is a direct link I have found helpful in my own installations.
I am using a Macbook Air for this blog post but all of the Intel HAXM drivers and Android AVD work just as well on Windows.
Once you have the HAXM drivers successfully installed you will need to make sure you check of Intel x86 support for each API Level/Kindle revision you want to use. This is done through the Android SDK Manager like you would for any other Android Emulator image.
You will know that the x86 hardware emulation is successfully running when you first start one of the new emulators as seen below.
Choosing the correct Kindle Fire Images in the Android SDK Manager
Once you have the Intel HAXM driver installed and working correctly you will need to download the Kindle Fire Images from the Android SDK Manager by following the directions in the Setting Up Your Development Environment faq.
Be sure to select the appropriate Kindle generation under the corresponding Android API Level. For example, the new Kindle Fire HDX’s are the third generation of Kindle Fire devices and support Level 17 of the Android API.
Android 4.2.2 API 17:
- SDK Platform
- ARM EABI v7a System Image (emulator prerequisite for ARM system images)
- Intel x86 Atom System Image (emulator prerequisite for x86 system images)
- Kindle Fire HD 7" (3rd Generation) (ARM and x86 system images for emulator)
- Kindle Fire HDX 7" (3rd Generation) (ARM and x86 system images for emulator)
- Kindle Fire HDX 8.9" (3rd Generation) (ARM and x86 system images for emulator)
Also, do not forget the Extras section as I have seen some developers miss the Kindle Device definitions specifically, which will result in blank entries in the Amazon AVD Launcher.
- Kindle Fire Device Definitions
- Kindle Fire USB Driver (not applicable for OS X)
- Android Support Library
- Intel x86 Emulator Accelerator (HAXM) (emulator prerequisite for x86 system images)
- Amazon AVD Launcher
Running the new Amazon AVD Launcher
Now that we have full Intel x86 image support and working Kindle Fire Images form the Android SDK we need to set up the Amazon AVD Launcher. You can read the installation faq here for step by step instructions.
The Amazon AVD Launcher tool simplifies the process of creating an Android Virtual Device (AVD) by allowing you to select the device you want to emulate and automatically filling in the correct settings. As a result, the Amazon AVD Launcher is a more reliable way of configuring the emulator than manually configuring it with the Android AVD Manager.
You will find the new Amazon AVD Launcher executable in the Android sdk/extras/Amazon/ folder of your local Android SDK installation. Upon running it for the first time you will be treated to a graphical list of all the Kindle Fire Images you have installed and their associated specs as seen below.
Click the Create AVD button or switch over to the Amazon AVD tab and select New to create a new image. You will notice the options are much more streamlined now and selecting the appropriate Kindle Fire image will automatically set all of the options for you. No more guess work!
You can name the new AVD image whatever you chose. Make sure that you have the Intel x86 image support selected and that Host GPU is clicked.
I also recommend clicking on the Advanced Options tab and selecting both My Computer Keyboard for Keyboard and Webcam (Webcam0 for my Macbook Air as seen in the screenshot) for the front camera. This will be sure to use your computer’s keyboard instead of software emulation as well as its webcam
You can leave all of the Memory settings at the default levels they have already been set to the most optimized for the image automatically. You can then start the image by clicking the Start button in the Amazon AVD Launcher and will be greeted with a couple of launch options, mostly associated with how you want to fit the emulator on your screen and the ability to wipe the virtual machine’s data.
Congratulations, you now have a fully functional Kindle Fire image running at hardware-virtualized speeds!
Do not forget if you are using an existing code base to change your target emulator from your previous AVD to the new Amazon AVD image you have created as seen below.
We found that 80% of developers ran into trouble using the Android Virtual Device Manager to create, configure and launch AVDs. Instead of fiddling with build targets, guessing API levels, RAM and other settings, we know you want to instantly create and launch an emulator and just focus on developing and testing your app.
At Amazon, we believe that granting developers a choice of tools ensures a more flexible and productive mobile development experience. By preserving the Android definition of an AVD, the Amazon AVD Launcher is fully compatible with the Android Virtual Device Manager, allowing Kindle Fire AVDs created by either tool to be launched on the other.
Warning: Once we loaded games on emulators with the right GPU emulation and x86 system images, we had problems pulling away testers hooked on playing at device-like speed!
Please provide feedback at firstname.lastname@example.org or the Kindle Development Tools forum.