How To Properly Mount Android 4.0+ Devices In Ubuntu Using Go-mtpfs

Mounting an Android 4.0+ device in Ubuntu is pretty tricky, but there is a FUSE filesystem called Go-mtpfs, created by a Google employee because “mtpfs was very unstable” for him, which works great. Read on to find out how to use it and easily install it in Ubuntu using a PPA!
Also see: AirDroid: Manage Your Android Device Using A Browser, however, there are cases when you can’t use AirDroid.
By default, when connecting an Android device to an Ubuntu computer, gvfs is used via gphoto2 (because gvfs doesn’t have native MTP support yet). And that doesn’t always work properly.
Here’s my experience with this: trying to mount my Android 4.2.1 phone fails most of the time (I’ve experienced the same behaviour with Android 4.1 too), usually with some “Sorry, could not display all the contents of “Android”: Timeout was reached” errors. It does work at times, but it’s very slow and with such an unreliable behaviour, an alternative is always nice.
I didn’t try mtpfs but it seems that’s not reliable any more either, but what I did try is Go-mtpfs and it works great under Ubuntu 12.10: it’s fast and it works every time. Well, unless I forget to unlock the phone when I mount it (it’s probably something sleep-related because it doesn’t always happen), but anyway.
I’ve found out about Go-mtpfs from Bilal’s blog and I figured it’s a bit complicated for regular users to compile it so I’ve packaged Go-mtpfs and uploaded it to the WebUpd8 Unstable PPA. Along with Go-mtpfs, I’ve also packed a custom Unity launcher and a script, to be able to easily mount and unmount your Android device without having to use the command line.
Go-mtpfs Ubuntu Unity quicklists
However, while my script (which is used by the custom Unity launcher) tries to display a notification if an error occurs, it shouldn’t be considered reliable for properly displaying the errors so my recommendation is to mount / unmount your Android 4.0+ phone or tablet via command line so you can see any possible errors.

Video: see Go-mtpfs in action
Below you can watch a video I’ve recorded, demoing Go-mtpfs in Ubuntu 12.10 (as well as the custom Unity launcher / script I’ve created for it):

(direct video link; subscribe to our YouTube channel for more videos)
(In the beginning, I’m showing what happens when you try to mount an Android device with without Go-mtpfs, so it’s all waiting and a bunch of errors, if you want to skip to the Go-mtpfs part, skip to 2:05.)

Install Go-mtpfs in Ubuntu
Go-mtpfs is available in the WebUpd8 Unstable PPA, for Ubuntu 13.04, 12.10 and 12.04. Add the PPA and install it using the following commands:sudo add-apt-repository ppa:webupd8team/unstable
sudo apt-get update
sudo apt-get install go-mtpfs
To also install the custom Unity Launcher for Go-mtpfs which lets you mount or unmount the Android device from the Unity Launcher, use the command below:sudo apt-get install go-mtpfs-unity
Note: I’ve only tested it in Ubuntu 12.10, using a Samsung Galaxy S II phone (with both Android 4.1 and 4.2.1).

Why did I use the Unstable PPA? Well, I’ve built Go-mtpfs against the latest libmtp 1.1.5 which is not available in the official Ubuntu repositories and while it didn’t break anything, it’s better to be safe. Since our Unstable PPA only has a few packages, it can easily be purged in case something doesn’t work properly (but everything should work, that’s just to make sure). The PPA only has Synaptic GTK3 for Precise and Quantal right now.


Category: Ubuntu | Comments Off on How To Properly Mount Android 4.0+ Devices In Ubuntu Using Go-mtpfs