1. By default, the ADB is connected via USB.
Without a USB cable, simply install a HyperTerminal on your Android device and run the following code in the terminal:
Su
SetProp Service.adb.tcp.port 5555
Stop ADBD
Start ADBD
After that, open the cmd command line on the PC side and enter: ADB connect Android device IP address (e.g. ADB connect 192.168.137.144)
The IP address of the Android device, which can be viewed inside the WiFi connection on the device.
Note: When using the ADB with WiFi connection, the USB connection is not available for the ADB.
2. If there is a USB cable, and the USB cable is already connected with the PC side. How to switch to using WiFi connection: (Android device side does not need HyperTerminal)
Connect the USB cable to the PC side and turn on USB debugging.
Input in cmd: adb tcpip 5555
You can disconnect the USB cable.
Re-enter: ADB connect Android device IP address (e.g.: ADB connect 192.168.137.144)
You can use WiFi connection.
To disconnect a WiFi connection: adb disconnect
3. From WiFi connection, convert to USB connection:
No USB cable required, just run the following code in the Android device HyperTerminal:
Su
SetProp service.adb.tcp.port-1
Stop ADBD
Start ADBD
After that, convert from a WiFi connection to a USB connection.
4. WiFi is connected, how to switch to a USB connection: (do not need a USB cable, in the PC-side cmd Run)
Input in cmd: ADB usb
Can be converted into a USB connection. Connect the USB cable to use it.
ADB WiFi connection Phone