adb remote debugging can remotely package and print out the log of the device in real time, no longer need to be restricted by the data line. The main steps of adb remote debugging are divided into eight parts, as follows:
Because the firewall refuses the link, the adb service cannot be started, so you need to turn off the firewall of the LAN.
Similar to the JDK configuration environment, the SDK tools and platform-tools directories are added under the environment variable path, as shown in the following example:
Some on the Internet also use the created variable android to reference. I personally think it is unnecessary. It is clearer to directly configure the address.
Open cmd and enter adb server:
similar to the above picture, there is no prompt after entering enter, which means the startup is successful
Check the IP of the device in the LAN
Turn on the mobile device and find the IP address under the local area network. The location of each mobile phone to view the IP is different. It should be noted that the computer and the mobile device must be under the same local area network, otherwise everything is meaningless. The following take 192.168.31.162 as an example
Use the data cable to link the computer and the mobile device, and view the device: adb devices
Enter adb tcpip 5555 in the cdm, which means that the adb service will requisition the 5555 port of the computer, and this port must be ensured that it is not occupied by other programs
Download the plugin for ADB WIFI
Search for ADB WIFI under the file-setting-plugin of Android Studio and restart it. At this time, Android Studio can debug the mobile device just connected in cmd even if there is no data cable connection.