aarch64_Ubuntu (Linux)连不上adb解决方法

1、已经安装了adb tools

sudo apt install -y android-tools-adb android-tools-fastboot

bash 复制代码
root@ubuntu://# sudo adb kill-server
root@ubuntu://# adb start-server
error: device offline
root@ubuntu://# adb devices -l
List of devices attached
error: device offline
root@ubuntu://# sudo adb kill-server && adb start-server
error: device offline
root@ubuntu://# adb devices -l
List of devices attached
error: device offline

这种情况也不是udev规则的问题也不是驱动问题。

2、验证 USB 链路

手机连arm ubuntu主机,开启开发者模式

bash 复制代码
root@ubuntu://# lsusb
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 005 Device 002: ID 18d1:4e11 Google Inc. Nexus One
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 003: ID 046d:c542 Logitech, Inc.
Bus 001 Device 002: ID 1a40:0101 Terminus Technology Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 004: ID 2207:1005 Fuzhou Rockchip Electronics Company rk3xxx
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
root@ubuntu://#

lsusb查到的检测到了手机 Bus 005 Device 002: ID 18d1:4e11 Google Inc. Nexus One

说明usb线没问题,adb调试也开启的,主机也识到了,物理层面没任何问题,那么就是软件的问题。

3、查看USB 设备详细信息

bash 复制代码
root@ubuntu://# lsusb -v -s 005:002

Bus 005 Device 002: ID 18d1:4e11 Google Inc. Nexus One
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.10
  bDeviceClass            0
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x18d1 Google Inc.
  idProduct          0x4e11 Nexus One
  bcdDevice            5.15
  iManufacturer           1 Xiaomi
  iProduct                2 Xiaomi 13
  iSerial                 3 a26a26b9
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x0020
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          4 mtp
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass     66
      bInterfaceProtocol      1
      iInterface              5 ADB Interface
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
Binary Object Store Descriptor:
  bLength                 5
  bDescriptorType        15
  wTotalLength       0x002a
  bNumDeviceCaps          3
  USB 2.0 Extension Device Capability:
    bLength                 7
    bDescriptorType        16
    bDevCapabilityType      2
    bmAttributes   0x0000211e
      BESL Link Power Management (LPM) Supported
    BESL value      256 us
    Deep BESL value     8192 us
  SuperSpeed USB Device Capability:
    bLength                10
    bDescriptorType        16
    bDevCapabilityType      3
    bmAttributes         0x00
    wSpeedsSupported   0x000f
      Device can operate at Low Speed (1Mbps)
      Device can operate at Full Speed (12Mbps)
      Device can operate at High Speed (480Mbps)
      Device can operate at SuperSpeed (5Gbps)
    bFunctionalitySupport   1
      Lowest fully-functional device speed is Full Speed (12Mbps)
    bU1DevExitLat           0 micro seconds
    bU2DevExitLat           0 micro seconds
  SuperSpeedPlus USB Device Capability:
    bLength                20
    bDescriptorType        16
    bDevCapabilityType     10
    bmAttributes         0x00000001
      Sublink Speed Attribute count 1
      Sublink Speed ID count 0
    wFunctionalitySupport   0x1100
    bmSublinkSpeedAttr[0]   0x000a4030
      Speed Attribute ID: 0 10Gb/s Symmetric RX SuperSpeedPlus
    bmSublinkSpeedAttr[1]   0x000a40b0
      Speed Attribute ID: 0 10Gb/s Symmetric TX SuperSpeedPlus
can't get debug descriptor: Resource temporarily unavailable
Device Status:     0x0000
  (Bus Powered)
root@ubuntu://#

lsusb -v -s 005:002

输出的信息表明硬件层面完全识别到安卓设备xiaomi 13,且ADB 接口正常注册,现在error: device offline是纯软件层面的授权 / ADB 通信问题;和硬件、驱动、USB 线 / 接口完全无关。

4、kill掉ADB进程 sudo pkill -9 adb

删除root和用户的ADB密钥目录 sudo rm -rf /root/.android /home/wang/.android

检查一下是否删除 ls /root/.android 2>/dev/null || echo "已删除"

5、以root权限启动ADB服务 sudo adb start-server

手机端点击信任设备就可以了。

bash 复制代码
root@ubuntu://# adb shell
fuxi:/ $ getprop ro.product.model
2211133C
fuxi:/ $ getprop ro.build.version.release
16
fuxi:/ $ uname -a
Linux localhost 5.15.178-android13-8-00021-g6f2f96be86b9-ab13729987 #1 SMP PREEMPT Wed Jul 2 02:41:59 UTC 2025 aarch64 Toybox
fuxi:/ $
相关推荐
Fu2067211 天前
第一阶段项目
linux·服务器·网络
女神下凡2 天前
芯参谋(119):凌阳(Sunplus)_开发指南
linux·arm开发·stm32·单片机·嵌入式硬件
落羽的落羽2 天前
【C++】现代容器: tuple、optional、variant、any、string_view
linux·开发语言·数据结构·c++·人工智能·计算机网络·算法
木子欢儿2 天前
Ubuntu 26.04 LTS 安装Python 3.12
linux·运维·服务器·python·ubuntu
时间的拾荒人2 天前
Linux 库的制作与使用(下):链接、加载与动态链接原理
linux·运维·动态库·静态库
FlightYe2 天前
音视频修炼之容器与协议(六):HTTP 协议
android·linux·网络·网络协议·算法·http·音视频
-梅2 天前
linux(番外)线程,锁,条件变量封装;日志与线程池
linux·c语言·前端·c++
2401_858286112 天前
LKDS8.Linux内核的双向链表代码解析(8) 拼接链表、获取链表首/尾元素的宏、list_for_each系列的安全版本的宏
linux·链表
渴了喝洗衣液2 天前
第一阶段项目
linux·运维·服务器
俊俊几年的2 天前
嵌入式 Linux 应用开发:CMake 详解与交叉编译实践
linux·c++·嵌入式·cmake·linux应用开发