Howto access MTP devices via USB on Ubuntu 12.04

September 1, 2013

A friend asked me how he can access his Nexus 7 device via USB on his Ubuntu 12.04 notebook. With Android versions below 4.0 that was simple as the device registered as mass storage device. The problem now is the stock Ubuntu 12.04 does not support MTP via GVFS (the virtual filesystem of the GNOME desktop). Newer Ubuntu versions e.g. 13.04 have already a GVFS version which support MTP. But these are no LTS versions of Ubuntu, which I recommend for the average user. But it is quite easy to install a newer version of GVFS on Ubuntu 12.04 (and 12.10) that does support it.

First you need to start a terminal. For this click on the dash home icon (1) and than type “terminal” (2) and you’ll the terminal icon – click on it (3.)

terminal

Now copy and paste following into the Terminal (the PC needs to be connected to the Internet while going through these steps):

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

Enter your user password and than you’ll be shown following text:

You are about to add the following PPA to your system:
These builds of gvfs have my native mtp backend backported from gvfs master. Use this to easily access MTP based devices with Nautilus.
More info: https://launchpad.net/~langdalepl/+archive/gvfs-mtp
Press [ENTER] to continue or ctrl-c to cancel adding it

Hit the Enter Key. After this is done you need to type following command, which updates the package list:

sudo apt-get update

After this was successful you need to upgrade the installed packages with:

sudo apt-get upgrade

It should show something like this:

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
gvfs gvfs:i386 gvfs-backends gvfs-bin gvfs-common gvfs-daemons gvfs-fuse gvfs-libs gvfs-libs:i386 libmtp-common libmtp-runtime libmtp9
12 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 4,193 kB of archives.
After this operation, 4,157 kB of additional disk space will be used.
Do you want to continue [Y/n]?

Just press Enter here (the Y is the default section) to install the packages.

Now you just need to restart your PC and after login just connect your Android device to the PC and the file manager Nautilus will launch with your USB device.

28 Comments »

RSS feed for comments on this post. TrackBack URI

  1. Thanks a ton !!!
    This helped in recognizing and transferring files from Ubuntu 12.04 to the Nexus 7 2nd gen.

    Tried many ways with XP SP3; nothing worked.

    There is just a minor issue. Shows an error when ejecting the device.

    -DS

    Comment by DS — September 19, 2013 #

  2. It did not work for me. I am wondering how to troubleshoot this.

    I checked with gvfs-mount

    HP-2000-Notebook-PC:~$ gvfs-mount -l
    Drive(0): CD/DVD Drive
    Type: GProxyDrive (GProxyVolumeMonitorGdu)
    Drive(1): Secure Digital Drive
    Type: GProxyDrive (GProxyVolumeMonitorGdu)

    so it is mounted but it does not show up in nautilus and I cannot find the mount point.

    Comment by Victor Reppeto — December 7, 2013 #

  3. […] Ref: Howto access MTP devices via USB on Ubuntu 12.04 | Robert Penz Blog […]

    Pingback by elementary OS 0.2 (Luna) 桌面調校備忘 « Jamyy's Weblog — January 6, 2014 #

  4. Only limited operation available for Samsung S4 LTE (GT-I9505). Can copy files from device but not open files directly on device. Gives “Failed to open input stream” (example of the messages) type of error.

    It would be great to get an update to make Samsung S4 supported.

    Comment by Tapio Valli — February 3, 2014 #

  5. Hello,
    This did not worked with wy Ubuntu 13.10 and my Motorola Moto G with Android 4.3. Any idea?

    Comment by Hugo Leonardo Ribeiro — February 6, 2014 #

  6. Thank you so much!
    I have two tablets and a phone that would not connect.

    Your solution is elegant and seamless.

    Great work!

    Comment by Glutier — February 9, 2014 #

  7. What the hell… because of this program I have lost all my photos that was the cutting apparatus for linux partition, this program is nothing reliable, I created the folder and nothing stopped copying when forced shut up process in case the nautilus, there were more pictures on your smartphone and in hd, LOST ALL MY FILES ……………………………

    Comment by jonas — April 2, 2014 #

  8. Very nice solution, but it did not worked for me. The following link did solve it: http://www.maketecheasier.com/manage-files-on-your-kindle-fire-hd-with-ubuntu

    Cheers!

    Comment by Marco V — April 4, 2014 #

  9. Nice solution but it did not work for me, The following link did: http://www.maketecheasier.com/manage-files-on-your-kindle-fire-hd-with-ubuntu

    Cheers!

    Comment by Marco V — April 4, 2014 #

  10. It works great. Thank you.

    Comment by pkkalan — April 16, 2014 #

  11. This solution worked perfectly. I tried so many different things from other posts and spent hours and hours with no results. I used it for Ubuntu 12.04 and Kindle Fire HD. It only took a couple of minutes to set up. Thanks so much!

    Comment by cosmicsuds — April 19, 2014 #

  12. This solution worked great. It only took a couple of minutes. I was using Ubuntu 12.04lts and Kindle Fire HD. Thanks so much!

    Comment by cosmicsuds — April 19, 2014 #

  13. Thanks! I just purchased a Nexus 5 and I could not upload the info from my old Samsung Galaxy Young. Your tutorial worked as a charm. Uploading info to my new device via USB as I write.

    Thank you so much!

    Comment by AJ — November 25, 2014 #

  14. Ton of thanks. I have micromax a310 device and in order to mount it, I’ve tried lots of commands by reading other articles but nothing work-out for me. But after go through your given article I have installed the GVFS and my mtp-device got detected in Ubuntu 12.04 LTS.

    Thanks !!

    Comment by Deepen — December 21, 2014 #

  15. Ubuntu 12.04 (precise) (32-Bit) with current updates until december 2014
    device: Android 4.0.4

    shows device, but couldn’t find mountpoint and do not work anyway:
    $ gvfs-mount -l
    $ nautilus computer:///

    set back to previous installed package:
    $ sudo ppa-purge ppa:langdalepl/gvfs-mtp
    and restart!

    that works for me:
    http://cloudlog.de/android-unter-ubuntu-mit-go-mtpfs-mounten/
    (german only)

    $ sudo add-apt-repository ppa:webupd8team/unstable
    $ sudo apt-get update
    $ sudo apt-get install go-mtpfs go-mtpfs-unity
    type in dash home: android
    and move icon to sidebar

    hope that helps
    have fun!

    Comment by Fredy — January 3, 2015 #

  16. Worked for me.
    Thanks!!!

    Comment by Holy — January 21, 2015 #

  17. Thanxxx

    It worked for me!!!!!!!!!!! 🙂

    Comment by Das Diwakar — March 5, 2015 #

  18. It worked for me with a OnePlus One on Ubuntu 12.10
    (Make sure to reboot before testing)

    Thanks.

    Comment by Mr. X — March 15, 2015 #

  19. Thanks!! It worked like a dream!

    Comment by Nathan — March 26, 2015 #

  20. Thanks a lot! It works fine:-)

    Comment by Dhruva Bedre — April 17, 2015 #

  21. Is this command supposed to take hours ?
    sudo apt-get upgrade

    Sorry I am new to ubuntu, hence asking…

    Comment by Niz — January 26, 2016 #

  22. This didn’t work for my phone connection. any other way of doing this???

    Comment by Niz — January 26, 2016 #

  23. It takes only long if you need to install many new packages. If the system is up2date it should be fast. But this post is about 12.04 .. the current LTS Release of Ubuntu is 14.04 which has that out of the box.

    Comment by robert — January 26, 2016 #

  24. I run Ubuntu 12.04 lts and have a moto x style mobile. I was not able to see the folders on my mobile on nautilus when connected via USB. I used your solution and still it did not work. I did not see the device on nautilus. It works on win xp without any new sw. But the following solution worked.

    sudo apt-get install gmtp.

    gmtp is a seperate app and not nautilus based and work fine. I can add music movies etc as well transfer and delete etc.

    Now how do I undo the stuff that I did with your commands. I want it removed from my system.

    Comment by RK — July 11, 2016 #

  25. still I am unable to connect my android mobile in my ubuntu
    laptop

    Comment by nizar ali — April 29, 2017 #

  26. That article is really old. Ubuntu 12.04 is even not anymore supported nor gets security updates.

    Comment by robert — April 30, 2017 #

  27. from which web site i may obtain procedure to connect my mobile in ubuntu 12.04 for mtp

    Comment by nizar ali — May 5, 2017 #

  28. None, upgrade to a new version of Ubuntu. Yours is > 5 years old, and will not get security fixes. Its like running Windows XP today.

    Comment by robert — May 5, 2017 #

Leave a comment

XHTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Powered by WordPress
Entries and comments feeds. Valid XHTML and CSS. 39 queries. 0.052 seconds.