window中的WSL读取devices步骤:
-
在WSL中下载adb,可以通过windows下载linux版本,然后在WSL中进行安装
SDK Platform Tools 版本说明 | Android 开发者 | Android Developers (google.cn)
需要将该platform-tools_r xxxx
复制到WSL的目录中,我将其复制到了/android
中
然后使用adb version
查看版本号,如果可以查看到版本,则可以直接跳转到第4步;否则执行第3步骤
-
对adb解压,然后进行adb的指向
root@XXXX:/data# mkdir /android && cd /android
# 进行别名指定(下面的命令可以用,也可以不用)
root@XXXX:/data# echo "alias adb='/android/platform-tools/adb'" >> ~/.bash_aliases && source ~/.bash_aliases
root@XXXX:/data# echo "alias fastboot='/android/platform-tools/fastboot'" >> ~/.bash_aliases && source ~/.bash_aliases
-
如果使用adb devices
、fastboot devices
发现不了设备,可以使用adb.exe devices
、fastboot.exe devices
进行测试
-
note:此时需要WSL和windows本地的adb版本一致(使用adb verision查看版本号)
-
# WSL中的版本号:
xxx@xxx:~$ adb.exe version
Android Debug Bridge version 1.0.41
Version 33.0.2-8557947
Installed as D:\installPackage\platform-tools_r33.0.2-windows\platform-tools\adb.exe
xxx@xxx:~$ fastboot.exe --version
fastboot version 33.0.2-8557947
Installed as D:\installPackage\platform-tools_r33.0.2-windows\platform-tools\fastboot.exe
# windows中的版本号:
~xxx:~$ adb.exe version
Android Debug Bridge version 1.0.41
Version 33.0.2-8557947
Installed as D:\installPackage\platform-tools_r33.0.2-windows\platform-tools\adb.exe
~xxx:~$ fastboot --version
fastboot version 33.0.2-8557947
Installed as D:\installPackage\platform-tools_r33.0.2-windows\platform-tools\fastboot.exe
-
最后 adb.exe devices
读取设备
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)