Use the `mksdcard` tool to create a FAT32 disk image that you can load into
emulators running different Android Virtual Devices (AVDs) to simulate the presence
of the same SD card in multiple devices.


The `mksdcard` tool provided in the Android SDK Tools package
is located in <var translate="no">android-sdk</var>`/emulator/`<var translate="no">mksdcard</var>.


If you don't need a disk image that can be shared
among multiple virtual devices, you don't need to use the `mksdcard` command.
By default, the emulator uses the default image that is generated by and stored with the
active AVD instead.

### Usage


To use the `mksdcard` tool, use the following command:

```
mksdcard -l label size file
```

### Options

The following table describes the command-line options of `mksdcard`:

|                Option                |                                                                                                                                                                                                                             Description                                                                                                                                                                                                                              |
|--------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `-l `<var translate="no">label</var> | A volume label for the disk image to create                                                                                                                                                                                                                                                                                                                                                                                                                          |
| <var translate="no">size</var>       | An integer that specifies the size of the disk image to create. If <var translate="no">size</var> is a simple integer, it specifies the size in bytes. You can also specify the size in kilobytes, megabytes, or gigabytes by appending K, M, or G to <var translate="no">size</var>. For example, `1048576K` or `1024M`. The minimum size is 9M. The Android emulator cannot use smaller images. The maximum size is 1099511627264 bytes, which equates to 1023 GB. |
| <var translate="no">file</var>       | The path/filename of the disk image to create relative to the current working directory.                                                                                                                                                                                                                                                                                                                                                                             |

### Example


Create the `mySdCardFile.img` disk image:  

```
mksdcard -l mySdCard 1024M mySdCardFile.img
```


Start two emulators with different AVDs. Use the `-sdcard` flag to specify the name
and path of the disk image you created:  

```
emulator -avd Pixel_API_25 -sdcard mySdCardFile.img
emulator -avd NEXUS_6_API_25 -sdcard mySdCardFile.img
```
For more information about the `emulator` command and its options, see [Start the emulator from the command line](https://developer.android.com/studio/run/emulator-commandline).