Connect to adb debugging via WiFi

Connect to adb debugging via WiFi

        Solve cannot connect to 192.168.1.136:5555: Cannot connect because the target computer actively refused it. (10061)

Solution 1 (execute in cmd environment under Windows)

1. Connect the USB data cable and turn on USB debugging

        Use the "Run" command line method of windows: (This method needs to configure the adb environment variable, or directly enter the adb tool directory to execute \android-sdk-windows\platform-tools\)

cmd environment execution

# 配置adb服务的端口号为 5555 会自动重启设备端的adb服务
adb tcpip 5555
# 通过tcpip连接Android设备,可通过在设备端的shell环境执行 ifconfig 命令查看IP
adb connect 192.168.1.136
# 切换到数据线连接USB调试
adb usb

Solution 2

        Solve the "unable to connect to 192.168.1.136:5555" error that occurs on some machines in method 1.
Install "terminal emulator" and other similar shell command tools on the android device, use the following command (requires root authority),
or connect the Android device through the serial port tool.

Configure the adb service (executed in the Android device shell environment)

setprop service.adb.tcp.port 5555
stop adbd
start adbd

Connect the device (executed in Windows cmd environment)

adb connect 192.168.1.136

Switch to the data cable to connect to USB debugging

# Android设备shell环境执行
setprop service.adb.tcp.port -1
stop adbd
start adbd

Guess you like

Origin blog.csdn.net/liuqinhou/article/details/129499423