Use SD card in Google Android SimulatorFrom the perspective of this document, the android simulator allows us to use a disk image in the FAT32 format as a simulation of the SD card. Today, I tried to record the process and share it with you:
1. Go to the tools subdirectory under the android SDK directory and run
Mksdcard-l sdcard 512 M/your_path_for_img/sdcard. img
In this way, a m SD card image file is created.
2. Specify the path when running the simulator (note that the full path is required ):
Emulator-sdcard/your_path_for_img/sdcard. img
In this way, the path "/sdcard" can be used in the simulator to point to the simulated SD card.
So how do I copy local files to the SD card or manage the content on the SD card?
A. in Linux, We can mount a loop device and create a directory, such as android_sdcard, and then execute:
Mount-o loop sdcard. IMG android_sdcard
In this way, the directory is used to manage the sdcard content.
B. in windows, we can use mtools for management or android SDK commands (this command can also be used in Linux ):
ADB push local_file sdcard/remote_file