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 Astroinstalled.
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.
- You’ll need the applications APK file, the easiest way to do this is to just install it onto your device from the marketplace
- Connect your device to your development machine so that it is accessible via ddms.
- In ddms, go Device -> File Explorer
- 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
- Save the apk somewhere
- Unplug your device, and start up the emulator
- Type adb devices and you should see just the emulator attached
- Now type adb install
- Voila! Your APK is now installed on the emulator, rinse and repeat for other applications