Android simulator SD card usage

Source: Internet
Author: User

Android SDK + eclipse provides the SD card simulation method. The usage is as follows:

1. Create an SD card image file.

 

Mksdcard 1024 M sdcard. img

 

This command will generate an sdcard. imgfile in the current directory, which is the SD card image file of the android simulator.

 

1024 MB indicates 1024 MB, that is, the SD card has 1 GB capacity, and K can also be used as the unit (1 m = K). K and m must be capitalized.

 

Android currently supports 8 m ~ Gb sd card.

Example:

The size of sdcard. IMG generated in the C: \ Users \ guxiaoshi directory is 1 GB. I copied this sdcard. IMG to F: \ Program Files \ Android-SDK \ platform-tools. F: \ Program Files \ Android-SDK is the android SDK directory. (Note: I have spaces in the middle of the path and placed them in the path without spaces. Remember !!!)

2. Run the simulator with an SD card

In eclipse, enter the startup parameters in the target tab in the "run-> RUN configurations..." menu, for example:

3. Add a folder to sdcard

After running the application, select ddms and select Add folder.

4. Export files to the SD card

In cmd, the command is as follows: F: \ Program Files \ Android-SDK \ platform-tools>ADB push 1.png sdcard/cloth/1. PNG

This command copies the 1.png file under F: \ Program Files \ Android-SDK \ platform-toolsto the cloth directory of the sdcard.

Note: The cloth directory is self-built, and the directory name must exist.Run the command after the application run.

(Note that the "/" symbol in the path should be clear. If you want to save it in a folder of sdcard, you must ensure that the folder has already been created under sdcard, otherwiseNo such file or directorySuch errors)

5 bytes in eclipse. you can add 1.png to sdcard as follows:

After setting the Run Command Parameter, run an application and use ddms, for example:

 

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.