如何修复“LIBMTP PANIC:无法找到设备的接口和端点,无法打开原始设备 0”?

如何修复“LIBMTP PANIC:无法找到设备的接口和端点,无法打开原始设备 0”?

这个问题似乎已经被问过很多次了——大多是在 5 到 10 年前。在尝试将我的 Nokia 3.4 连接到基于戴尔的 Ubuntu 22.04 时,我仍然会间歇性地遇到这种情况(我看到其他人在使用各种手机、电脑和 Ubuntu 版本时也遇到这种情况)。通常断开/重新连接电缆即可使其工作。然而,去年 9 月有一段时间我根本无法让它工作。我放弃了几个星期,直到它突然又开始工作了——耶!——直到本周,它又失败了。我强烈怀疑某个地方的某个更新导致了这种开/关行为。

我试过不同的 USB 端口和电缆。运行 gmtp 没有任何效果 - 它显示“未连接设备” - 尽管我的手机出现在我的文件管理器等中,并且 gmtp (错误地) 将其识别为 Nexus/Pixel,如下所示!

我显然已经查看了许多其他线程和来源来尝试解决这个问题,并且我发现最常见的回应是发布 lsusb 和 mtp-detect 的输出,所以这里是我的:

$ lsusb
Bus 001 Device 005: ID 0a5c:5800 Broadcom Corp. BCM5880 Secure Applications Processor
Bus 001 Device 004: ID 8087:07dc Intel Corp. Bluetooth wireless interface
Bus 001 Device 038: ID 18d1:4ee2 Google Inc. Nexus/Pixel Device (MTP + debug)
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 003: ID 413c:8187 Dell Computer Corp. DW375 Bluetooth Module
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

$ mtp-detect
libmtp version: 1.1.19

Listing raw device(s)
Device 0 (VID=18d1 and PID=4ee2) is a Google Inc Nexus/Pixel (MTP+ADB).
   Found 1 device(s):
   Google Inc: Nexus/Pixel (MTP+ADB) (18d1:4ee2) @ bus 1, dev 12
Attempting to connect device(s)
LIBMTP PANIC: Unable to find interface & endpoints of device
Unable to open raw device 0
OK.

有趣的是,我的设备被列为 Nexus/Pixel - 但事实并非如此!

如果能找到一个明确且永久的“解决方案”来应对这一持续存在的问题,那就太好了。

短暂性脑缺血发作

克里斯

答案1

mtplsusb...使用 PCIID 来识别连接的设备,在你的情况VID=18d1 , PID=4ee2下称为 Nexus/Pixel 设备(MTP + 调试)

要更新 PCIID 数据库列表,使用:sudo update-pciids

安装设备的其他方法:

安装jmtpfs

sudo apt install jmtpfs
mkdir devicemnt
sudo chown $USER:$USER devicemnt
jmtpfs -o allow_other devicemnt/
ls devicemnt

卸载:fusermount -u devicemnt

相关内容