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!