Support for Nexus 4 in Ubuntu 12.10
If you’re the happy owner of a Nexus 4 (what an amazing device!) and a Ubuntu user, you probably got surprised when you plugged the phone in your computer for the first time. WTF, this phone doesn’t support the mass-storage protocol? Seriously? Is it an iPhone or what?
Indeed, you can look over all the settings of the Nexus 4, no mass-storage, at all! Not even one setting about “USB connection”.
Don’t be afraid, it’s not an iPhone, you will be able to transparently see the device in Ubuntu, transfer your files as you wish and even enjoy the pleasure of copying your music files with Nautilus. It’s just that the phone uses a rather new protocol: MTP, the Media Transfer Protocol. This protocol has been designed by Microsoft and according to Wikipedia is better than mass-storage because it prevents a host from corrupting the files hosted by the USB device.
So, all we need to do is to enable MTP support in Ubuntu. The good news is that GVFS (The GNOME virtual file-system) supports MTP in the upcoming new version of Ubuntu (13.04) and backports exist for 12.04 and 12.10.
So all you need to do is to install those backports, reboot your desktop, and plug-in your Nexus 4!
Let’s do that!
Add the backport repository for MTP support in GVFS.
sudo add-apt-repository ppa:langdalepl/gvfs-mtp sudo apt-get update
Then, upgrade the system, you should see many gvfs packages in the list.
sudo apt-get upgrade
And then, reboot and you’re done!
Now you can enjoy all the pleasure of accessing your phone via your Ubuntu desktop.