I could connect to my Android Alcatel Pixi 4 (5) via MTP on Ubuntu 16.04 (there was a bug where the protocol "died unexpectedly" if a file delete was followed by a file copy, but other than that, it worked).

After upgrading to Ubuntu 18.04 I get "protocol died unexpectedly" in Dolphin whenever I try to browse the device.

#> mtp-detect
libmtp version: 1.1.13

Listing raw device(s)
Device 0 (VID=1bbb and PID=0167) is a Alcatel/TCT 6010D/TCL S950.
   Found 1 device(s):
   Alcatel/TCT: 6010D/TCL S950 (1bbb:0167) @ bus 3, dev 2
Attempting to connect device(s)
ignoring libusb_claim_interface() = -6PTP_ERROR_IO: failed to open session, trying again after resetting USB interface
LIBMTP libusb: Attempt to reset device
ignoring libusb_claim_interface() = -6LIBMTP PANIC: failed to open session on second attempt
Unable to open raw device 0
OK.

dmesg contains:

[  471.588800] usb 3-4: usbfs: process 9290 (gmtp) did not claim interface 0 before use
[  471.715547] usb 3-4: reset high-speed USB device number 3 using xhci_hcd
[  471.864513] usb 3-4: usbfs: process 9290 (gmtp) did not claim interface 0 before use
[  471.864735] usb 3-4: usbfs: process 2562 (events) did not claim interface 0 before use

I tried building libmtp-1.1.15 from source, problem persists. The device works via MTP access on Windows on the same machine.

  • Try KDE Connect on both ends, Ubuntu and Android. – harrymc Jul 5 at 14:55

I had similar issue with my openSUSE. After I have installed jmtpfs, kio-mtp mtp-tools the issue disappeared and everything started to work correctly.

If you have already used jmtpfs or a similar tool with a mount point of ~/android_mount/, then first make sure it's not mounted:

# unmount previously mounted device
fusermount -u ~/android_mount/

# this should show empty directory
ls -la ~/android_mount/

You can also use the output of df to see if perhaps it's mounted elsewhere.

Otherwise, create a new mount point, let's say ~/android_mount/ and mount your Android phone, after you connected it with USB cable and switched it to 'File Transfer' mode (it normally defaults to 'Charge'):

# make directory to mount
mkdir -p ~/android_mount/

# mount the device (can take several minutes)
# it will also show device information while mounting
jmtpfs ~/android_mount/

# now you should see internal storage if you don't have an SD card
ls -la ~/android_mount/
drwxrwxr-x 12 login login    0 Jan  3  44248648 Internal storage
# if it has an SD card too, then it'll show 2 entries

# look inside
ls -la ~/android_mount/Internal\ storage/

Now you can operate on the files as you'd on any USB attached device.

# when finished, unmount the device
fusermount -u ~/android_mount/

Could you add jmtpfs -l to your question?

  • 1. Your first 2 commands make no sense to someone who doesn't already have your specific dir names, which aren't standard. 2. and the last one should probably have a comment that you're unmounting it? 3. plus can you replace /home/login with ~ to be consistent with the rest of your steps? Thank you. The complete instructions with debug options can be found here. – stason Aug 29 at 22:23
  • @StasBekman those were the commands I used - could not copy, but had to rewrite them. You were right about the one directory, which I edited (feel free to edit it next time). There are plenty of guides (the debian one is better one but the OP has Ubuntu which could differ). I wrote I used different linux distro. As for the guides you could also link an Arch linux one - wiki.archlinux.org/index.php/Media_Transfer_Protocol. – tukan Aug 30 at 12:24
  • sure, I edited it as you suggested. Please feel free to further improve it. In this case the distro doesn't matter at all - since it's the same tool. Thank you for your sharing. – stason Aug 30 at 15:15

If MTP does not work, you may try instead KDE Connect.

See these references :

  • Downvoter: MTP sometimes simply does not work under certain conditions, so an alternative might be required. – harrymc Jul 11 at 17:10

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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