Skip to content

Instantly share code, notes, and snippets.

@pyokagan
Last active August 29, 2015 14:00
Show Gist options
  • Save pyokagan/fa20ece86a9774d02719 to your computer and use it in GitHub Desktop.
Save pyokagan/fa20ece86a9774d02719 to your computer and use it in GitHub Desktop.
Working Android 4.4 emulator

Problem was that noemulatedsd was not set in /fstab.goldfish which led to /mnt/secure/asec to not be mounted at boot. I had to look through Android's source code to find this -_-. Why google.

Steps to get working emulator:

  1. Install Android SDK Tools Only. The directory where the SDK is installed will henceforth be known as <sdk>.
  2. Launch the Android SDK Manager, install everything under the Android 4.4.2 group
  3. Now overwrite the ramdisk.img file (located at <sdk>/add-ons/addon-google_apis-google-19/images/armeabi-v7a with this modified version. This is the ramdisk file used by the Google APIs (Google Inc.) - API Level 19 device target.
  4. Launch the Android ADB Manager, create a new Android Virtual Device. Make sure the target is set to Google APIs (Google Inc.) - API Level 19. Give the device plenty of RAM, and make sure that there is a SD Card!. (Also, remember to enable GPU Acceleration as well)
  5. Launch the Android Virtual Device. Everything should work fine, especially apps that have installLocation set to preferExternal.

Windows-specific instructions

Apparently ADB Manager on Windows is nerfed (cannot set SD Card size and enable GPU Acceleration), so the command line has to be used. To create the AVD,

"<sdk>/tools/android" create avd -n <avd_name> -t "Google Inc.:Google APIs:19" -c <size>M

<size> is the size of the SD Card in megabytes (e.g. 1000M). <avd_name> is what you want to name the AVD.

And to run the AVD,

"<sdk>/tools/emulator" -avd <avd_name> -gpu on
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment