我必须使用命令行在我的 Linux ubuntu 上安装 adb 工具,但是当我执行命令时adb devices
,我的终端中出现了这样的返回信息:
uriel@uriel-linux-ubuntu:~$ adb devices
List of devices attached
adb server version (41) doesn't match this client (39); killing...
ADB server didn't ACK
Full server startup log: /tmp/adb.1000.log
Server had pid: 8577
--- adb starting (pid 8577) ---
adb I 02-28 16:19:21 8577 8577 main.cpp:57] Android Debug Bridge version 1.0.39
adb I 02-28 16:19:21 8577 8577 main.cpp:57] Version 1:8.1.0+r23-5ubuntu2
adb I 02-28 16:19:21 8577 8577 main.cpp:57] Installed as /usr/lib/android-sdk/platform-tools/adb
adb I 02-28 16:19:21 8577 8577 main.cpp:57]
adb I 02-28 16:19:21 8577 8577 adb_auth_host.cpp:416] adb_auth_init...
adb I 02-28 16:19:21 8577 8577 adb_auth_host.cpp:174] read_key_file '/home/uriel/.android/adbkey'...
adb I 02-28 16:19:21 8577 8577 adb_auth_host.cpp:391] adb_auth_inotify_init...
adb server killed by remote request
failed to start daemon
error: cannot connect to daemon
uriel@uriel-linux-ubuntu:~$
我该如何解决这个问题?
答案1
请以 root 身份安装 adb。
然后在 /root/.bashrc 中:将 adb 添加到路径。记得正确更新 adb 安装的路径。
启动一个新的 bash shell 并再次尝试“adb devices”。
祝你好运 !