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 by means of a network TCPIP. That is, ADB connects devices over the network without the need for a USB cable.
Here's how:
1. Connect the device using the USB cable.
2. At the command line, enter ADB tcpip 5555 (5555 is the port number and can be specified freely).
3. Disconnect the USB data, at which point you need to connect | USB device.
4. Re-enter the IP address of the ADB connect < device on the computer command line >:5555
You can use ADB, DDMS to debug Android apps or display logcat messages later.
5. If you need to restore to a USB cable, you can enter ADB USB at the command line
Note: The IP address of the Android device can be found in Settings->about phone->status
How Android does not debug via USB data cable