当前位置:   article > 正文

【Android】手机连接电脑的2种方式->usb有线连接/adb tcpip无线连接_在android系统下,将tcp设置成usb adb 通讯

在android系统下,将tcp设置成usb adb 通讯

1、有线连接

usb线,连接手机和电脑

2、无线连接(adb tcpip)

前提条件:

电脑和手机在同一个局域网下,
连接同一个wifi即可
  • 1
  • 2

(1)先使用 usb 线连接手机和电脑,设置手机 tcp 连接端口为5555

➜  /Users/xxx
> adb tcpip 5555
restarting in TCP mode port: 5555
  • 1
  • 2
  • 3

(2)确定手机 ip 地址
在这里插入图片描述

(3)断开 usb 线,使用 tcpip 连接手机

➜  /Users/xxx
> adb connect 172.16.133.61:5555
connected to 172.16.133.61:5555
  • 1
  • 2
  • 3

查看连接状态:

➜  /Users/xxx
> adb devices
List of devices attached
172.16.133.61:5555	device
  • 1
  • 2
  • 3
  • 4

然后就可以在无线状态下,随意使用adb命令了。

(4)断开 tcpip 连接

➜  /Users/xxx
> adb disconnect 172.16.133.61:5555
disconnected 172.16.133.61:5555
  • 1
  • 2
  • 3

查看连接状态:

➜  /Users/xxx
> adb devices
List of devices attached
  • 1
  • 2
  • 3

完成✅

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/你好赵伟/article/detail/248300
推荐阅读
相关标签
  

闽ICP备14008679号