本文以Mate 30 Pro为例,使用adb工具实现网络连接
明确手机此时的IP地址

在开发者选项中启用调试

打开一个terminal,输入命令
adb connect 192.168.31.69:5555
报错unable to connect to 192.168.31.69:8880: Connection refused
这时如果报错连接被重置,ping一下这个地址,确认连接正常
ping 192.168.31.69

手机用线连接电脑后使用adb命令更改端口

这时手机上会要求授权

端口号理论上可以改成0-65535,选择你的幸运数字
使用网络调试
拔掉数据线,再试一次网络调试,有可能要求重新授权
