【问题标题】:Why is my .android folder not automatically generating the adbkey and other files? (ADB)为什么我的 .android 文件夹不会自动生成 adbkey 和其他文件? (亚行)
【发布时间】:2020-04-19 04:47:35
【问题描述】:

我正在尝试在我的树莓派上使用 adb,但我的 .android 文件夹是空的(ls 显示文件夹内没有任何内容)。

我这几天一直在寻找解决方案,发现我的.android 文件夹完全是空的,即使它应该包含以下文件:

adbkeyadbkey.pubandroidwin.cfgavdcacherepositories.cfgsites-settings.cf

由于我的 .android 文件夹为空,每当我尝试使用 adb start-server(或任何其他 adb 命令)时都会收到以下错误:

* daemon not running; starting now at tcp:5037 ADB server didn't ACK Full server startup long: /tmp/adb.1000.log Server had pid: 2036 --- adb starting (pid 2036) --- adb I 05-18 12:15:21 2036 2036 main.cpp:57] Android Debug Bridge version 1.0.39 adb I 05-18 12:15:21 2036 2036 main.cpp:57] Version 1:8.1.0+r23-5~18.04 adb I 05-18 12:15:21 2036 2036 main.cpp:57] Installed as /usr/lib/android-sdk/platform-tools/adb adb I 05-18 12:15:21 2036 2036 main.cpp:57] adb I 05-18 12:15:21 2036 2036 main.cpp:57] adb_auth_init adb I 05-18 12:15:21 2036 2036 main.cpp:57] User key '/home/username/.android/adbkey' does not exist... adb I 05-18 12:15:21 2036 2036 main.cpp:57] generate_key (/home/username/.android/adbkey)... * failed to start daemon error: cannot connect to daemon

守护程序拒绝启动,因为.android 文件夹中的adbkey 文件(和上面列出的其他文件)没有按应有的方式自动生成。

我该如何解决这个问题?我已经尝试了可以​​在 Stack 论坛上找到的所有解决方案,但似乎没有任何效果。我怀疑这与我的 .android 文件夹的权限有关,但我不确定我到底需要更改什么。我曾多次尝试重新启动我的 Raspberry Pi。我非常卡住,如果能得到任何帮助,我将不胜感激。

【问题讨论】:

    标签: android ubuntu command-line raspberry-pi adb


    【解决方案1】:

    前言:我对 Raspbian 没有直接经验,但我在 ARM 上使用 Debian 有一段时间了。

    这似乎是一个关于如何在 ARM 设备上为 Debian Buster 构建 adb 的历史问题。如果您运行adb keygen keyfile.pub,您很可能会看到报告消息:Bus error。似乎使用过时的库来构建用于armhf 架构的版本。 This post on ODROID explains the situation a bit further.

    那么,我们如何解决这个问题?据我所知,测试或不稳定的存储库中没有更新版本的adb。您有 3 个解决方案:使用发行版之外的包,从包中的源代码编译您的包,或使用旧版本的 adb。在这里,我会推荐后者。

    Solution adapted from an issue on another ARM port of debian

    要修复它,请在 /etc/apt/sources.list 中添加拉伸作为源(通过 Raspbian documentation

    # deb http://archive.raspbian.org/raspbian stretch main

    然后降级adb:

    # apt update
    # apt install adb=1:7.0.0+r33-1 android-libadb=1:7.0.0+r33-1 android-libbase=1:7.0.0+r33-1 android-liblog=1:7.0.0+r33-1 android-libcutils=1:7.0.0+r33-1
    

    这应该可以为您解决问题。

    【讨论】:

      【解决方案2】:

      卸载下面列出的软件包的当前版本(1:8.1.xxxx)并安装旧版本应该可以解决问题。

      sudo apt install adb=1:7.0.0+r33-2 android-libadb=1:7.0.0+r33-2 android-libbase=1:7.0.0+r33-2 android-liblog=1:7.0 .0+r33-2 android-libcutils=1:7.0.0+r33-2

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2020-08-28
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2023-03-20
        • 2013-10-10
        • 1970-01-01
        相关资源
        最近更新 更多