Sometimes, due to various reasons, USB cannot be used to connect to the device for debugging. At this time, you can connect to the device through WiFi.
First, enable the WiFi settings of your phone to connect to the network. Then, you need to set the ADB connection port on your mobile phone. Here, you need a terminal application with the root permission. There are many such applications in various markets, select a suitable one. This article uses the Super Terminal professional better terminal.
Then, open the terminal application on your mobile phone and enter the following command:
Su
Setprop service. ADB. tcp. port 5555
Stop adbd
Start adbd
Next, you can view the IP address of your mobile phone and click on the connected Wi-Fi network to view the IP address of your mobile phone, as shown in:
Finally, go to the <Android-SDK>/platforms directory on your PC and run the following command:
ADB connectWifi. IP. Address:5555 (for example, ADB connect 192.168.1.115: 5555)
If the preceding configuration is correct, you can get the output of connected to 192.168.1.115: 5555.
In this way, you can use ADB to debug your mobile phone. You can also see the connected Mobile Phone devices in the eclipse device list, as shown in.