在Linux上使用MTP安装Samsung Galaxy Tab 2 7.0

Fro*_*otz 6 debian android tablet galaxy mtp

我试图通过MTP将三星Galaxy Tab2 7.0"连接到Debian Wheezy盒子.请参阅https://askubuntu.com/questions/186681/getting-mtp-to-work-with-a-galaxy的askubuntu页面-tab-2-7-0正好详细说明了我的问题,但没有一个建议的补救措施有效.

重申一下,我安装了mtp-tools和mtpfs.mtp-detect产生这个:

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.
Run Code Online (Sandbox Code Playgroud)

我创建了一个/etc/udev/rules.d/51-android.rules文件,使用值04e8作为供应商ID,6860作为设备ID.我完成了前面提到的howto并做到了这一点:

mkdir foo
mtpfs -o allow_other foo
Run Code Online (Sandbox Code Playgroud)

现在做"ls foo"摊位.检查foo上面的目录也会停止.如果不执行"killall -9 mtpfs"(类似于处理过时的sshfs挂载),我无法获取命令行.然后我看到了这个:

ls: cannot access foo: Transport endpoint is not connected
Run Code Online (Sandbox Code Playgroud)

试过https://askubuntu.com/a/88630/27480并得到了相同的结果.

来自https://github.com/hanwen/go-mtpfs的 go-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
Run Code Online (Sandbox Code Playgroud)

来自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
Run Code Online (Sandbox Code Playgroud)

kno*_*cte 1

在终端中尝试一下:

killall gvfs-gphoto2-volume-monitor
killall gvfs-mtp-volume-monitor
Run Code Online (Sandbox Code Playgroud)

之后,重新连接手机。并使用 mtp-detect 或其他基于 libmtp 的程序。它应该有效。

这是我在此 ubuntu bug 中提出的解决方法: https://bugs.launchpad.net/ubuntu/+source/gvfs/+bug/1314556