The android simulator allows us to use the disk image in FAT32 format as the SD card simulation:
All of the following operations are performed in Windows
First, run cmd to go to the command line interface (you need to set the tools in the directory where your android SDK is located to the environment variable path in advance)
In addition to the eclipse method, the following commands are run on the command line:
1. Create an SD File
Command Line: mksdcard-l sdcard 512 m d:/Android/mysdcard/sdcard. IMG is like this in D:/Android/mysdcard/sdcard. IMG creates a m SD card image file
The mksdcard parameters are as follows:
Mksdcard: Create a blank FAT32 image to be used with the android emulator
Usage: mksdcard [-l label] <size> <File>
If <size> is a simple integer, it specifies a size in bytes
If <size> is an integer followed by 'k', it specifies a size in kib
If <size> is an integer followed by 'M', it specifies a size in MIB
2. Load the newly created SD file in the simulator
Eclipse method: (the premise is that Google Android plug-in is installed), select the menu "run"-> "Run deployments... ", go to the pop-up page, select the" targets "tab, and add the startup parameter-sdcardd:/Android/mysdcard/sdcard in the bottom line of" aditional emulator command line options. IMG
3. transfer files to the SD card (manage the content on the SD card)
Eclipse:
Use the file Explorer File Browser in the ddms label to transfer
Select the MNT -- sdcard path and click
Select the file to be uploaded, for example, 1.mp3. In the project, the Reference Path is/sdcard/1.mp3.
How do I copy files to the SD card of the simulator?
After the simulator is started, run CMD in Windows to enter the platform-Tools Folder path. my options are: D: \ Android-SDK \ platform-tools.
Then use the ADB push command and ADB push D: \ dd.xls/sdcard/dd.xls