Now Available: Android SDK x86 System Image with Google APIs

If you've used the Android SDK, you've probably noticed that Intel Atom x86 system images for the emulator have been available for a while now. You might have been frustrated with the fact that the system image didn't include access to any of the Google APIs. I have good news: Google has released an x86 system image for the Android SDK that includes the Google APIs (supporting API 19/Android 4.4.2). That means you can now test your apps that use Google APIs on an x86 virtual device image (and take advantage of the huge hardware acceleration speed boost you get from our HAXM driver if your development system has Intel VT virtualization technology). 

Here's what you need to do to get it.

Get the x86 System Image with Google APIs

To get the x86 system image with Google APIs, open up the Android SDK Manager window in Eclipse, Go to the "Android 4.4.2/API 19" section, and install both "Intel x86 Atom System Image" and "Google APIs (x86 System Image)", like so:

Android SDK Manager

Install the packages as usual, following the on screen prompts.

Create (or Edit) an Android Virtual Device With The New Image

Once the new system image is installed, you'll need to create a new Android Virtual Device (AVD) for the emulator to use (you can also edit an existing AVD, but I'll leave that as an exercise for the reader). Open up the Android Virtual Device Manager window in Eclipse, then click New to create a new virtual device, configured to use the new system image, like so:

Edit Android Virtual Device

The important setting is "Target:". Make sure you select "Google APIs x86 (Google Inc.) - API Level 19". You can configure the other settings according to your needs. 

Bonus: Use HAXM To Get Hardware Acceleration of x86 Emulator Images

If you're not already using it, you're going to want to get our HAXM (Hardware Accelerated Execution Manager) tool, which can drastically speed up the emulator in the Android SDK. From the product page:

The Intel Hardware Accelerated Execution Manager (Intel® HAXM) is a hardware-assisted virtualization engine (hypervisor) that uses Intel Virtualization Technology (Intel® VT) to speed up Android app emulation on a host machine. In combination with Android x86 emulator images provided by Intel and the official Android SDK Manager, HAXM allows for faster Android emulation on Intel VT enabled systems.

If you're developing on a machine with an Intel CPU that has VT (most do - go here if you need to check) and you have installed HAXM, you'll know it's working if you see the following when you start your Android Virtual Device:

HAXM Enabled Android Virtual Device Start

If you see "HAX is working and emulator runs in fast virt mode", you're all set - you should notice a significant improvement in the speed of emulated devices using x86 Android system images. 

Need Help?

If you have any questions or need help with getting these system images installed, or getting the emulator or HAXM working, please let us know. Leave a comment here, or better yet, check in our Android forum to see if someone has already asked your question and gotten an answer. If not, post it there, and we'll do our best to help you out.

Related Articles and Resources:

For more complete information about compiler optimizations, see our Optimization Notice.

9 comments

Top
Mohamed F.'s picture

My Hardware is AMD and I have this message from Android Studio:

4:06:24 PM Platform and Plugin Updates: The following components are ready to update: Google APIs, Android Support Repository, Google Repository, Intel x86 Emulator Accelerator (HAXM installer), Android SDK Platform-Tools 25.0.3, ARM EABI v7a System Image, Intel x86 Atom System Image, Google APIs Intel x86 Atom System Image, Android TV Intel x86 Atom System Image, Google APIs Intel x86 Atom System Image, Android SDK Tools 25.2.4 amd

 

Can you help me please?

Nikola D.'s picture

Sir, I've enabled in Bios a hardware acceleration for a fast x86 emulation, also downloaded and installed (checkmarks visible) both "Intel Atom x86 system image" and "Google APIs x86 Atom system image" but in a AVD under "target", "Google APIs x86 Atom system image" is not visible among selections... accordingly, by clicking on "ok", nothing happens. On the end, I've installed and the other dependicies under "Android 4.4.2 (API 19)" and the same thing again...
  Only default virtual devices (not user defined) will start to emulate.

https://extraimago.com/image/wrmL

Gianluca M.'s picture

Thanks for your support, i've been missing for a while, but now i'm back to say thanks for all your effort.

Appreciate!

All-

We have submitted fixes for these issues to Google, and we're told they have been merged, but I don't have an estimate when to expect the updated system image to be available. Keep an eye on the SDK Manager, and I'll post here when I get word that it's released. I don't know what the version number is going to be, but it should be newer than API 19 rev. 4. Thanks for your patience!

Josh

Steve H.'s picture

Hi Michael/Josh.  I'm having the same problem on my Lenovo t430.  According to my research the black screen is caused because the AVD can't talk to the hardware accelerator (Host GPU unchecked.)  There's a View object in the Maps application that depends on it to load the map bitmap.  Checking the GPU box gets past that error but also crashes my emulator.  Please let me know when the update is released.  I'm on version 19.4 of the system image.

 

Steve Hurd,

Floyds Knobs, IN

Michal B.'s picture

Josh, I'm able to achieve both, the black map screen and emulator crash. It depends on the AVD switch "Use Host GPU". Unchecked - black screen, checked - crash. I'll be checking this page for the updates on this issue. Thanks.

Environment: Win 8.1 x64, ADT v22.6.2, GPU HD 4600

Gianluca - according to the HAXM team, there is a known issue with the x86 image with Google APIs and OpenGL that will be upstreamed into the next release of the image. I don't know when that fix will be released, but hopefully it's soon. 

The fix takes care of the black map screen problem I was encountering. We haven't been able to reproduce the crash you reported, but I'm hoping that the fix will take care of your issue, as well, since it seems to be Open GL related (createGraphicBuffer failed). 

I'll post here when the update is released. Thanks for being patient.

Gianluca-

Hmm. I can't reproduce that crash on my system (MacBook Air, 10.9.2) with the new x86 image with Google APIs in the emulator. For me, Google Maps doesn't crash, but it doesn't work 100%, either (the map part of the screen is black). Let me check with our support team and see if I can find out more. 

Are you experiencing any other issues with the emulator image, or is it just this problem with the Google Maps app itself? Do you have an app that uses the Google APIs, and it it working OK?

Gianluca M.'s picture

Hi Josh,

can you help me troubleshooting one very annoying issue with this new x86 Image ?

My actual configuration is MacPro with Mac OS 10.9.2, i have the latest .9 hardware acceleration, the sdk emulator and your latest x86 image with google API.

When I try to lunch Google Maps the emulator crashes immediately, can you help me understanding why ?

The debugger last words are : 

03-18 09:09:38.620: E/gralloc_goldfish(934): gralloc_alloc: Mismatched usage flags: 492 x 874, usage 333
03-18 09:09:38.620: E/(934): GraphicBufferAlloc::createGraphicBuffer(w=492, h=874) failed (Invalid argument), handle=0x0
03-18 09:09:38.620: E/BufferQueue(1271): [ScreenshotClient] dequeueBuffer: SurfaceComposer::createGraphicBuffer failed
03-18 09:09:38.740: E/StrictMode(2004): A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource leaks.
03-18 09:09:38.740: E/StrictMode(2004): java.lang.Throwable: Explicit termination method 'close' not called
03-18 09:09:38.740: E/StrictMode(2004):     at dalvik.system.CloseGuard.open(CloseGuard.java:184)
03-18 09:09:38.740: E/StrictMode(2004):     at java.io.RandomAccessFile.<init>(RandomAccessFile.java:128)
03-18 09:09:38.740: E/StrictMode(2004):     at com.google.android.apps.gmm.map.internal.b.b.d.<init>(SourceFile:15)
03-18 09:09:38.740: E/StrictMode(2004):     at com.google.android.apps.gmm.map.internal.b.b.e.a(SourceFile:71)
03-18 09:09:38.740: E/StrictMode(2004):     at com.google.android.apps.gmm.map.internal.b.b.f.a(SourceFile:640)
03-18 09:09:38.740: E/StrictMode(2004):     at com.google.android.apps.gmm.map.internal.b.b.a.<init>(SourceFile:67)
03-18 09:09:38.740: E/StrictMode(2004):     at com.google.android.apps.gmm.map.internal.b.b.a.a(SourceFile:88)
03-18 09:09:38.740: E/StrictMode(2004):     at com.google.android.apps.gmm.map.internal.b.d.l.run(SourceFile:612)
03-18 09:09:38.740: E/StrictMode(2004):     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
03-18 09:09:38.740: E/StrictMode(2004):     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
03-18 09:09:38.740: E/StrictMode(2004):     at java.lang.Thread.run(Thread.java:841)
: E/(): Device disconnected

 

Add a Comment

Have a technical question? Visit our forums. Have site or software product issues? Contact support.