用网络adb连接调试Android
准备活动:
1android设备和 开发机电脑连接到同一个网段下
2 参看android设备 的ip地址,在开发机的cmd命令行里ping通android设备
3 android设备 上安装终端软件:terminal-emulator
http://android-terminal-emulator.cn.uptodown.com/android
http://dw1.cn.uptodown.com/dw/1392880265/2a3952a33f9eb5b1ef131ebf6223deb6d0069fbb/android-terminal-emulator-1-0-54-en-android.apk
终端查设备IP
打开终端软件,使用命令:
setprop service.adb.tcp.port 5555
#设置adbd的网络端口号,开发机的adb将访问此端口
stop adbd
#停止adbd,这样adbd被关闭
start adbd
#启动adbd
,这样adbd被开启
参考资料:http://ice-k.iteye.com/blog/1242746
@或者直接开启 开发者选项,“允许USB调试”也有相同作用
@有可能必须到root下才能 使上面的设置命令生效
4为了方便操作adt的adb.exe,把adb.exe的路径放到系统环境变量里:
windows->系统环境变量:
新建 变量:android,值: ...adt\adt-bundle-windows-...\sdk\tools;...adt\adt-bundle-windows-...\sdk\platform-tools
修改变量Path:末尾附加新值 ;%android%
确定 保存设置
然后运行 cmd,使用命令 adb,如果有输出结果 表示此步配置成功
参考资料:http://jingyan.baidu.com/article/17bd8e52f514d985ab2bb800.html
5 用开发机的adb连接设备的adbd:
cmd命令:adb connect <android设备ip>
如果得到结果:connected to<android设备ip>:5555 恭喜你成功了,看看eclipse的DDMS,好熟悉的场景
更多相关文章
- Android(安卓)测试技能树
- Android(安卓)Fastboot
- Android判断当前的android设备是否处于联网状态
- Android(安卓)中文API (66) ―― BluetoothClass.Device
- adb 全部命令
- android搭建环境错误 daemon not running. starting it now on p
- android UDID获取:android 设备SN的获取 续 android 设备唯一码的
- 解决 Android模拟器无法上网问题——Host is unresolved
- 访问本地服务器