Anroid debug bridge, Android debugging bridge, or ADB for short, is mainly used for debugging bridge. Through ADB, we can install software on the simulator or the actual device, files can be transmitted between the computer and the simulator/actual device to enter the simulator or the shell of the device. We usually use eclipse to develop Android programs and use ddms to communicate with simulators/Actual devices through ADB. Therefore, ADB is a required Android command line tool for every android developer.
Before using the ADB command, you must go to the directory where the ADB tool is located, which is located in the XX \ Android-SDK-Windows \ platform-tools directory, we recommend that you add this directory to the path, so that you do not have to go to the platform-tools directory every time.
Here I will talk about how to use ADB by installing a Player file on my Development Board:
1. List the currently connected Android devices (including simulators)
adb devices
2. install the software (here, install the yaozq_musicplayerforyou.apk program under the D Drive)
adb install d:/yaozq_MusicPlayerForYou.apk
3. file transmission, including sending files to the simulator/device, and obtaining files from the simulator/Device
Send File: ADB push source file target file
Get File: ADB pull source file target file
4. Enter the device/simulator Shell
Command: ADB Shell
Here we use ADB shellto refer to the B .mp3 file we pushed in:
Alternatively, you can directly use the following method without entering the shell:
Of course, ADB also has other functions, such as viewing the bug report and getting the status and serial number of the device/simulator. We will not introduce them here. You can try it on your own.