在 Ubuntu 12.04.3 LTS 32 位上安装启用 MTP 的设备

在 Ubuntu 12.04.3 LTS 32 位上安装启用 MTP 的设备

我的目标是使用 Ubuntu 12.04.3 LTS 32 位在我的 Samsung Galaxy Note 10.1(旧版本)上执行文件操作。当我插入设备并看到自己时,这并不能开箱即用。为了安装并让操作系统识别设备,我尝试了网上的各种教程。我将它们总结如下:

在 Ubuntu 上安装 MTP Android 的 SD 卡

http://www.mysolutions.it/mounting-your-mtp-androids-sd-card-on-ubuntu/?replytocom=5183#respond

我已经按照描述完成了所有操作,但是当我运行“mtp-detect”命令时,会生成以下输出:

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

Listing raw device(s)
Device 0 (VID=04e8 and PID=6860) is a Samsung Galaxy models (MTP).
   Found 1 device(s):
   Samsung: Galaxy models (MTP) (04e8:6860) @ bus 3, dev 2
Attempting to connect device(s)
PTP_ERROR_IO: failed to open session, trying again after resetting USB interface
LIBMTP libusb: Attempt to reset device
inep: usb_get_endpoint_status(): Invalid argument
outep: usb_get_endpoint_status(): Device or resource busy
usb_clear_halt() on IN endpoint: Device or resource busy
usb_clear_halt() on OUT endpoint: Device or resource busy
usb_clear_halt() on INTERRUPT endpoint: Device or resource busy
LIBMTP PANIC: failed to open session on second attempt
Unable to open raw device 0
OK.

添加 Launchpad 上可用的 GVFS-mtp PPA

https://launchpad.net/~langdalepl/+archive/gvfs-mtp

这有效,最初它在插入平板电脑时自动安装平板电脑。但是,我无法在平板电脑上执行文件操作,例如打开平板电脑内存中的文件(例如 pdf)、复制平板电脑内存中的文件到平板电脑内存中的另一个位置;搬家也是如此。该解决方案在这篇文章中进行了描述:https://askubuntu.com/questions/87667/getting-mtp-enabled-devices-to-work-with-ubuntu/308366#308366

使用 go-mtpfs

我按照以下网站上的说明进行了尝试: http://www.webupd8.org/2012/12/how-to-mount-android-40-ubuntu-go-mtpfs.html

尝试挂载设备的输出如下:

go-mtpfs /media/MyAndroid/
2014/04/21 19:43:24 compiled against libmtp 1.1.5
Device 0 (VID=04e8 and PID=6860) is a Samsung Galaxy models (MTP).
2014/04/21 19:43:24 found device Samsung: Galaxy models (MTP) (04e8:6860) @ bus 3, dev 2
: 
PTP_ERROR_IO: failed to open session, trying again after resetting USB interface
LIBMTP libusb: Attempt to reset device
inep: usb_get_endpoint_status(): Invalid argument
outep: usb_get_endpoint_status(): Device or resource busy
usb_clear_halt() on IN endpoint: Device or resource busy
usb_clear_halt() on OUT endpoint: Device or resource busy
usb_clear_halt() on INTERRUPT endpoint: Device or resource busy
LIBMTP PANIC: failed to open session on second attempt
2014/04/21 19:44:00 rdev.open failed: open: open returned nil

我还想知道屏幕锁定是否真的会干扰此类操作。请注意,我在没有激活屏幕锁定的情况下得到了上述结果。我还添加了 Nautilus 的屏幕截图,显示该设备在链接时被检测到,但未自动安装。我怀疑其中一些选项可能会导致某种冲突,如果您能提供有关正确安装我的设备以及在平板电脑内以及平板电脑和笔记本电脑之间执行文件操作的帮助,我将非常感激。

提前致谢,

在此输入图像描述

答案1

试试这个http://bernaerts.dyndns.org/linux/74-ubuntu/268-ubuntu-automount-any-mtp-device

本指南介绍了如何轻松配置 Ubuntu 计算机,以便在将其插入 USB 端口后立即以 MTP 模式直接访问 Android 设备文件系统。本指南已完全重写以使用 mtp-Detect。它已经通过 Google Nexus 4 和 Google Nexus 7 进行了测试,但它应该可以与任何其他 MTP 设备(Android 手机或平板电脑、MP4 播放器等)配合使用。它是在 Ubuntu 12.04 LTS Amd64 下完成的,但它应该可以在许多 Linux 版本上工作或轻松适应。

相关内容