在可执行脚本中,我需要将路径添加到 adb 二进制文件中,如下所示
# 1. Configure where your ADB binary is installed
export AdbCmd="<Path_to_ADB_Binary>"
Run Code Online (Sandbox Code Playgroud)
那么Ubuntu 12.10中的路径是什么?
ubuntu 上 adb 二进制安装的默认路径:
/usr/share/android-sdk/platform-tools/adb
Run Code Online (Sandbox Code Playgroud)
您也可以从终端找到路径:
locate android-sdk/platform-tools/adb
Run Code Online (Sandbox Code Playgroud)
无论您使用哪种操作系统。它总是在android-sdk/platform-tools/
要查找特定二进制安装的路径,请打开终端并运行。
locate <name of binary> | grep bin
例如。
locate adb | grep bin
这将给出如下输出。
aditya@aditya-desktop:~$locate adb |grep bin
/home/ubuntu-builder/FileSystem/sbin/badblocks
/home/ubuntu-builder/FileSystem/usr/bin/mbadblocks
/sbin/badblocks
/usr/bin/adb
/usr/bin/mbadblocks
Run Code Online (Sandbox Code Playgroud)
从此列表中,您可以使用所需的路径。
注意:-定位不是实时的。如果您安装 adb 然后使用locate,它将找不到二进制文件。您首先需要更新(或等待其更新)所使用的数据库。在locate这种情况下whereis可以使用。
要使用whereis,请打开终端并输入
whereis <name of binary>
Run Code Online (Sandbox Code Playgroud)
例如。
whereis adb
Run Code Online (Sandbox Code Playgroud)
这将给出如下输出。
aditya@aditya-desktop:~$ whereis adb
adb: /usr/bin/adb /usr/bin/X11/adb /usr/share/man/man1/adb.1.gz
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
31390 次 |
| 最近记录: |