Steps for using the SD card in the android simulator in Linux

Source: Internet
Author: User

Recently, the company has used android as a project and has never done this before, so it will inevitably encounter some unknown issues. This will not happen to the use of the SD card. I will search online and try again later, after a while, it hurts a lot, but it is better. I wrote it here for your reference, reference, reading, and appreciation... Okay, let's get started!

Step 1. Create an sdcard
1. Enter the command in the terminal to go to The Tools Folder under your SDK directory. The command is as follows:
# Cd ./
# Cd/enter the full path of the tools
# Ls
Enter the following command to create the SD card:
# Mksdcard 1024 M mksdcard. img
Note:1024 you can set it as needed based on the size of your hard disk,In addition, m must be capitalized.!
Then, the SD card is created. Then, mksdcard. IMG is added to tools.

Step 2. Mount the SD card to the simulator
1. First, make sure that your simulator is disabled.
2. Right-click your project and choose run deployments under run as... then find target in the pop-up interface,
Enter the following command in the text box at the bottom of the drop-down list under target:
-Full path of the sdcard/Tools Folder/mksdcard. img

Then you can open the simulator to see if your SD card has been mounted.

Step 3. copy the file to sdcard(Note: Prepare the file to be copied before copying the file, and put the file you want to copy in any folder. It is best not to put the file in a folder with a Chinese name)
1,Because you need to enter the directory where ADB is located to copy files, you must first find ADB, (ADB is in the platform-Tools Folder under your SDK directory ),
Enter the command in the terminal as in step 1 to enter the directory where ADB is located.
2. After Entering the platform-Tools Folder, enter the following Copy command:
./ADB push/path of the folder in which you want to copy the file/Name of the file to be copied/sdcard/Name of the file to be copied
Example:./ADB push/home/01.mp3/sdcard/01.mp3

Step 4,OK!

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.