11

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.

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

5 Answers 5

6
+150

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?

4
  • 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
    Commented Aug 29, 2018 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
    Commented Aug 30, 2018 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
    Commented Aug 30, 2018 at 15:15
  • It seems that installing jmtpfs does the magic. A question is WHY an upgrade to ubuntu can KILL such important and basic function... Commented Aug 13, 2023 at 15:59
0

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

See these references :

2
  • Downvoter: MTP sometimes simply does not work under certain conditions, so an alternative might be required.
    – harrymc
    Commented Jul 11, 2018 at 17:10
  • When Linux don't work for you use Windows
    – JOduMonT
    Commented May 13, 2021 at 21:24
0

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/

My mobile starts working now ...

0

Look at the gvfs, mtp* packages, in Synaptic, and under package->force package version you should have it set to (codename)-updates. If it fails remove package and reinstall all packages you remove. The packages probably didn't get upgraded to the appropriate version.

Reboot and you should see Android devices open.

0

I have 2 Galaxy (one Note4 and one S8), and curiously that issue was only appear with my S8. I managed to fix it by installing go-mtpfs gvfs-fuse and mainly limesuite-udev

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .