我正试图让三星Galaxy Tab2 7.0“通过MTP连接到Debian喘息盒。askubuntu的https://askubuntu.com/questions/186681/getting-mtp-to-work-with-a-galaxy-tab-2-7-0页面精确地描述了我的问题,但是没有一个建议的补救措施有效。
重申一下,我安装了mtp工具和mtpfs。MTP检测得出:
libmtp version: 1.1.3
Listing raw device(s)
Device 0 (VID=04e8 and PID=6860) is a Samsung GT P7310/P7510/N7000/I9070/I9100/I9300 Galaxy Tab 7.7/10.1/S2/S3/Nexus/Note/Y.
Found 1 device(s):
Samsung: GT P7310/P7510/N7000/I9070/I9100/I9300 Galaxy Tab 7.7/10.1/S2/S3/Nexus/Note/Y (04e8:6860) @ bus 1, dev 3
Attempting to connect device(s)
PTP_ERROR_IO: failed to open session, trying again after resetting USB interface
LIBMTP libusb: Attempt to reset device
LIBMTP PANIC: failed to open session on second attempt
Unable to open raw device 0
OK.
我创建了一个/etc/udev/rules.d/51-android.rules文件,使用值04e8表示供应商id,6860表示设备id。
mkdir foo
mtpfs -o allow_other foo
现在做“ls foo”摊位。查看foo上面的目录也会暂停。如果不执行“killall-9mtpfs”(类似于处理陈旧的sshfs挂载),我就无法恢复命令行。然后我看到:
ls: cannot access foo: Transport endpoint is not connected
尝试https://askubuntu.com/a/88630/27480并得到相同的结果。
从https://github.com/hanwen/go-mtpfs进入mtpfs也失败:
mkdir foo
./go-mtpfs foo
2013/01/07 02:39:33 compiled against libmtp 1.1.3
Device 0 (VID=04e8 and PID=6860) is a Samsung GT P7310/P7510/N7000/I9070/I9100/I9300 Galaxy Tab 7.7/10.1/S2/S3/Nexus/Note/Y.
2013/01/07 02:39:33 found device Samsung: GT P7310/P7510/N7000/I9070/I9100/I9300 Galaxy Tab 7.7/10.1/S2/S3/Nexus/Note/Y (04e8:6860) @ bus 1, dev 3
:
PTP_ERROR_IO: failed to open session, trying again after resetting USB interface
LIBMTP libusb: Attempt to reset device
LIBMTP PANIC: failed to open session on second attempt
2013/01/07 02:41:33 rdev.open failed: open: open returned nil
https://github.com/kiorky/jmtpfs.git中的jmptfs也会失败:
Device 0 (VID=04e8 and PID=6860) is a Samsung GT P7310/P7510/N7000/I9070/I9100/I9300 Galaxy Tab 7.7/10.1/S2/S3/Nexus/Note/Y.
PTP_ERROR_IO: failed to open session, trying again after resetting USB interface
LIBMTP libusb: Attempt to reset device
LIBMTP PANIC: failed to open session on second attempt
terminate called after throwing an instance of 'MtpErrorCantOpenDevice'
what(): Can't open device
Aborted
最佳答案
在终端中尝试此操作:
killall gvfs-gphoto2-volume-monitor
killall gvfs-mtp-volume-monitor
之后,重新连接手机。并使用mtp detect或其他基于libmtp的程序。它应该有用。
这是我在ubuntu bug中提出的解决方法:
https://bugs.launchpad.net/ubuntu/+source/gvfs/+bug/1314556