The ADB tool is a tool for connecting Android phones, easy to use, development and testing are often used in everyday work, and today I'll take a record of what I'm using.
1, equipment environment preparation, one PC, Android phone, using the Xiaomi mobile phone. USB data cable, pay attention to the quality of the data line, almost the quality of the data line is sometimes not connected, network environment is wifi, download adb, it is best to put the corresponding files in the Cmd.exe directory (this environment if not can refer to my other blog).
2, start the connection, there are two ways, one is the WiFi connection mode, the other is the use of data cable connection.
A, via WiFi connection mode
In the cmd of the PC, enter the command:
Ping 192.168.8.100 check WiFi LAN type computer and mobile phone is not through
ADB directly enters ADB to check if the ABD configuration environment is correct.
ADB Connect 192.168.8.100
Where ADB is the IP of the phone. If the connection is successful, you can enter the Android shell.
The ADB shell will enter the Android system if it appears, but not the root authority
If it is # Enter the Android system, get root permissions
My own during the operation, the PC can ping through the phone, but the ADB connected to the phone, a little bit of a problem, prompted unable to connect to 192.168.1.100:5555, what is the reason? The original phone's default ADB service is not open, otherwise, other people's ADB can casually even, it is not very safe? So, we have to find a way to open the ADB service on the phone. What are you doing? Start by downloading an android emulator on your phone (of course, if you have one, don't download it), then cut to root and open the ADB service with the following command:
su
SetProp Service.adb.tcp.port 5555
Stop ADBD
Start ADBD
Then the ADB can connect to the phone,
650) this.width=650; "src="%5c "alt=" \ "\"/"/>
B, via USB, use ADB to connect the phone.
I connected the phone via USB to the PC, and ADB did not connect to the phone, so downloaded the Android driver, installed, just fine. In this way, the ADB connects to the mobile phone, you can use the ADB shell into the mobile phone Android system. Report:
650) this.width=650; "src="%5c "alt=" \ "\"/"/>
This article is from "Ghost" blog, please make sure to keep this source http://fangwei009.blog.51cto.com/5234706/1793043
How the ADB tool connects to the phone installation apk