700字范文,内容丰富有趣,生活中的好帮手!
700字范文 > Linux / Windows Subsystem for Linux (WSL) 安装 ADB (Android Debug Bridge Android 调试桥)

Linux / Windows Subsystem for Linux (WSL) 安装 ADB (Android Debug Bridge Android 调试桥)

时间:2020-12-29 17:15:33

相关推荐

Linux / Windows Subsystem for Linux (WSL) 安装 ADB (Android Debug Bridge Android 调试桥)

Linux / Windows Subsystem for Linux (WSL) 安装 ADB (Android Debug Bridge,Android 调试桥)

Android 开发者网站

https://developer./

Android Studio

https://developer./studio

新变化

https://developer./studio/features

SDK Platform Tools

https://developer./studio/releases/platform-tools

Android Debug Bridge,Android 调试桥

/studio/command-line/adb

The Android Debug Bridge (adb) is a programming tool used for the debugging of Android-based devices. The daemon on the Android device connects with the server on the host PC over USB or TCP, which connects to the client that is used by the end-user over TCP.

Windows Subsystem for Linux (WSL) is a compatibility layer for running Linux binary executables (in ELF format) natively on Windows 10, Windows 11, and Windows Server .

0. 查看 Linux / Windows Subsystem for Linux (WSL) 系统是否安装 ADB

(base) yongqiang@yongqiang:~$ adbCommand 'adb' not found, but can be installed with:sudo apt install adb(base) yongqiang@yongqiang:~$

1. ADB 历史版本下载

Android SDK Platform Tools for Windows, Linux, Mac (all versions) - 历史版本下载

/download-android-sdk-platform-tools

wget /android/repository/platform-tools_r30.0.4-linux.zip && unzip platform-tools_r30.0.4-linux.zip

(base) yongqiang@yongqiang:~$ cd software/(base) yongqiang@yongqiang:~/software$ wget /android/repository/platform-tools_r30.0.4-linux.zip && unzip platform-tools_r30.0.4-linux.zip...(base) yongqiang@yongqiang:~/software$ ls -ltotal 120988-rwxr-xr-x 1 yongqiang yongqiang 66709754 Jul 22 Miniconda3-latest-Linux-x86_64.sh-rwxr-xr-x 1 yongqiang yongqiang 47611219 Aug 30 bazel-4.2.1-installer-linux-x86_64.shdrwxr-xr-x 1 yongqiang yongqiang512 Apr 30 21:08 platform-tools-rw-r--r-- 1 yongqiang yongqiang 9542280 Jul 31 platform-tools_r30.0.4-linux.zip(base) yongqiang@yongqiang:~/software$(base) yongqiang@yongqiang:~/software$ cd platform-tools/(base) yongqiang@yongqiang:~/software/platform-tools$ ls -ltotal 17408-rw-rw---- 1 yongqiang yongqiang 362313 Jul 17 NOTICE.txt-rwxrwxr-x 1 yongqiang yongqiang 7240408 Jul 17 adbdrwxrwx--- 1 yongqiang yongqiang512 Jul 17 api-rwxrwxr-x 1 yongqiang yongqiang 59624 Jul 17 dmtracedump-rwxrwxr-x 1 yongqiang yongqiang 1587192 Jul 17 e2fsdroid-rwxrwxr-x 1 yongqiang yongqiang 309840 Jul 17 etc1tool-rwxrwxr-x 1 yongqiang yongqiang 1946232 Jul 17 fastboot-rwxrwxr-x 1 yongqiang yongqiang 13648 Jul 17 hprof-convdrwxrwx--- 1 yongqiang yongqiang512 Jul 17 lib64-rwxrwxr-x 1 yongqiang yongqiang 254456 Jul 17 make_f2fs-rwxrwxr-x 1 yongqiang yongqiang 871544 Jul 17 mke2fs-rwxrwxr-x 1 yongqiang yongqiang 1157 Jul 17 mke2fs.conf-rwxrwxr-x 1 yongqiang yongqiang 1538336 Jul 17 sload_f2fs-rw-rw-r-- 1 yongqiang yongqiang38 Jul 17 source.properties-rwxrwxr-x 1 yongqiang yongqiang 1366560 Jul 17 sqlite3drwxrwx--- 1 yongqiang yongqiang512 Jul 17 systrace(base) yongqiang@yongqiang:~/software/platform-tools$

(base) yongqiang@yongqiang:~/software/platform-tools$ pwd/home/yongqiang/software/platform-tools(base) yongqiang@yongqiang:~/software/platform-tools$

Android Debug Bridge,ADB:Android 调试桥

2. 设置 Linux / Windows Subsystem for Linux (WSL) 环境变量

(base) yongqiang@yongqiang:~$ vim ~/.bashrc...# platform-tools_r30.0.4-linux.zipexport PATH="${PATH}:/home/yongqiang/software/platform-tools/"...(base) yongqiang@yongqiang:~$ cat ~/.bashrc...# platform-tools_r30.0.4-linux.zipexport PATH="${PATH}:/home/yongqiang/software/platform-tools/"...(base) yongqiang@yongqiang:~$ source ~/.bashrc

3. 查看 Linux / Windows Subsystem for Linux (WSL) 系统是否成功安装 ADB

(base) yongqiang@yongqiang:~$ adb versionAndroid Debug Bridge version 1.0.41Version 30.0.4-6686687Installed as /home/yongqiang/software/platform-tools/adb(base) yongqiang@yongqiang:~$

(base) yongqiang@yongqiang:~$ adb shellHWDUK:/ $ cd /data/local/tmp/HWDUK:/data/local/tmp $ ls -ltotal 0HWDUK:/data/local/tmp $ exit(base) yongqiang@yongqiang:~$

4. Windows 启动 adb server

C:\Users\cheng>adb versionAndroid Debug Bridge version 1.0.41Version 30.0.4-6686687Installed as D:\Program Files\platform-tools\adb.exeC:\Users\cheng>C:\Users\cheng>adb devicesList of devices attachedFFKDU17A28006357 deviceC:\Users\cheng>C:\Users\cheng>adb -a nodaemon serveradb F 08-29 18:13:43 14532 12896 main.cpp:153] could not install *smartsocket* listener: cannot bind to 0.0.0.0:5037: 閫氬父姣忎釜濂楁帴瀛楀湴鍧€(鍗忚/缃戠粶鍦板潃/绔彛)鍙厑璁镐娇鐢ㄤ竴娆°€?(10048)C:\Users\cheng>C:\Users\cheng>adb kill-serverC:\Users\cheng>C:\Users\cheng>adb -a nodaemon serveradb I 04-30 19:53:44 15496 12640 auth.cpp:417] adb_auth_init...adb I 04-30 19:53:44 15496 12640 auth.cpp:152] loaded new key from 'C:\Users\cheng\.android\adbkey' with fingerprint C003CF5AD89F690A49BB31A1FB606378F31F0772F9ED77D67B67921478710B0Eadb I 04-30 19:53:44 15496 10268 transport.cpp:325] FFKDU17A28006357: read thread spawningadb I 04-30 19:53:44 15496 13656 transport.cpp:297] FFKDU17A28006357: write thread spawningadb I 04-30 19:53:44 15496 12640 transport.cpp:1527] fetching keys for transport FFKDU17A28006357adb I 04-30 19:53:44 15496 12640 auth.cpp:469] Calling send_auth_responseadb I 04-30 19:53:44 15496 12640 adb.cpp:124] FFKDU17A28006357: offline

5. Linux / Windows Subsystem for Linux (WSL) 连接 devices

(base) yongqiang@yongqiang:~$ adb -H 192.168.0.109 devicesList of devices attachedFFKDU17A28006357 device(base) yongqiang@yongqiang:~$(base) yongqiang@yongqiang:~$ adb -H 192.168.0.109 shellHWDUK:/ $ cd /data/local/tmp/HWDUK:/data/local/tmp $ ls -ltotal 0HWDUK:/data/local/tmp $ exit(base) yongqiang@yongqiang:~$

References

https://yongqiang./

/

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。