APK:网络adb
安卓设备跟电脑需处于同一局域网内,可以使用有线网的方式,或是让电脑跟安卓设备连接在同一wifi路由下,亦可通过电脑创建wifi热点让安卓设备连接都可以
一.网络adb
1.1.device\rockchip\common\init.rk30board.rc
# for Internet adb on property:netadb.status=true setprop service.adb.tcp.port 5555 restart adbd # for Internet adb on property:netadb.status=false setprop service.adb.tcp.port 0 restart adbd
1.2.连接
adb kill-server adb start-server 端口 adb connect 192.168.1.1:5555 adb disconnect 192.168.1.1 切回usb模式 adb usb
二.RootCommand
//开 RootCommand("stop adbd"); RootCommand("setprop service.adb.tcp.port 5555"); RootCommand("start adbd"); //关 RootCommand("stop adbd"); RootCommand("setprop service.adb.tcp.port 5555"); RootCommand("start adbd");