Wednesday, October 27, 2010

Android: setup and load an sdcard

1. Create a new SDCard

mksdcard -l
e.g.
Following sample creates a new SDCard file with 100 Mb space, and is located at:/usr/android-sdk/sdcard, where sdcard is a file created by android.
mksdcard -l sdcard 100M /usr/android-sdk/sdcard


2. Start emulator using tha SDCard
emulator -avd -sdcard
e.g.
emulator -avd Default-HVGA -sdcard /usr/android-sdk/sdcard

If SDCard is mounted, "Unmount SD Card" option must be enabled, as shown below:



3. Load data

adb push /

e.g.
Load the folder osm_android into
adb push /usr/data/android/osm_android /sdcard/osm_android