Support for Nexus 4 in Ubuntu 12.10

Google Nexus 4, by LG
Google Nexus 4, by LG

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.

21 thoughts on “Support for Nexus 4 in Ubuntu 12.10

  1. Not working for me. After I run the above command and a reboot, once I plug my phone I get several dialogs about not being to mount Nexus 4…

    Guy Kroizman

  2. Which version of Ubuntu is it? Did yo unlock the phone? Did you install successfully the backport packages?

    sukria

  3. Hey Bob! AirDroid looks nice indeed, and the Ubuntu stuff as well, but I don’t like the idea of wiping out my phone for testing it ;)

    sukria

  4. Works for my Nexus 4 and Nexus 7 in Ubuntu 12.04. Better than the other Nexus MTP hacks.. Thank you.

    Ranel Padon

  5. Finally something that actually works!

    Johnny Rosenberg
    Ubuntu 12.04

    Johnny Rosenberg

  6. Great! Works for my Nexus 4 in Ubuntu 12.04LTS. Thanks a lot!

    Jim Chang

  7. Sukria,

    It works for me. Asus A43E – Ubuntu 13.04. LG L7 – ice Cream Android. THANKS A LOT !!!

    In terminal:

    sudo add-apt-repository ppa:langdalepl/gvfs-mtp
    sudo apt-get update

    Suddenly “Software Updater” fired up, suggesting update available for GFVS, click install update. Not even restarting required.

    USB cable connected. Handphone did file scanning. After completed, handphone files were shown in Ubuntu desktop. Move, copy etc as usual.

    Toni Ridwan

  8. Many thanks for a fix for this that works first time! Been looking for an easy way to access the Nexus for ages and was getting very frustrated with gMTP which kept crashing. Can finally treat the phone like a USB device.

    Thanks again :-)

    Lucy Palmer

  9. Tony, in 13.04 you should not have to do this, there is support by default. Works fine for me without extra installs.

    Thomas

  10. i followed all the steps but still not working on my nexus 4. i,m usin ubuntu 12.04 LTS. i need so help please, i am a beginner on ubuntu.

    ionutzzz

  11. The only difference was I started the commands with
    sudo su
    typed my password, and after, the commands below without “sudo”

    André

  12. Worked for Nexus4 on Ubuntu 12.10, thanks so much!

    Sunita

Comments are closed.