Fixing “Failed to Create the SD Card” using Android Tools

I use Eclipse and run the ADT stuff within it. I tried to create a new Android virtual machine and kept getting the error mentioned in the title. I verified all permissions in all applicable directories, and still had no luck.

It turned out the problem was that I was running the ADT on 64-bit Linux (Mint 17, to be specific), and I needed to install a couple of 32-bit libraries. Here is the list:
libstdc++6:i386 libgcc1:i386 zlib1g:i386 libncurses5:i386

Thanks to Pavel Kazlou for providing the list here:

http://stackoverflow.com/questions/3878445/ubuntu-error-failed-to-create-the-sd-card

 

Speeding up Android Emulator

This is a reminder of the steps required to use kvm/hardware acceleration in the Android Emulator, in case I need to re-do them.

They’re taken from here: https://software.intel.com/en-us/android/articles/speeding-up-the-android-emulator-on-intel-architecture#_Toc358213272

(The link also has instructions for Windows and Mac, in case any of you haven’t switched to Linux yet.)

In brief, the steps are:

  1. Verify hardware support by typing
    egrep –c ‘(vmx|svm)’ /proc/cpuinfo

    (result should not be 0).
  2. Install required packages:
    sudo apt-get install qemu-kvm libvirt-bin ubuntu-vm-builder bridge-utils
  3. Add yourself to the kvm and libvirtd groups; log out and log in again.
  4. Install “Intel x86 Atom System Image” in Android SDK Manager
  5. (If using Eclipse, shut it down and restart it.)
  6. Create a new device in the Android Virtual Device Manager, selecting the new system image for the “CPU/ABI” option.