1. First, let the Android phone listen to the specified port:
This step requires the use of shell, so there must be a terminal simulator on the mobile phone, but there are a lot of online, just find one, in turn into the following lines:
Su // get root permission
Setprop service. ADB. tcp. port 5555 // set the listening port, which can be customized. For example, 5554,5555 is the default port.
Stop adbd // disable adbd
Start adbd // restart adbd2. connect the mobile phone to WiFi and make sure that the mobile phone and the computer are connected to the same network. Write down the IP address of the mobile phone, which is assumed as A. B. C. D.
3. Open a command prompt on your computer and enter the following command:
ADB connect. b. c. d // if you do not enter the port number, the default value is 5555. The custom port number must be specified, corresponding to the custom port number in step 1, for example:. b. c. d: 55544. after successful configuration, the command line displays: "connected to. b. c. d ", then you can debugProgram.
To disable WiFi debugging, you only need to set the port number to-1 and repeat the first step.
(Enter ifconfig to view the current IP address of the mobile phone)