Ubuntu 14.04 MTP 错误

Ubuntu 14.04 MTP 错误

我正在尝试让我的新手机(Oneplus One)与 Ubuntu 14.04、Dell Vostro 2520 配合使用。这是 /var/log/syslog 的输出。

 [  489.186871] usb 1-1.1: USB disconnect, device number 10
 [  498.708981] usb 2-1.2: new high-speed USB device number 4 using ehci-pci
 [  498.803568] usb 2-1.2: New USB device found, idVendor=05c6, idProduct=6764
 [  498.803575] usb 2-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
 [  498.803579] usb 2-1.2: Product: One
 [  498.803582] usb 2-1.2: Manufacturer: OnePlus
 [  498.803585] usb 2-1.2: SerialNumber: 482a54b2
 mtp-probe: checking bus 2, device 4: "/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2"
 mtp-probe: bus: 2, device: 4 was not an MTP device

答案1

将以下条目添加到 /lib/udev/rules.d/69-libmtp.rules 即可解决问题

ATTR{idVendor}=="05c6", ATTR{idProduct}=="6764", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1", TAG+="uaccess"
ATTR{idVendor}=="05c6", ATTR{idProduct}=="6765", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1", TAG+="uaccess"

当我问同样的问题时,我得到了这个解决方案OnePlus 论坛

答案2

一个很好的指南可以在Ubuntu 维基

简而言之,这对我有用:

通过 USB 连接您的设备。

sudo apt-get install mtpfs mtp-tools 
sudo mtp-detect 

如果出现如下情况,请使用CTRL+取消最后一个命令:C

Unable to open ~/.mtpz-data for reading, MTPZ disabled.libmtp version: 1.1.6

Listing raw device(s)
Device 0 (VID=1234 and PID=5678) is UNKNOWN.
Please report this VID/PID and the device model to the libmtp development team
   Found 1 device(s):
   1234:5678 @ bus 3, dev 10
Attempting to connect device(s)
Android device detected, assigning default bug flags

查找 VID = idVendor 和 PID = idProduct 以及替换数字“1234”和“5678”在以下行中:

sudo echo 'ATTR{idVendor}=="1234", ATTR{idProduct}=="5678", SYMLINK+="libmtp-%k", MODE="660", GROUP="disk", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1"' >> /etc/udev/rules.d/69-libmtp.rules

现在断开并重新连接 USB 设备,看看它是否正常工作。希望这会更容易一些。

答案3

您可能需要尝试安装以下内容

sudo apt-get install mtp-tools mtpfs

另外,我还读到将其插入 USB 3.0(蓝色)端口更好。

答案4

我只是添加了规则以通过 mtp-probe 跳过我的设备。
/lib/udev/rules.d/69-libmtp.rules

在此文件的顶部,你可以找到:

# Some sensitive devices we surely don't wanna probe
ATTR{idVendor}=="0670", GOTO="libmtp_rules_end"
ATTR{idVendor}=="0471", ATTR{idProduct}=="083f", GOTO="libmtp_rules_end"

所以我找到了我的 USB ID:

$ lsusb
Bus 002 Device 003: ID 05e3:0723 Genesys Logic, Inc. GL827L SD/MMC/MS Flash Card Reader
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 028: ID 093a:2516 Pixart Imaging, Inc. 
Bus 001 Device 003: ID 047f:c010 Plantronics, Inc. 
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

那是093a:2516

/lib/udev/rules.d/69-libmtp.rules并在文件中添加下一行:

ATTR{idVendor}=="093a", ATTR{idProduct}=="2516", GOTO="libmtp_rules_end"

相关内容