FP, Linux and MTP file transfer

With the 1.6 update, MTP has become the standard file transfer option. It’s a bit tricky getting the protocol to work with Linux, and solutions may differ depending on your distro.
FP’s official support advice can be found here:
https://fairphone.zendesk.com/hc/en-us/articles/200913399-How-to-connect-your-Fairphone-to-a-computer-PC-Mac-and-Linux-

Lidwien, running Fedora, has found another way:

On my own slackware-based distro (FluxFlux) I’ve tested four different solutions with various degree of success.

  1. mounting with mtpfs.You’ll need to mount/unmount as root from a terminal, then FP is accessible through your standard file manager. A bit buggy: the phone mounts, I can browse the files and copy to my PC, but copying from PC to phone fails.
  2. mounting with jmtpfs - basically the same application as (1) but seems to be more stable, and file transfer works in both directions. An odd thing is that if I from my PC delete a file stored on the phone, the file name stays there and need to be deleted from within the FP. But copying works OK.
  3. gMTP - again, root access is necessary, ‘sudo gmtp’ works fine if you make the necessary addition to your /etc/sudoer file. Smooth gui, but it takes some time for gMTP to chart the phone (30 seconds or so) and file transfer is a bit slow.
  4. the airdroid app for Android: works as a web-based FTP client and allows you to transfer files via internet if your phone and PC are connected to the same wifi network (or with a USB cable and tethering).

The old ‘USB storage’ transfer option still works, but with limited phone access (external SD card only)

Are there any other options out there worth testing?

Hi kgha.

If you mean “via internet” that your data is literally send to an external server than I can’t see why you would use this for file transfer (maybe syncing).
I always liked the WiFi SSHDroid method - start the app, login into your phone and copy whatever you like.

P.S.: Is there an explanation why it worked for Lidwien under Gnome but not under XFCE? Are the mount tools acting any differently?

Airdroid’s presentation of itself is not entirely clear, but no, it doesn’t seem as if data is sent via (or stored at) an external server. Both devices must be connected to the very same wifi network which suggests that they speak directly to each other, so to say. ‘Via Internet’ was probably not the best way of putting it :stuck_out_tongue:

I just wanted to state that with Ubuntu 14.04 LTS i have no issues at all connecting the FP1 as long as it is unlocked when i plug it into my PC.
I did not install any extra software.

Both is possible: LAN Connection Mode and Remote Connection Mode
How else would they be able to give you the choice of erasing your phone if it’s stolen.
What is Lite Mode?
AirDroid seems secure but data is still stored on their servers if in Remote.

Will it just be in the file manager? No udev tinkering?

1 Like

Thanks for clarifying the airdroid bit!
For me, the jmtpfs solution is the fastest and easiest, while at the same time doing what I need it to do, so I’ll probably stick to that for now. A new version of my slightly outdated distro, with a new kernel, will be rolled out any day now, and that may change things - maybe the FP will show up directly as for ben and Lidwien.

I tried go-mtpfs, following instructions here:


it works fine for me under Kubuntu 12.04

Well i can’t remember tinkering with udev and just checked my /etc/udv/rules.d and can’t find anything Fairphone specific here. This is how i looks in nautilus when i plug in my Fairphone in MTP mode in Ubuntu 14.04.

@ben: You have not updated to the “uniform parition” or whatever is called update, have you?
It’s the one that deletes all your data – and yes, even if you back up your personal data and your apps, there are still quite a few settings that are lost (e.g. my “swiping” screen lock).

What you show above is how it looked, before I upgraded; where the internal storage was shown together with the SD card… Quite convenient, because I could easily move files from one to the other on my Linux pc…

@Martin_Maechler I am runnning 1.6 and i have updated to unified storage. The screenshot shows how it looks after the OS and storage update in MTP mode.

In USB mode, only the sd card is visible.

Thank you. With this confirmation, I was motivated to do the tinkering in http://ubuntuforums.org/showthread.php?t=2226702
I did edit the fuse.conf file, used lsusb, then edited /lib/udev/rules.d/69-mtp.rules as indicated,
and rebooted (no need for editing the other (/etc/udev/....) file.

And indeed, there they were nicely with icons in the file browser.
To access the files using old style tools in the shell seems problematic though. So I don’t seem to be able to do much more than copying and moving files…
Well I was able to cd to the funny /run/user/1000/gvfs/mts:.... directory which I had found clicking Properties in the file browser.
A little later (unplugging, replugging) I can no longer look into it, and the shell where it was “active” hangs… Hmm… Still better than nothing, but not exactly great

1 Like

May i ask what version of Ubuntu you are running? I cannot remember changing or installing anything, i thought it just works.

Need to try with a fresh install sometimes.

ubuntu 14.04 LTS … but not at all a fresh install; rather updated a gazillion times. Yes, I can try another of our home computers where I freshly installed 14.04.

At work, I currently have Fedora, F19 (yes, not quite current) and it does not work “out of the box”, even though the FP shows as device in the file browser (and also, the “fuse” stuff in /etc/mtab ); here too, however, the rules.d file has 100s of entries but not the Fairphone one with productID 2008.

… aah I found a solution — In the FP configuration options -> Developer options -> USB Debugging
I chose to allow them (inspite of some warnings “for debugging only” …), and now
things mount nicely … at least on my Fedora F19 desktop…

That should not be necessary, should it?

USB cable and tethering only work when you use the phone as an access point for your computer (Internet ═[3G]⇒ FP ═[USB]⇒ computer).

In the other direction (sharing the internet connection of your computer with your phone over USB: Internet ═[ISP]⇒ computer ═[USB]⇒ FP; aka reverse tethering), it doesn’t work. Airdroid doesn’t seem to recognize the USB network connection as a valid connection: pressing the Start button in Airdroid doesn’t do anything.

Thanks @Martin_Maechler! The thread in Ubuntuforums was the solution for me. :blush:
My FP1U with OS 1.6 wasn’t recognized at all. After following the steps and replacing the code with the FP specific id it works now. (hopefully it keeps working for a long time :P)

I get a “no device found - try replugging it”

For people using KDE, there is kdeconnect. It is available for both KDE and as app for android (playstore) The connection goes over wifi, encrypted, you just have to pair your devices and you can easily transfer files. And when you have sshfs installed in linux you can also mount and access your phone with a file browser. Very nice!

1 Like

Hi,
I am new to ubuntu, and I dont really get how I should proceed to make my Fairphone readable by my 14.04 Ubuntu…
All the documentation online is either outdated or impossible to understand for a newcomer. I tried to understand, I tried stuff, and it just didn t work.

Can someone help?

@girouxn: I’m not familiar with ubuntu and there may be other tools available, but one possibility should be to install gMTP (should be available through the Software Centre or simply via apt-get) and its dependencies (at least libmtp is necessary).

the gMTP UI is fairly self-explaining. You may have to wait for a while (15 secs or so) after clicking the ‘connect’ button before your phone storage shows up.