17

I'm trying to connect a Google Pixel phone, with android 7.1, to a Ubuntu 16.04 laptop with a USB cable using mtp-tools. But the mtp doesn't see the phone file system and gives the error message "Get Storage information failed".

Then trying the mtp tools ...

# 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 <command1> <command2>
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.

In case it's useful ...

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

Many thanks for any advice!

27

Here's what I found works:

  • First, ignore all the web comments you've seen about /etc/udev/rules.d/51-android.rules. That file isn't needed.

  • Second, skip mtp-tools. They aren't documented, and jmtpfs is far easier anyway.

  • Install the jmtpfs package: sudo apt-get install jmtpfs

  • Make a directory, any directory: sudo mkdir /media/myphone
  • Connect the USB cable
  • Unlock the android phone.
  • Swipe down from the top of the phone screen
  • You should see a notification "USB ..."
  • Tap that notification.
  • You should see a menu titled "Use USB to...", select "Transfer files".

  • On the linux computer issue:

sudo jmtpfs /media/myphone

ls /media/myphone

fusermount -u /media/myphone

  • 2
    Thanks. Just finding that notification and choosing transfer files was enough for me. It seems it doesn't remember, though, and I'll have to do that each time. (BTW, it is very possible I've installed something like mpt-tools, for an earlier version of Android, my previous phone, which is why it "just worked") – Darren Cook May 8 '17 at 16:34
  • Thank you. I just followed the advice to "connect the phone" - and there is was! – ycc_swe Aug 1 '17 at 19:11
  • If you add the 'allow_other' option, the mount also is available to other users than root, using 'uid' and 'gid' you can set the user:group of the mount point : sudo jmtpfs /media/motox -o uid=1000,gid=1000,allow_other – ruleant Dec 23 '17 at 20:31
  • Thanks. This worked for me. However, I ONLY had to go as far as Unlocking my phone And as soon as I plugged the USB, my phone's SD card was mounted and was clickable. – ThN Jul 15 '18 at 4:44
  • 1
    It can be mounted on a user directory too, no need for sudo. – Hibou57 Sep 27 '18 at 20:14
6

This works for me on a Motorola Moto Z Force Droid running Android 7.1.1:

On the phone go to Settings > Developer Options (turn on if not already turned on) > scroll down to Select USB Configuration > select Picture Transfer Protocol > then re-select Media Transfer Protocol. The phone's internal memory and SD card memory (if any) then mount.

I did not have to install any software on the Ubuntu 16.04.3 computer that I use.

  • In Android Oreo going to Settings -> Advanced -> Developer options -> Default USB configuration and selecting File transfer worked for me. I noticed it had "No data transfer" enabled by default. – elig Apr 27 at 2:37
1

Sullivan's answer worked for me, but only after I replaced the cable I was using. With the previous cable (2 meters long), connection was extremely slow or disconnected frequently.

Also I did the following, in addition to Sullivan's answer:

  • Went into developers options in my Android 7.0 (Moto G5 Plus) and enabled USB debugging. Without that no connection was ever possible!
0

I have a Moto Z2 Force running Android 8.0.0 and am connecting to a PC running 64bit Ubuntu 16,04 LTS

I didn't see "Developer Options" on my phone, but by selecting Settings>Connected devices>USB>Transfer files, it allows GUI file-copy from my phone. NOTE: You need to have your USB connected, or the USB options are ghosted. This does not let you load files on the phone, just copy from it..., but, it's supper easy.

protected by Community Jul 1 '18 at 19:58

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.