How do I add files to the SD card on the android simulator mobile phone?

Source: Internet
Author: User

Add a file directly to the SD card of the simulator in ddms. If an error occurs, the following error occurs:Failed to push xxxxx.txt on emulator-: Read-Only file system error, because your sdcard permission is insufficient and you need to create an sdcard directly.

I. First create an sdcard. The name of the sdcard I created is sdcard. IMG (the name is random and ends with the name of the IMG extension)

Enter the DOS to point to the directory e: \ android-sdk_r10-windows \ Android-SDK-Windows \ tools (this is the installation of Android SDK files, configure this environment variable is not needed)

Input mksdcard-l sdcard 100 m E: \ sdcard. IMG in DOS (where can this file be stored)

Explanation: 1. The sdcard 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 sdcard 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. Suffix of the Virtual File. img

Input mksdcard help in DOS.

II,After creating the sdcard, We need to load the sdcard in the simulator.

Window-> AVD Manager-select the simulator you are using-> Edit

Select File in the SD card option, select the newly created sdcard. IMG, and click Edit AVD to save the configuration.

3. Add files to the sdcard of the simulator. (Note: restart the simulator)

4. After restarting the simulator, find Dev tools in the simulator and start it. Then, find and run the media repository to scan the newly added Files. "finished" is displayed and you can exit, at this time, the added file can be used (for example, MP3 file, then the music player can find it ).

 

 

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.