How to copy files via MTP from Linux? (Thunar filemanager)

What is the best way to copy files between FP2 with A6 and a linux computer? I tried it with a 20MB audio file with thunar but it didnt work. On the FP i turned on MTP.
Error is: could not get object handles

I think this depends a lot on personal preferences.
Lately I prefer to simply copy via adb, but also using rsync is an interesting option for me that I used more earlier (I still like this option for large folders, such as where offline maps are stored, to only copy the new files).

If I recall correctly, you need to add support for MTP in Thunar installing another package (gvfs-mtp or gvfs-backends on Debian). I think this worked for me in the past.

@freibadschwimmer thank you. ADB works but isnt the easiest way.

@Roboe gvfs-backends are already installed and includes the gfvs-mtp package.

Could there be another reason?

This thread say only thunar-volman and gvfs-backends/gvfs-mtp are needed.

Could you try to reinstall them apt-get install --reinstall thunar-volman gvfs-backends, reboot and try again?

In Fedora my FP2 mtp partition is found in /run/user/1000/gvfs/mtp:host=%5Busb%3A001%2C012%5D

Also here no problems with Thunar and MTP on Debian Stretch. Also in TWRP I get access to the storage via USB.
Maybe the FTP server in Amaze could be another solution. I did not test it yet.

@Roboe thanks for the quick answer. Reinstalled backends, didnt help. Also tried it with the the following way as it is mentioned in the thread you’ve posted.

apt-get install jmtpfs

mkdir ~/Android
jmtpfs ~/Android

But after jmtpfs ~/Android i get the following message, maybe it helps:

neo@neo-pc ~ $ jmtpfs ~/Android
Unable to open ~/.mtpz-data for reading, MTPZ disabled.
Device 0 (VID=2ae5 and PID=9039) is UNKNOWN.
Please report this VID/PID and the device model to the libmtp development team
ignoring libusb_claim_interface() = -6PTP_ERROR_IO: failed to open session, trying again after resetting USB interface
LIBMTP libusb: Attempt to reset device
Android device detected, assigning default bug flags

@Lidwien Thanks. /run/user/1000/gvfs is empty in my case.
@mase If i cant get a solution, i will try the FTP way. But it seems to be a problem that could be solved because you and other users dont have the problem.

@neolovich
What do you mean with “it does not work”? Does the device appear in the sidebar? If not, try a different cable. Some cables out there really suck. Check the syslog when plugging in.

Yes, it appears. Show internel storage and also the SD Card. But when i try to copy a file the error appears mentioned in the first post.
Where do i find the syslog?

Not sure whether this is still relevant for your current approach (and whether or not this underlies your initial problem), but just in case:

Seems the version of libmtp you’re using is outdated, as they should have been added since version 1.1.12 (according to this).

/var/log/syslog
To monitor type
tail -f /var/log/syslog
as root.
Do normal USB-sticks work?

Does the notification on the FP show mtp mode? And the directories only appear, when I unlock the screen.

@Johannes Installed libmtp 1.1.13 but it didnt help.

neo@neo-pc ~ $ jmtpfs ~/Android
Unable to open ~/.mtpz-data for reading, MTPZ disabled.
Device 0 (VID=2ae5 and PID=9039) is UNKNOWN.
Please report this VID/PID and the device model to the libmtp development team
Android device detected, assigning default bug flags

I get it mounted but cant copy files or create folders.

@mase Normal USB Sticks work. External storage as well. The directories appear everytime, doesnt matter if i unlock the screen or not.

Thats a part of the output of the syslog:

Jun 19 18:19:51 neo-pc kernel: [  165.865902] usb 1-6: New USB device found, idVendor=05c6, idProduct=901d
Jun 19 18:19:51 neo-pc kernel: [  165.865909] usb 1-6: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Jun 19 18:19:51 neo-pc kernel: [  165.865912] usb 1-6: Product: FP2
Jun 19 18:19:51 neo-pc kernel: [  165.865915] usb 1-6: Manufacturer: Fairphone
Jun 19 18:19:51 neo-pc kernel: [  165.865917] usb 1-6: SerialNumber: ed39b609
Jun 19 18:19:51 neo-pc mtp-probe: checking bus 1, device 8: "/sys/devices/pci0000:00/0000:00:03.3/usb1/1-6"
Jun 19 18:19:51 neo-pc mtp-probe: bus: 1, device: 8 was not an MTP device
Jun 19 18:20:00 neo-pc kernel: [  174.333244] usb 1-6: USB disconnect, device number 8
Jun 19 18:20:00 neo-pc kernel: [  174.852060] usb 1-6: new high-speed USB device number 9 using ehci-pci
Jun 19 18:20:00 neo-pc kernel: [  174.990135] usb 1-6: New USB device found, idVendor=2ae5, idProduct=9039
Jun 19 18:20:00 neo-pc kernel: [  174.990144] usb 1-6: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Jun 19 18:20:00 neo-pc kernel: [  174.990149] usb 1-6: Product: FP2
Jun 19 18:20:00 neo-pc kernel: [  174.990152] usb 1-6: Manufacturer: Fairphone
Jun 19 18:20:00 neo-pc kernel: [  174.990156] usb 1-6: SerialNumber: ed39b609
Jun 19 18:20:00 neo-pc mtp-probe: checking bus 1, device 9: "/sys/devices/pci0000:00/0000:00:03.3/usb1/1-6"
Jun 19 18:20:00 neo-pc mtp-probe: bus: 1, device: 9 was an MTP device

@neolovich
What’s your distribution? Maybe too old. Strange, that the folders appear.

Linux Mint Debian Edition 2. LTS until 2020 but it is based on debian 8 so it is a old one.

How about trying Debian Stretch? That’s the new stable released last Saturday. Or try a XFCE live image to check if it is working. Don’t know, if the Stretch live images are ready to download.
I have no Jessie Desktop here to try out.
Did you check the backports for a newer library?

I used MTP in Thunar without problems (after installing those packages) with Debian Jessie XFCE in the past. No need to change distro.

@neolovich: Try to disable developer options in your phone (if enabled), and give it a reboot. Then try again. Android’s media server shows this type of weird behaviour sometimes and USB Debugging causes me some incompatibilities in the past.

Thanks again for the answer.
Tried it without effort. Also tried to conect the phone with Manjaro Linux and a Windows 7 Computer. Same problem. So i think i try to flash Android 6 again.
What is the best way to make a clean installation? Wipe the phone via TWRP right?

Edit: I saw that LineageOS is also available now. Think ill try this.

Same here (or more or less the same). Invested some time today to make this working but I was not successful.

  • FP2 - FP Open 17.03 (I know I should update but this should not be discussed here) -

  • the phone is encrypted but this should not be an issue when it is running

  • USB mode is MTP and it is shown as notification (usb debugging disabled)

  • Linux machine runs a rolling release distro based on Debian called SolydXK (I chose the XFCE variant -> SolydX)

    jmtpfs /home/smojo/fp2

    Unable to open ~/.mtpz-data for reading, MTPZ disabled.
    Device 0 (VID=2ae5 and PID=f003) is UNKNOWN.
    Please report this VID/PID and the device model to the libmtp development team
    PTP_ERROR_IO: failed to open session, trying again after resetting USB interface
    LIBMTP libusb: Attempt to reset device
    LIBMTP PANIC: failed to open session on second attempt
    terminate called after throwing an instance of 'MtpErrorCantOpenDevice’
    what(): Can’t open device

Installed LineageOS now and it seems, that i can copy files into folders at the internal storage without problems. But with th SD Card it doesnt really work either. Phone gets hot and takes a long time to open it.