Google官方资料 mksdcard

mksdcard

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. If you do not need a disk image that can be shared among multiple virtual devices, you do not 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

mksdcard -l label size file

Options

The following table describes the command-line options of mksdcard

Option Description
-l label A volume label for the disk image to create.
size An integer that specifies the size of the disk image to create. If size is a simple integer, it specifies the size in bytes. You can also specify the size in kilobytes, megabytes, and gigabytes by appending K, M, or G to size. 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.
file The path/filename of the disk image to create. The path is 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  Control the Emulator from the Command Line.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值