Android simulators or real machines have a certain amount of internal storage space (not memory, but persistent storage space), but this is not enough. Sometimes we need a larger storage space. To develop programs that use extended storage space on the simulator, You need to simulate an sdcard virtual file on the PC and then load it into the simulator. The sdcardfile is generated using the mksdcard.exe command in the toolsdirectory. to generate an sdcard file of MB, run the following command:
Mksdcard-l MyCard 256 M card/MyCard. img)
Note the following when using the mksdcard command:
1. The MyCard command can use three sizes: byte, K, and M. If only a number is used, bytes are used. It can be followed by K, for example, 262144 K, or 256 m.
2. The Virtual File Created by MyCard is at least 8 Mb. That is to say, the simulator only supports Virtual files larger than 8 Mb.
3. The-l command line parameter indicates the volume label of the virtual disk. This parameter does not exist.
4. The extension of a virtual file can be arbitrary, such as MyCard. ABC.
5. The mksdcard command does not automatically create a non-existing Directory. Therefore, before executing the command above, you must create a card directory in the current directory.
6. The mksdcard command is an sdcard virtual file generated based on the actual size. That is to say, the size of the virtual file generated for 256 MB is mb. If a large virtual file is generated, check whether your hard disk space is sufficient!
After executing the preceding command, run the following command to start the android simulator:
Emulator-AVD emulator-sdcard card/MyCard. img)
Emulator is the name of my simulator. I use the default method during installation, so I am not very clear about the name. I feel that it is better to use the default method.