spr*_*aff 9 android mtp ubuntu
我可以在 Ubuntu 16.04 上通过 MTP 连接到我的 Android Alcatel Pixi 4 (5)(存在一个错误,如果文件删除后跟文件复制,协议“意外终止”,但除此之外,它有效)。
升级到 Ubuntu 18.04 后,每当我尝试浏览设备时,我都会在 Dolphin 中看到“协议意外终止”。
#> mtp-detect
libmtp version: 1.1.13
Listing raw device(s)
Device 0 (VID=1bbb and PID=0167) is a Alcatel/TCT 6010D/TCL S950.
Found 1 device(s):
Alcatel/TCT: 6010D/TCL S950 (1bbb:0167) @ bus 3, dev 2
Attempting to connect device(s)
ignoring libusb_claim_interface() = -6PTP_ERROR_IO: failed to open session, trying again after resetting USB interface
LIBMTP libusb: Attempt to reset device
ignoring libusb_claim_interface() = -6LIBMTP PANIC: failed to open session on second attempt
Unable to open raw device 0
OK.
Run Code Online (Sandbox Code Playgroud)
dmesg 包含:
[ 471.588800] usb 3-4: usbfs: process 9290 (gmtp) did not claim interface 0 before use
[ 471.715547] usb 3-4: reset high-speed USB device number 3 using xhci_hcd
[ 471.864513] usb 3-4: usbfs: process 9290 (gmtp) did not claim interface 0 before use
[ 471.864735] usb 3-4: usbfs: process 2562 (events) did not claim interface 0 before use
Run Code Online (Sandbox Code Playgroud)
我尝试从源代码构建 libmtp-1.1.15,问题仍然存在。该设备通过 MTP 访问在同一台机器上的 Windows 上工作。
我的 openSUSE 有类似的问题。安装后jmtpfs,kio-mtp mtp-tools问题消失了,一切都开始正常工作。
如果您已经使用过jmtpfs或类似工具的挂载点为~/android_mount/,那么首先确保它没有被挂载:
# unmount previously mounted device
fusermount -u ~/android_mount/
# this should show empty directory
ls -la ~/android_mount/
Run Code Online (Sandbox Code Playgroud)
您还可以使用 的输出df来查看它是否安装在其他地方。
否则,创建一个新的挂载点,比如说~/android_mount/挂载你的 Android 手机,在你用 USB 线连接它并将其切换到“文件传输”模式(通常默认为“充电”)后:
# make directory to mount
mkdir -p ~/android_mount/
# mount the device (can take several minutes)
# it will also show device information while mounting
jmtpfs ~/android_mount/
# now you should see internal storage if you don't have an SD card
ls -la ~/android_mount/
drwxrwxr-x 12 login login 0 Jan 3 44248648 Internal storage
# if it has an SD card too, then it'll show 2 entries
# look inside
ls -la ~/android_mount/Internal\ storage/
Run Code Online (Sandbox Code Playgroud)
现在您可以像在任何 USB 连接设备上一样操作文件。
# when finished, unmount the device
fusermount -u ~/android_mount/
Run Code Online (Sandbox Code Playgroud)
你能补充jmtpfs -l你的问题吗?