Tuesday, April 28, 2009

Distributing Android Emulator with installed applications

So I had some trouble trying to ask questions on some google groups about how to distribute an android emulator with a pre-installed application. My questions didn't show up after posting through the web interface, and only appeared to show up later after I emailed the same questions - fortunately Google Groups collected them all together, and here are links to the for the record and my convenience :-)

My post to android developers

My post to android beginners

I hate being a duplicate, cross-poster, but really really these things didn't show up on either list for several days.

Anyhow, once the posts showed up I got help from several kind folks. It seems that various problems I had been having were associated with using the older sdk, and once I upgraded to 1.5r1 everything seemed to get sorted; although it did take combining the various suggestions to finally produce a distributable package. The package ended up looking like the above image; and the bash script I used for startup contained the following:
#!/bin/bash

./emulator -sysdir . -datadir . -skindir . -skin HVGA -sdcard sd256m.img
after I had created an sdcard image using the following syntax:
./mksdcard -l SD256M 256M sd256m.img
I had to install my application by downloading it through the browser, but finally everything seems to be working. I'll try and make the package and application available to everyone soon.

2 comments:

Ted Sanders said...

Thanks Sam - great info! I used this to put together a full build process we're using for our clients:
http://sodamedia.com/tech/dev/your-android-app-on-windows/

Sam Joseph said...

Hi Ted, Glad the info was helpful. I seem to remember having other issues when I subsequently tried to put together a windows rather than an OSX package; not sure if I blogged that or not, but sounds like you've got that sorted. Many thanks for the link.