Objective
When developing an Android app, it's usually connected to the device and computer via a USB cable, but for some applications that need to use a USB device, this approach is troublesome, and the USB port of the phone is connected to the external USB device and no longer connected to the data cable. This can be done through the network TCP/IP method. That is, ADB connects devices over the network without the need for a USB cable.
Specific methods:
1. Connect the phone with USB first.
2. In command line (CMD) input
adb tcpip 5555 (5555 is the port number, can be any)
Note Here what disk your adb directory is on, and where you want to set the environment variable (PATH). Otherwise, the ADB is not an internal or external command.
My adb is in e-drive. Increase the value of path as follows:
3. Disconnect the USB connection, at which point you can connect to the device you want to test.
4. Perform the wireless connection command at the command line of the computer:
First, find the IP address of your phone. For example, mine is 172.27.35.2. Then perform a connection operation.
ADB connect 172.27.35.2:5555
After the command line finishes, you can use wireless debugging.
5. If you need to back up USB debugging, you can enter it at the command line
ADB USB
Technology is limited, thank you for watching.
Are you still using the data cable to connect your phone to debug? --Wireless connection