File transfer with MTP

I posted this question on an Android site and am waiting for some response, but I suspect they will say that the problem is linux-related.

Anyway, I just upgraded my phone, now an HTC 10, verizon version. I cannot get file transfers via mtp to work.

With previous htc phones, I would connect via usb and the device notifier would pop up listing “Android Phone” and for options I was given “Download photos with Digikam”, “Download photos with Gwenview”, and two file explorer options. One would open in “camera:/” mode, in which files could not be transfered from computer to phone, and another which would open in “mtp:/” mode, allowing transfers in both directions.

With the current phone, when I first connected it, it was recognized only as a camera. After editing “libmtp.rules” to include the vendor id and product id of the phone, it was recognized as “Android Phone”. The digiKam and Gwenview options were still there, as were the two file explorer options. One would open the phone in “camera:/” mode. The other one, however, would give the following error:

The file or folder udi=/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/ does not exist.

The phone and the cord work with the HTC supplied sync manager on Windows, so these are not the problem.

I can give some dmesg output if that would be helpful, or the line I added to libmtp.rules, or anything else that might be helpful.

I guess the issue is, is it something they changed about how the phone works, or is this some (fixable) linux problem.

Unless MTP is assumed, it is not mentioned in the list of connection options for the HTC 10 on their website.

You could try changing DisableSwitching to 1 in /etc/usb_modeswitch.conf. If that works, it would confirm that they have abandoned MTP. But that would be very strange as MTP has been the default on Android devices for a long time if not from the outset.

You might have to enable it on the HTC device through the Android Debug Mode, first.

On my openSUSE-42.3 LEAP, I found the basic installation did not immediately support MTP for my Samsung Galaxy Note-10.1 (2014 edition) until after I installed mtp-tools and mtpfs. Before those apps were installed, my Tablet was not recognized. After installation it was recognized and MTP worked.

I don’t know if only one of those 2 is required, as I installed both at the same time.

In truth I’m not convinced either of those apps are really needed. I did have a cause and effect that MTP did not work before and did work after on openSUSE PC with LEAP-42.3, but after I had it working on one PC, I took same Tablet to another LEAP-42.3 PC where MTP did not work before (and where those two apps are not installed), and I plugged it in and MTP did work.

So I suspect it more likely a Tablet configuration issue, that sorted itself after the first successful MTP operation when used with one PC, after which the table software updated its own configuration files and then worked ok after that with other PCs with the same openSUSE version.

As already noted in this thread, one does need on many Android devices to enable the “USB debugging” under the “Developer Options” (or similar name functionality), in order for USB / MTP file transfer to work.

Thanks for all the replies.

Some additional information:

  1. I have already enabled “Developer mode” on the phone and have enabled USB Debugging. When the phone is connected to the computer, a radio-button box appears allowing me to select “Transfer Files”. It does not say anything explicitly about mtp, nor do any of the other possible selections.

  2. I have installed mtpfs and mtp-tools. Both “mtp-detect” and “mtpfs” report “No raw devices found”.

  3. I tried “DisableSwitching” in /etc/usb_modeswitch.conf". This leads to the following output from dmesg:

[327303.130554] usb 1-1.2: new full-speed USB device number 82 using ehci-pci
[327303.197215] usb 1-1.2: device descriptor read/64, error -32
[327303.367191] usb 1-1.2: device descriptor read/64, error -32                                                 
[327303.537216] usb 1-1.2: new full-speed USB device number 83 using ehci-pci                                   
[327303.603869] usb 1-1.2: device descriptor read/64, error -32
[327303.773863] usb 1-1.2: device descriptor read/64, error -32                                                 
[327303.943856] usb 1-1.2: new full-speed USB device number 84 using ehci-pci                                   
[327304.350503] usb 1-1.2: device not accepting address 84, error -32
[327304.417179] usb 1-1.2: new full-speed USB device number 85 using ehci-pci                                   
[327304.823819] usb 1-1.2: device not accepting address 85, error -32
[327304.824059] usb 1-1-port2: unable to enumerate USB device 

Since this phone is behaving differently than previous versions of it, I am start to suspect the phone. But I haven’t gotten any replies on the Android forum yet.