You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

运行scrcpy时adb出现undefined symbol错误的解决咨询

解决scrcpy启动失败问题

问题核心报错

scrcpy 3.3.1 <https://github.com/Genymobile/scrcpy>
Authorization required, but no authorization protocol specified

XDG_RUNTIME_DIR (/run/user/0) is not owned by us (uid 1000), but by uid 0! (This could e.g. happen if you try to connect to a non-root PulseAudio as a root user, over the native protocol. Don't do that.)
adb: symbol lookup error: adb: undefined symbol: libusb_get_ssplus_usb_device_capability_descriptor
ERROR: "adb start-server" returned with value 127
ERROR: Could not start adb server
ERROR: Server connection failed

解决步骤

1. 禁止以root身份运行scrcpy

错误日志明确提示XDG_RUNTIME_DIR属于root用户(uid0),但当前操作用户是普通用户(uid1000),这大概率是误用sudo启动scrcpy导致的:

  • 直接用普通用户身份执行scrcpy,不要加sudo
  • 如果之前用root运行过adb,重置adb权限:
    sudo rm -rf ~/.android/adbkey ~/.android/adbkey.pub
    adb kill-server
    adb start-server
    

2. 修复adb的libusb依赖缺失

adb: undefined symbol报错说明adb依赖的libusb版本不匹配,在Fedora 41中执行以下操作:

  • 重新安装android-tools和libusb相关包:
    sudo dnf reinstall android-tools libusb libusb-devel
    
  • 若问题仍存在,补充安装相关工具并更新系统依赖:
    sudo dnf install android-tools-fsutils
    sudo dnf update
    

3. 适配Wayland窗口环境

Fedora 41默认使用Wayland,scrcpy在此环境下需额外配置:

  • 临时强制scrcpy用Xwayland运行:
    GDK_BACKEND=x11 scrcpy
    
  • 或长期切换到Xorg(重启后生效):
    • 登录界面点击用户头像旁的齿轮图标
    • 选择「GNOME on Xorg」

4. 单独验证adb可用性

先排除adb本身的问题,再测试scrcpy:

adb devices

如果输出能识别到你的安卓设备,说明adb服务正常,此时再启动scrcpy即可。

内容的提问来源于stack exchange,提问作者Oliver Cox

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.12 19:33:24