本人需要wifi连接,具体如下:
1. 手机端开启adb tcp连接端口
:/$setprop service.adb.tcp.port 5555
:/$stop adbd
:/$start adbd
或者通过杀死adbd进程来重启,
$ps | grep adbd
$kill -9 进程id
其中setprop是用来设置系统属性的,这里不需要root权限,su即可。可通过adb shell设置,亦可通过手机上安装的Android terminal设置。
2. 电脑端的设置和使用
连接adb,其中phone_ipaddress和portnumber是指手机的ip和前面设置的监听端口号(如5555)
adb connect phone_ipaddress:portnumber
直接adb shell或adb -s 设备shell连接设备
如若要断开则如下:
adb disconnect phone_ipaddress:port
adb shell下查看wifi ip地址
$ netcfg
reference:http://www.cnblogs.com/rainduck/p/3577181.html