Show navigation Hide navigation


The mksdcard tool lets you quickly create a FAT32 disk image that you can load in the emulator, to simulate the presence of an SD card in the device. Because you can specify an SD card while creating an AVD in the AVD Manager, you usually use that feature to create an SD card. This tool creates an SD card that is not bundled with an AVD, so it is useful for situations where you need to share a virtual SD card between multiple emulators.


mksdcard -l <label> <size> <file>


The following table describes the command-line options of mksdcard

Option Description
-l A volume label for the disk image to create.
size An integer that specifies the size (in bytes) of disk image to create. You can also specify size in kilobytes or megabytes, by appending a "K" or "M" to <size>. For example, 1048576K, 1024M.
file The path/filename of the disk image to create.

Once you have created the disk image file, you can load it in the emulator at startup using the emulator's -sdcard option. For more information, see Android Emulator.

The usage for the -sdcard option is as follows:

emulator -sdcard <file>


mksdcard -l mySdCard 1024M mySdCardFile.img