Load and use sdcard in Android Simulators

Source: Internet
Author: User

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.

 

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.