1. Functions and functions of ADB:
ADB is the abbreviation of Android Debug Bridge, which is used to control the mobile phone to operate through computer code scripts (or computer programs, etc.).
2. Installation of ADB:
To determine whether ADB is installed successfully (the successful installation here includes the configuration of "environment variables"), just press win+R, enter cmd to enter, enter the adb version command in the pop-up command window and enter. If ADB installation is successful, the version information will be printed.
3. Determine other environmental problems:
Due to various reasons (including the data cable is actually a charging cable, the USB interface has dust accumulation and poor contact, etc.), the phone will not be able to actually connect with ADB. To determine whether ADB can connect to the mobile phone, enter the adb devices command in the cmd command window and press Enter. If the link is successful, the following content will be printed:
List of devices attached (A few devices are linked, and a few lines will appear below)
cw93hr2 device
e83zz93 device
ae3r1h0 device
4. Install ADB:
@1 -- If you have Android Studio, you will remind you about some issues when installing ADB and virtual machines. Generally speaking, Android Studio installs ADB in the platform-tools folder under its SDK, finds it and adds it to the environment variable.
@2 -- If you don't have Android Studio (usually used for APP development), you can download one. Or if you want to use ADB alone, you can goAndroid official website(This URL sometimes needs to be circulated through the wall) Download Android platform-tools, decompress after the download is completed, and add this folder to the environment variable.
@3 -- If you don't have a software to browse the VPN, please click this link to download Android platform-tools (version number 29.0.4) I downloaded from the Android official website in October 2019.
5. Use ADB:
There are many instructions for using ADB, including screenshots, clicks, slides, home keys, return keys, power switches, etc.
After adding environment variables, these instructions can be executed as system instructions cmd, or called using packages such as os. The instructions start with adb, for example:
adb shell input keyevent 4 (4 represents the return key)View other keys represent numbers
adb shell input tap 500 500 (click on the point with coordinates of 500,500 on the screen)
adb shell swipe 200 200 300 300 (slide the screen from point at coordinates 200,200 to point at 300,300)
adb shell screencap -p /sdcard/ (screenshot, usually used in conjunction with the next sentence)
adb pull /sdcard/ (and download it to the local specified file, usually used in conjunction with the previous sentence)
Summarize
The above is what the editor introduces to you about ADB's Android Debug Bridge. I hope it will be helpful to you. If you have any questions, please leave me a message and the editor will reply to you in time. Thank you very much for your support for my website!
If you think this article is helpful to you, please reprint it. Please indicate the source, thank you!