How to install any application on the emulator

I’ve been developing an app recently that relies on being able to navigate and browse for images on the phone, which is all well and good when testing on a device as chances are you’ll have something like Astro installed.

This isn’t quite the case when developing on the emulator, since you’ll have just the stock version of android, which by default doesn’t come with a file browser (or at least not one you can easily interrogate).

The easiest thing to do, is just install a file browser (like Astro) onto the emulator….but wait…there is no market on the emulator so how do you do that?

Easy.

  1. You’ll need the applications APK file, the easiest way to do this is to just install it onto your device from the marketplace
  2. Connect your device to your development machine so that it is accessible via ddms.
  3. In ddms, go Device -> File Explorer
  4. Look under /data/app and search for the application you want to pull from the phone, then click the “pull from device” at the top left corner
  5. Save the apk somewhere
  6. Unplug your device, and start up the emulator
  7. Type adb devices and you should see just the emulator attached
  8. Now type adb install
  9. Voila! Your APK is now installed on the emulator, rinse and repeat for other applications