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: