Monday, July 16, 2012

Working around Android 4.0.3 emulator crash, with x86 and GPU acceleration, on Windows 7 64-bit

So this Android SDK tools bug has been affecting me since around revision 18 when they introduced GPU emulation. Current revision is 20. I've been following Android issues 28515 and 28601. The issue is that trying to create certain sizes of emulator on Windows 7 64-bit break, especially with GPU acceleration enabled. Phone-size emulators work, but it's been a huge pain testing tablet-size because my only option was using an unaccelerated (read: extremely slow) tablet emulator.

I was finally able to come up with a solution leveraging some of the comments in issue 28601, plus additional trial and error. I posted the solution in issue 28601.

Here it is: Create or edit an AVD in the SDK Manager with these settings:


Target: API Level 15
CPU: Intel Atom x86
Resolution: custom 1280 x 800
Hardware:
* Hardware Back/Home key: no
* Abstracted LCD Density: 160  **note: 320 makes phone layout, 160 tablet
* Keyboard lid support: no
* Max VM application heap: 48
* Device ram size: 512
* GPU emulation: yes






And it works quite well. There are a few graphic glitches and artifacts, but it runs smooth as butter on my machine. Most importantly, it doesn't crash when I enable GPU emulation and Intel x86 CPU! Never again will I rue the tablet testing cycle. (Unless the next SDK tools update breaks it again.)

2 comments:

  1. Thank you. I've just spent the best part of today trying to get this to work reliably and this did the trick.

    ReplyDelete
  2. This comment has been removed by a blog administrator.

    ReplyDelete