Bug 1277643 - gvfs-mtp not working with Nexus Android 6 (Marshmallow)
gvfs-mtp not working with Nexus Android 6 (Marshmallow)
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: libmtp (Show other bugs)
23
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Linus Walleij
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-11-03 12:43 EST by Eric
Modified: 2015-11-12 03:44 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-11-12 03:44:37 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Eric 2015-11-03 12:43:59 EST
Description of problem:

I have two phones, Nexus 5 (hammerhead) and Nexus 6 (shamu) which were working fine running 5.1.1 (Lollipop). Now that they were updated to Android 6.0, Nautilus fails to display the storage contents when I plug the phone to USB. The solution I found is to enable developer options, switch USB configuration to PTP (Picture Transfer Protocol), then back to MTP (Media Transfer Protocol).

Disclaimer: Sorry if it is a duplicate, an Android bug, or if this should be assigned to a different component, maybe gvfs.


Version-Release number of selected component (if applicable):

gvfs-mtp-1.22.4-2.fc21.x86_64
libmtp-1.1.9-1.fc21.x86_64

How reproducible:

Two different phones on two different F21 desktops. Looks quite reproducible.


Steps to Reproduce:

1. Plug an Android 6 phone to USB (Nexus 6 in this case). Log says:

kernel: usb 4-1.4.3: new high-speed USB device number 5 using ehci-pci
kernel: usb 4-1.4.3: New USB device found, idVendor=18d1, idProduct=4ee1
kernel: usb 4-1.4.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
kernel: usb 4-1.4.3: Product: Nexus 6
kernel: usb 4-1.4.3: Manufacturer: motorola
kernel: usb 4-1.4.3: SerialNumber: ZX1G324S2M
org.gtk.vfs.Daemon[9651]: Device 0 (VID=18d1 and PID=4ee1) is a Google Inc (for LG Electronics/Samsung) Nexus 4/5/7/10 (MTP).
org.gtk.vfs.Daemon[9651]: Error 1: Get Storage information failed.

2. Switch USB configuration to PTP. Nautilus shows the DCIM folder, correctly treating the phone as a camera. Log:

PTP: reading event an error 0x02ff occurredDevice 0 (VID=18d1 and PID=4ee5) is a Google Nexus 5 (MTP).
org.gtk.vfs.Daemon[9651]: Android device detected, assigning default bug flags
org.gtk.vfs.Daemon[9651]: Received event PTP_EC_DevicePropChanged in session 1

 
3. Now set USB configuration back to MTP. Nautilus now shows Internal storage. Log:

org.gtk.vfs.Daemon[9651]: 
LIBMTP WARNING: no MTP vendor extension on device 6 on bus 4LIBMTP WARNING: VendorExtensionID: 00000000LIBMTP WARNING: VendorExtensionDesc: (null)LIBMTP WARNING: this typically means the device is PTP (i.e. a camera) but not an MTP device at all. Trying to continue anyway.PTP: reading event an error 0x02ff occurredDevice 0 (VID=18d1 and PID=4ee1) is a Google Inc (for LG Electronics/Samsung) Nexus 4/5/7/10 (MTP).
Comment 1 Fedora End Of Life 2015-11-04 04:52:22 EST
This message is a reminder that Fedora 21 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 21. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '21'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 21 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 2 Kamil Páral 2015-11-11 06:29:58 EST
I can reproduce exactly the same issue with Nexus 7 updated to Android 6, and Fedora 23.

After I connect the tablet, I see no folders in it:
Nov 11 12:22:40 dryad kernel: usb 1-3.4.1: new high-speed USB device number 8 using xhci_hcd
Nov 11 12:22:40 dryad kernel: usb 1-3.4.1: New USB device found, idVendor=18d1, idProduct=4ee1
Nov 11 12:22:40 dryad kernel: usb 1-3.4.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Nov 11 12:22:40 dryad kernel: usb 1-3.4.1: Product: Nexus 7
Nov 11 12:22:40 dryad kernel: usb 1-3.4.1: Manufacturer: asus
Nov 11 12:22:40 dryad kernel: usb 1-3.4.1: SerialNumber: 09e2372f
Nov 11 12:22:40 dryad org.gtk.vfs.Daemon[1984]: Device 0 (VID=18d1 and PID=4ee1) is a Google Inc (for LG Electronics/Samsung) Nexus 4/5/7/10 (MTP).
Nov 11 12:22:40 dryad org.gtk.vfs.Daemon[1984]: Error 1: Get Storage information failed.

After I disconnect and connect it again, it seems to fall back to PTP, but even that doesn't work:
Nov 11 12:23:09 dryad kernel: usb 1-3.4.1: new high-speed USB device number 9 using xhci_hcd
Nov 11 12:23:09 dryad kernel: usb 1-3.4.1: New USB device found, idVendor=18d1, idProduct=4ee1
Nov 11 12:23:09 dryad kernel: usb 1-3.4.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Nov 11 12:23:09 dryad kernel: usb 1-3.4.1: Product: Nexus 7
Nov 11 12:23:09 dryad kernel: usb 1-3.4.1: Manufacturer: asus
Nov 11 12:23:09 dryad kernel: usb 1-3.4.1: SerialNumber: 09e2372f
Nov 11 12:23:09 dryad org.gtk.vfs.Daemon[1984]: PTP: reading event an error 0x02ff occurredDevice 0 (VID=18d1 and PID=4ee1) is a Google Inc (for LG Electronics/Samsung) Nexus 4/5/7/10 (MTP).
Nov 11 12:23:09 dryad org.gtk.vfs.Daemon[1984]: Error 1: Get Storage information failed.

After I switch to PTP in Android, it starts working (notice missing the last "Error 1" line):
Nov 11 12:24:14 dryad kernel: usb 1-3.4.1: new high-speed USB device number 12 using xhci_hcd
Nov 11 12:24:15 dryad kernel: usb 1-3.4.1: New USB device found, idVendor=18d1, idProduct=4ee5
Nov 11 12:24:15 dryad kernel: usb 1-3.4.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Nov 11 12:24:15 dryad kernel: usb 1-3.4.1: Product: Nexus 7
Nov 11 12:24:15 dryad kernel: usb 1-3.4.1: Manufacturer: asus
Nov 11 12:24:15 dryad kernel: usb 1-3.4.1: SerialNumber: 09e2372f
Nov 11 12:24:15 dryad org.gtk.vfs.Daemon[1984]: PTP: reading event an error 0x02ff occurredDevice 0 (VID=18d1 and PID=4ee5) is a Google Nexus 5 (MTP).

After I switch to MTP in Android, it starts working over MTP:
Nov 11 12:24:26 dryad kernel: usb 1-3.4.1: new high-speed USB device number 13 using xhci_hcd
Nov 11 12:24:26 dryad kernel: usb 1-3.4.1: New USB device found, idVendor=18d1, idProduct=4ee1
Nov 11 12:24:26 dryad kernel: usb 1-3.4.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Nov 11 12:24:26 dryad kernel: usb 1-3.4.1: Product: Nexus 7
Nov 11 12:24:26 dryad kernel: usb 1-3.4.1: Manufacturer: asus
Nov 11 12:24:26 dryad kernel: usb 1-3.4.1: SerialNumber: 09e2372f
Nov 11 12:24:26 dryad org.gtk.vfs.Daemon[1984]: LIBMTP WARNING: no MTP vendor extension on device 12 on bus 1LIBMTP WARNING: VendorExtensionID: 00000000LIBMTP WARNING: VendorExtensionDesc: (null)LIBMTP WARNING: this typically means the device is PTP (i.e. a camera) but not an MTP device at all. Trying to continue anyway.PTP: reading event an error 0x02ff occurredDevice 0 (VID=18d1 and PID=4ee1) is a Google Inc (for LG Electronics/Samsung) Nexus 4/5/7/10 (MTP).


libmtp-1.1.9-2.fc23.x86_64
gvfs-1.26.1.1-2.fc23.x86_64
gvfs-mtp-1.26.1.1-2.fc23.x86_64
gnome-vfs2-2.24.4-19.fc23.x86_64
nautilus-3.18.1-1.fc23.x86_64
Comment 3 Kamil Páral 2015-11-11 06:33:55 EST
I think the interesting part is this (once it finally starts working):

LIBMTP WARNING: no MTP vendor extension on device 12 on bus 1
LIBMTP WARNING: VendorExtensionID: 00000000
LIBMTP WARNING: VendorExtensionDesc: (null)
LIBMTP WARNING: this typically means the device is PTP (i.e. a camera) but not an MTP device at all. Trying to continue anyway.
Comment 4 Kamil Páral 2015-11-11 06:45:00 EST
I have filed an upstream report here:
https://sourceforge.net/p/libmtp/bugs/1466/
Comment 5 Kamil Páral 2015-11-12 03:44:37 EST
It seems that Google decided that your device is connected in charging only mode every time by default, and you need to swipe down the notification area and click on "USB mode" notification and select MTP every time you want to transfer files. Then it works properly. Either this is intentional or it is bug. Either way, it doesn't seem to be a libmtp fault. See:

http://www.androidcentral.com/inside-marshmallow-usb-connection-options

https://productforums.google.com/forum/#!topic/nexus/6lMKqYYXpXw;context-place=topicsearchin/nexus/category$3Aconnecting-to-networks-and-devices

Note You need to log in before you can comment on or make changes to this bug.