I forgot my data line at the company. I found a way to debug the android program using wifi and wrote down the backup.
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:
?
1234 |
su // Obtain the 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 adbd |
2. Connect the phone to wifi and ensure that the phone and the computer are connected to the same network. Write down the IP address of the phone, which is assumed to be a. B. c. d.
3. Open a command prompt on your computer and enter the following command:
?
1 |
adb connect a.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, a. B. c. d: 1st. |
4. After the configuration is successful, the command line displays "connected to a. B. c. d", and then you can debug the program, ^ _ ^.
To disable wifi debugging, you only need to set the port number to-1 and repeat the first step.