Tag Archives: mac

Working with Android SD Cards image on Mac

I wanted to load images (could be some other media file for that matter) into an sd card and connect that sd card image with the an android emulator. The post by Jayway team (http://blog.jayway.com/2009/04/22/working-with-sd-cards-in-the-android-emulator/) helped me to get started but those instructions are linux specific and didn’t work for me on mac. In the end it turned out pretty simple. So here is what I did:

Go to SDK Install Dir/tools folder:

./mksdcard 128M sdcard1.iso

Now clicking the .iso file mac would automatically load it in Finder. Thanks to Jayway post I created a directory /dcim/Camera in the loaded iso file and dragged couple of images into this directory.

From here onwards you have couple of options:

1. Create an android virtual device (avd) using the android SDK Manager or android command line tool, whichever you prefer, and specify the path to the sd image file (sdcard1.iso). To shoot up the GUI utility just type ./android inĀ SDK Install Dir/tools folder. For command line utility refer here: http://developer.android.com/guide/developing/tools/avd.html

To use an existing avd:

2. emulator -avd my_android1.5 -sdcard sdcard1.iso

And there you go you should be able to see the images in Android Gallery application.