Saturday, April 9, 2011

Add SdCard in android emulator / Setup SDCard

For Windows + Eclipse user only,
others please refers to http://www.brighthub.com/mobile/google-android/articles/33240.aspx


To create SDCard is quite straight forward, cause you just have to follow as below.

Go to C:\[SDK dir]\android-sdk-windows\tools
mksdcard 512M mysdcard.iso



you may check with dir/w to see if the *.iso is created.

Choose either 1 way,
1. Use existing avd and mount the sdcard with command line
2. Create a new AVD

1. Use existing avd and mount the sdcard with command line
Go to your Eclipse, right click the project that you want to inject the sdcard.
Choose Run As > Run Configurations...


go to the Target tab in the middle
type in the command line with
-sdcard [dir]/mysdcard.iso
For my example, i make an extra step which is paste the created mysdcard.iso into the project like paste to C:/Users/Rickie/workspace/Helloworld/mysdcard.iso

I use this step to avoid spacing, the command line now will be -sdcard "C:\Users\Rickie\workspace\HelloWorld\mysdcard.iso"
Please let me know if you know how to avoid spacing, looks like i can't avoid it although I use "double quote"
2. Create a new AVD
Go to Window > Android SDK and AVD Manager and create new Android device.
If you don't know how to create AVD, please go Create Android Virtual Device(AVD) .
In “SD Card” option specify “File” and navigate to sdcard.iso created earlier.



When you done adding sdcard, I'm sure you want to check if the mysdcard folder already inside the FileSystem.
If you not sure how, please refers to Accessing Emulator File System.

Or you can just start the emulator, check on the setting > SD card & phone storage settings to check if the SD card is mounted.

6 comments:

  1. Thanks A lot but can u tell me now how to add files to this sd card. thabks in advance

    ReplyDelete
  2. I'm not sure if this is what you are looking for. Please explain more if you need something else.
    http://rickiedroid.blogspot.com/2011/04/accessing-emulator-file-system.html

    ReplyDelete
  3. This comment has been removed by the author.

    ReplyDelete
  4. Best SEo Service organization in Bangalore, INDIA. Suppliers of SEO, Search Engine Optimization Online Marketing Services to customers over all business segments. We have possessed the capacity to make our interesting position in Internet Marketing space
    Best SEO Company in Bangalore|Best SEO Service|Best SEO Company in india

    ReplyDelete