一、Windows电脑连接Android设备,需要安装adb

1、下载platform-tools包,解压到C盘

https://dl.google.com/android/repository/platform-tools_r31.0.0-windows.zip

2、在系统属性》环境变量》系统变量》path变量中,点击新建把路径C:\platform-tools添加上就行了

二、安卓设备连击系统版本号开启开发者选项,进入开发者选项打开USB调试功能,两种连接方式如下

win键+r键,打开运行,输入cmd打开

1、数据线连接

使用有数据传输功能USB线连接电脑和安卓设备

PS C:\Users\user> adb devices
* daemon not running; starting now at tcp:5037
* daemon started successfully
List of devices attached
WSINEGRFJM      device

PS C:\Users\user> adb root
restarting adbd as root

PS C:\Users\user> adb remount
remount succeeded

PS C:\Users\user> adb shell
rk3288:/ #

2、网络连接,Windows电脑和安卓设备在同一个网络中,例如连接到同一台交换机或者无线路由器,查看安卓设备的IP地址,现在电脑上ping一下能不能ping通

PS C:\Users\ilc0305> ping 192.168.88.169
正在 Ping 192.168.88.169 具有 32 字节的数据:
来自 192.168.88.169 的回复: 字节=32 时间=1ms TTL=64
来自 192.168.88.169 的回复: 字节=32 时间=1ms TTL=64
来自 192.168.88.169 的回复: 字节=32 时间=1ms TTL=64
来自 192.168.88.169 的回复: 字节=32 时间=1ms TTL=64
192.168.88.169 的 Ping 统计信息:
    数据包: 已发送 = 4,已接收 = 4,丢失 = 0 (0% 丢失),
往返行程的估计时间(以毫秒为单位):
    最短 = 1ms,最长 = 1ms,平均 = 1ms

PS C:\Users\user> adb connect 192.168.88.169
connected to 192.168.88.169:5555

PS C:\Users\user> adb devices
List of devices attached
WSINEGRFJM      device
192.168.88.169:5555     device

PS C:\Users\user> adb -s 192.168.88.169 root
adbd is already running as root

PS C:\Users\user> adb -s 192.168.88.169 remount
remount succeeded

PS C:\Users\user> adb -s 192.168.88.169 shell
root@rk322x_box:/ #

 

Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐