Creating SDCard for Android emulator

At this time most of the applications works with data from SDCard. SDCard present in every phone. You need to know how to create it in your environment for testing application or some other stuff.
There are 2 ways how to create SDCard.

First
Android SDK contains tool which called mksdcard. This tool helps with this process. It works from command line.

Usage:

mksdcard [-l label] <size>[K|M] <file>

-l –A volume label for the disk image which need to create

size –An integer value which specify size of image. It is possibility to specify size in kilobytes or megabytes. Examples: 1024K or 1M

file –The filename/path of the disk image

Okay. Now we know all parameters and can create needed disk image.

Just type command which is below with your parameters.

I used:

mksdcard -l sdCard 128M C:\sdCard.iso

Second

Android SDK also contains android tool.

android create avd -n <avd_name>-t <targetID>-c <size>[K|M]

-n - name of created emulator

-t –target ID of emulator instance. Type

android list targets

and you will find out which target IDs are allowed

-c –size of created SDCard

In my case I type:

android create avd -n MyEmulator -t 1 -c 10M

What I did. I create emulator instance called MyEmulator with SDCard image which has 10 megabytes.

As you can see it is very simple operation.

Is this information useful for you? Leave the comment.

Share

No related posts.

2 comments to Creating SDCard for Android emulator

Leave a Reply

  

  

  

You can use these HTML tags

<a href=""title=""><abbr title=""><acronym title=""><b><blockquote cite=""><cite><code><del datetime=""><em><i><q cite=""><strike><strong>

A sample text widget

Etiam pulvinar consectetur dolor sed malesuada. Ut convallis euismod dolor nec pretium. Nunc ut tristique massa.

Nam sodales mi vitae dolor ullamcorper et vulputate enim accumsan. Morbi orci magna,tincidunt vitae molestie nec,molestie at mi. Nulla nulla lorem,suscipit in posuere in,interdum non magna.