android adb网络连接方法
2011-04-19 13:51
218 查看
http://hi.baidu.com/ylfan2006/blog/item/d565481a128d845543a9adeb.html
在android里,adb一般使用USB连接,但是很多时候,可能只有一个设备终端,但是需要多于一个用户连接设备调试,因此使用网络连接将是必要的,下面介绍网络连接的方法:
1、设备端
首先查看设备上的进程列表,是不是adbd进程在运行:
981 0 0 SW< [rpciod/0]
1762 0 1996 S /system/busybox/bin/ash
1763 1000 796 S /system/bin/servicemanager
1764 0 824 S /system/bin/vold
1765 0 656 S /system/bin/debuggerd
1766 1001 4396 S /system/bin/rild
1768 1013 18084 S /system/bin/mediaserver
1769 1002 1092 S /system/bin/dbus-daemon --system --nofork
1770 0 784 S /system/bin/installd
1771 1017 1616 S /system/bin/keystore /data/misc/keystore
3798 0 3368 S /sbin/adbd
可以看出adbd已经在运行了,停掉adbd:
stop adbd
然后设置adbd使用的tcp端口:
# setprop service.adb.tcp.port 5555
/ # start adbd
使用netstat -l 查看:
/ # netstat -l
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 127.0.0.1:5037 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:5555 0.0.0.0:* LISTEN
可见adbd在5555端口已经实现监听;
2、host端:
./adb connect 192.168.1.12:5555
connected to 192.168.1.12:5555
说明已经连接上设备;然后执行:
./adb shell
就可以使用shell调试设备端的程序了
在android里,adb一般使用USB连接,但是很多时候,可能只有一个设备终端,但是需要多于一个用户连接设备调试,因此使用网络连接将是必要的,下面介绍网络连接的方法:
1、设备端
首先查看设备上的进程列表,是不是adbd进程在运行:
981 0 0 SW< [rpciod/0]
1762 0 1996 S /system/busybox/bin/ash
1763 1000 796 S /system/bin/servicemanager
1764 0 824 S /system/bin/vold
1765 0 656 S /system/bin/debuggerd
1766 1001 4396 S /system/bin/rild
1768 1013 18084 S /system/bin/mediaserver
1769 1002 1092 S /system/bin/dbus-daemon --system --nofork
1770 0 784 S /system/bin/installd
1771 1017 1616 S /system/bin/keystore /data/misc/keystore
3798 0 3368 S /sbin/adbd
可以看出adbd已经在运行了,停掉adbd:
stop adbd
然后设置adbd使用的tcp端口:
# setprop service.adb.tcp.port 5555
/ # start adbd
使用netstat -l 查看:
/ # netstat -l
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 127.0.0.1:5037 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:5555 0.0.0.0:* LISTEN
可见adbd在5555端口已经实现监听;
2、host端:
./adb connect 192.168.1.12:5555
connected to 192.168.1.12:5555
说明已经连接上设备;然后执行:
./adb shell
就可以使用shell调试设备端的程序了
相关文章推荐
- android adb网络连接方法
- 开启android板子的adb网络连接
- 判断Android网络是否连接方法
- android adb网络调试 Android中使用WIFI来连接ADB 简单100%成功
- Android adb 不能通过网络调试的解决方法
- Android模拟器中无法连接网络的问题解决方法
- Android 网络调试 adb tcpip 开启方法
- Android判断设备网络连接状态及判断连接方式的方法
- Android 设备adb连接后unauthorized解决方法
- adb通过wifi连接android设备的方法
- ADB连接Android设备的三种方法
- 【Android Training - Connectivity】基本网络操作 [ Lesson 2 - 管理网络连接的常用方法 ]
- Ubuntu中Android手机连接adb最简单的方法
- adb连接Android 4.2.2版本手机时出现offline或unauthorized问题的解决方法
- Ubuntu下调试Android真机连接ADB的方法
- Ubuntu使用adb连接android手机失败unknown的解决的方法
- [Android]去除程序中广告的好方法:告诉广告没有网络连接
- Android中检测网络连接状况的方法
- Android监听网络连接状态方法
- android有关网络连接的方法