交叉编译 asop android adb 最新版的问题 - V2EX
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
ChainLock
V2EX    C++

交叉编译 asop android adb 最新版的问题

  •  
  •   ChainLock 34 天前 1173 次点击
    这是一个创建于 34 天前的主题,其中的信息可能已经有所发展或是发生改变。

    目标:交叉编译 android adb,放到嵌入式板子上面执行

    android 源码已经下载好

    mkdir -p ~/.bin PATH="${HOME}/.bin:${PATH}" curl https://storage.googleapis.com/git-repo-downloads/repo > ~/.bin/repo chmoda+rx ~/.bin/repo repo init --partial-clone -b android-latest-release -u https://android.googlesource.com/platform/manifest repo sync -c -j8 

    packages/modules/adb 目录下面新版的 asop 已经没有 Android.mk,只有 Android.bp

    已经跟 chatgpt 对线了 3 天,依旧没有搞出来,望搞过来的大佬指点一下,必须得用新版来编译,我在 csdn 参考了这编文章 aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2Rpc2FwcGVhcnNfbmljay9hcnRpY2xlL2RldGFpbHMvMTE3MDMxNzQz

    可以交叉编译成功,版本是 1.0.31,最新版本已经是 1.0.41,将编译好 adb 放到板子上面运行时

    adb connect 128.0.12.109:5555 connected to 128.0.12.109:5555 adb devices List of devices attached 128.0.12.109:5555 offline 一直是离线状态,导致不可用 
    6 条回复    2025-09-11 11:30:39 +08:00
    CFM880
        1
    CFM880  
       34 天前
    https://github.com/lzhiyong/android-sdk-tools

    这个试试看看,这个里面的 release 正好是 1.0.41 的,先用用看

    其实 google 搜索 android tools aarch64 应该就有


    ```shell
    [cfm880@alarm ~]$ cd Downloads/android-sdk-tools-static-aarch64
    [cfm880@alarm android-sdk-tools-static-aarch64]$ ls
    build-tools others platform-tools
    [cfm880@alarm android-sdk-tools-static-aarch64]$ cd platform-tools/
    [cfm880@alarm platform-tools]$ file adb
    adb: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, for Android 30, built by NDK r27b (0), not stripped
    [cfm880@alarm platform-tools]$ ./adb
    Android Debug Bridge version 1.0.41
    Version 35.0.2-
    Installed as /home/cfm880/Downloads/android-sdk-tools-static-aarch64/platform-tools/adb
    Running on Linux 6.14.0-1-nabu-gdefb39db31e6-dirty (aarch64)

    ```
    ChainLock
        2
    ChainLock  
    OP
       34 天前
    @CFM880 我试了一下,将可执行程序上传到板子上面,运行不了

    adb start-server
    * daemon not running; starting now at tcp:5037
    ADB server didn't ACK
    Full server startup log: /tmp/adb.0.log
    Server had pid: 21740
    --- adb starting (pid 21740) ---
    01-02 20:03:58.717 21740 21740 I adb : main.cpp:63 Android Debug Bridge version 1.0.41
    01-02 20:03:58.717 21740 21740 I adb : main.cpp:63 Version 35.0.2-
    01-02 20:03:58.717 21740 21740 I adb : main.cpp:63 Installed as /home/input/adb
    01-02 20:03:58.717 21740 21740 I adb : main.cpp:63 Running on Linux 5.10.0 (aarch64)
    01-02 20:03:58.717 21740 21740 I adb : main.cpp:63
    01-02 20:03:58.719 21740 21740 I adb : auth.cpp:416 adb_auth_init...
    01-02 20:03:58.720 21740 21740 I adb : auth.cpp:220 User key '/root/.android/adbkey' does not exist...
    01-02 20:03:58.720 21740 21740 I adb : auth.cpp:64 generate_key(/root/.android/adbkey)...
    01-02 20:03:59.108 21740 21740 I adb : auth.cpp:152 loaded new key from '/root/.android/adbkey' with fingerprint B9D47D55AB7EC3441039C376A8805FF3170D1A212B7DB9DE36680EF93CA5D7AC
    01-02 20:03:59.108 21740 21740 I adb : auth.cpp:391 adb_auth_inotify_init...
    fdsan: failed to exchange ownership of file descriptor: fd 11 is owned by unique_fd 0x7e4e407e78, was expected to be unowned
    libc: fdsan: failed to exchange ownership of file descriptor: fd 11 is owned by unique_fd 0x7e4e407e78, was expected to be unowned

    * failed to start daemon
    error: cannot connect to daemon
    /home/input # cat /tmp/adb.0.log
    --- adb starting (pid 13449) ---
    01-02 19:59:30.372 13449 13449 I adb : main.cpp:63 Android Debug Bridge version 1.0.41
    01-02 19:59:30.372 13449 13449 I adb : main.cpp:63 Version 35.0.2-
    01-02 19:59:30.372 13449 13449 I adb : main.cpp:63 Installed as /home/input/adb
    01-02 19:59:30.372 13449 13449 I adb : main.cpp:63 Running on Linux 5.10.0 (aarch64)
    01-02 19:59:30.372 13449 13449 I adb : main.cpp:63
    01-02 19:59:30.374 13449 13449 I adb : auth.cpp:416 adb_auth_init...
    01-02 19:59:30.375 13449 13449 I adb : auth.cpp:152 loaded new key from '/root/.android/adbkey' with fingerprint 92B5D8B6EA2917C3776C2AFDE0BF27B4DE42B88990FE0E5B10C74497111E43ED
    01-02 19:59:30.375 13449 13449 I adb : auth.cpp:391 adb_auth_inotify_init...
    fdsan: failed to exchange ownership of file descriptor: fd 11 is owned by unique_fd 0x7f161cf158, was expected to be unowned
    libc: fdsan: failed to exchange ownership of file descriptor: fd 11 is owned by unique_fd 0x7f161cf158, was expected to be unowned
    --- adb starting (pid 1247) ---
    01-02 20:00:21.829 1247 1247 I adb : main.cpp:63 Android Debug Bridge version 1.0.41
    01-02 20:00:21.829 1247 1247 I adb : main.cpp:63 Version 35.0.2-
    01-02 20:00:21.829 1247 1247 I adb : main.cpp:63 Installed as /home/input/adb
    01-02 20:00:21.829 1247 1247 I adb : main.cpp:63 Running on Linux 5.10.0 (aarch64)
    01-02 20:00:21.829 1247 1247 I adb : main.cpp:63
    01-02 20:00:21.831 1247 1247 I adb : auth.cpp:416 adb_auth_init...
    01-02 20:00:21.832 1247 1247 I adb : auth.cpp:152 loaded new key from '/root/.android/adbkey' with fingerprint 92B5D8B6EA2917C3776C2AFDE0BF27B4DE42B88990FE0E5B10C74497111E43ED
    01-02 20:00:21.832 1247 1247 I adb : auth.cpp:391 adb_auth_inotify_init...
    fdsan: failed to exchange ownership of file descriptor: fd 11 is owned by unique_fd 0x7f63825398, was expected to be unowned
    libc: fdsan: failed to exchange ownership of file descriptor: fd 11 is owned by unique_fd 0x7f63825398, was expected to be unowned
    --- adb starting (pid 21740) ---
    01-02 20:03:58.717 21740 21740 I adb : main.cpp:63 Android Debug Bridge version 1.0.41
    01-02 20:03:58.717 21740 21740 I adb : main.cpp:63 Version 35.0.2-
    01-02 20:03:58.717 21740 21740 I adb : main.cpp:63 Installed as /home/input/adb
    01-02 20:03:58.717 2740 21740 I adb : main.cpp:63 Running on Linux 5.10.0 (aarch64)
    01-02 20:03:58.717 21740 21740 I adb : main.cpp:63
    01-02 20:03:58.719 21740 21740 I adb : auth.cpp:416 adb_auth_init...
    01-02 20:03:58.720 21740 21740 I adb : auth.cpp:220 User key '/root/.android/adbkey' does not exist...
    01-02 20:03:58.720 21740 21740 I adb : auth.cpp:64 generate_key(/root/.android/adbkey)...
    01-02 20:03:59.108 21740 21740 I adb : auth.cpp:152 loaded new key from '/root/.android/adbkey' with fingerprint B9D47D55AB7EC3441039C376A8805FF3170D1A212B7DB9DE36680EF93CA5D7AC
    01-02 20:03:59.108 21740 21740 I adb : auth.cpp:391 adb_auth_inotify_init...
    fdsan: failed to exchange ownership of file descriptor: fd 11 is owned by unique_fd 0x7e4e407e78, was expected to be unowned
    libc: fdsan: failed to exchange ownership of file descriptor: fd 11 is owned by unique_fd 0x7e4e407e78, was expected to be unowned
    CFM880
        3
    CFM880  
       34 天前
    那下载这个吧

    https://archlinuxarm.org/packages/aarch64/android-tools

    下载下来解压就有了

    我试了这个可以
    ChainLock
        4
    ChainLock  
    OP
       33 天前
    @CFM880 #3 佬,你是用什么板卡去做测试的
    CFM880
        5
    CFM880  
       31 天前
    小米平板 5 的 archlinuxarm
    ChainLock
        6
    ChainLock  
    OP
       28 天前
    @CFM880 #5 佬,可以加 wx 聊一下吗,b3dpX2NpdHk=

    还是有点问题想请教一下
    关于     帮助文档     自助推广系统     博客     API     FAQ     Solana     1002 人在线   最高记录 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 23ms UTC 18:13 PVG 02:13 LAX 11:13 JFK 14:13
    Do have faith in what you're doing.
    ubao snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86