如何使用USB将Android 7.1连接到Ubuntu Linux?

我正在尝试使用mtp-tools将带有Android 7.1的Google Pixel手机连接到带USB线的Ubuntu 16.04笔记本电脑。 但是mtp没有看到电话文件系统并给出错误消息“获取存储信息失败”。

然后尝试mtp工具……

# mtp-detect libmtp version: 1.1.10 Listing raw device(s) Device 0 (VID=18d1 and PID=4ee1) is a Google Inc (for LG Electronics/Samsung) Nexus 4/5/7/10 (MTP). Found 1 device(s): Google Inc (for LG Electronics/Samsung): Nexus 4/5/7/10 (MTP) (18d1:4ee1) @ bus 2, dev 17 Attempting to connect device(s) Android device detected, assigning default bug flags Error 1: Get Storage information failed. ***** ??? USB low-level info: bcdUSB: 512 bDeviceClass: 0 bDeviceSubClass: 0 bDeviceProtocol: 0 idVendor: 18d1 idProduct: 4ee1 IN endpoint maxpacket: 512 bytes OUT endpoint maxpacket: 512 bytes ... many lines omitted ... # mtp-connect libmtp version: 1.1.10 Device 0 (VID=18d1 and PID=4ee1) is a Google Inc (for LG Electronics/Samsung) Nexus 4/5/7/10 (MTP). Android device detected, assigning default bug flags Usage: connect   Commands: --delete [filename] --sendfile [source] [destination] --sendtrack [source] [destination] --getfile [source] [destination] --newfolder [foldername] # mtp-filetree Device 0 (VID=18d1 and PID=4ee1) is a Google Inc (for LG Electronics/Samsung) Nexus 4/5/7/10 (MTP). Attempting to connect device(s) Android device detected, assigning default bug flags Error 1: Get Storage information failed. Device: (NULL) LIBMTP_Get_Storage(): Resource temporarily unavailable OK. 

万一它有用……

 cat /etc/udev/rules.d/51-android.rules SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4ee1", MODE="0666", OWNER="sullivan" 

非常感谢任何建议!

这是我发现的作品:

  • 首先,忽略您在/etc/udev/rules.d/51-android.rules上看到的所有网络评论。 那个文件不需要。

  • 其次,跳过mtp-tools。 他们没有记录,无论如何jmtpfs要容易得多。

  • 安装jmtpfs包: sudo apt-get install jmtpfs

  • 制作一个目录,任何目录: sudo mkdir /media/myphone
  • 连接USB电缆
  • 解锁Android手机。
  • 从手机屏幕顶部向下滑动
  • 你应该看到一个通知“USB ……”
  • 点按该通知。
  • 您应该看到一个标题为“使用USB转…”的菜单,选择“传输文件”。

  • 在linux计算机上的问题:

sudo jmtpfs /media/myphone

ls /media/myphone

fusermount -u /media/myphone

这适用于运行Android 7.1.1的摩托罗拉Moto Z Force Droid:

在手机上,转到设置>开发人员选项(如果尚未打开则打开)>向下滚动到选择USB配置>选择图片传输协议>然后重新选择媒体传输协议。 然后安装手机的内存和SD卡内存(如果有)。

我没有必要在我使用的Ubuntu 16.04.3计算机上安装任何软件。

Sullivan的回答对我有用,但只有在我更换了我正在使用的电缆之后。 使用之前的电缆(2米长),连接速度极慢或经常断开连接。

除了沙利文的答案之外,我还做了以下事情:

  • 在我的Android 7.0(Moto G5 Plus)中进入开发人员选项并启用USB调试。 没有它,没有任何连接是可能的!

我有一个运行Android 8.0.0的Moto Z2 Force并连接到运行64位Ubuntu 16,04 LTS的PC

我没有在手机上看到“开发者选项”,但是通过选择设置>连接设备> USB>传输文件,它允许从我的手机进行GUI文件复制。 注意:您需要连接USB,或者USB选项是幻影。 这不允许你在手机上加载文件,只是从它复制……,但是,这很容易。