How to Connect Your Galaxy Nexus to Ubuntu And Enable File Transfer

While Android is based on the Linux kernel, that doesn’t mean it plays well with Linux distro. If you are a proud owner of the Galaxy Nexus, you will find that it doesn’t come with a micro SD-card slot where you can transfer files to and when you connect your phone to your Ubuntu, it doesn’t show up in the File Manager. In short, you are not able to transfer files into and out from the phone.

Why is this so?

Most older Android phones are using the USB block mode to connect to your computer. In this mode, the computer will see your phone’s SD card as a USB device and mounts it as one. The bad thing about this USB block mode is that once your SD card is mounted in the computer, it won’t be functional in the phone. Any app that depends on the SD card will fail to work during the time when your device is connected to the computer.

The Galaxy Nexus (and several other Android tablets) uses the Media Transfer Protocol (MTP) which has several advantages over the USB block mode. The greatest benefit is that it allows you to use the whole (internal) partition for apps, music, media, photos, etc and not have the hardware manufacturers allocate for you the storage amount for your apps and photos.

Ubuntu doesn’t come pre-installed with support for MTP, that’s why you can’t get your computer to see the phone after you have plugged it into the USB port.

gMTP is a simple MP3 and Media player client for MTP-based device. It provides a GUI for you to mount your Galaxy Nexus and transfer files in/out of it. We will need to compile some code in the process. Follow the steps below and you will be fine.

1. Open a terminal. Install libusb-dev

2. We are going to need a copy of the libmtp file. The version in the Ubuntu repo is outdated, so we need to download the latest version of libmtp here. (For your info, I am using libmtp-1.1.2.tar.gz).

3. Extract the libmtp file to your Home folder. Back to the terminal:

This will compile and install the libmtp file.

4. Lastly, install gMTP

Now, plug in your Galaxy Nexus and open gMTP. Press the Connect button. If successful, you should see the SD card folder of your Galaxy Nexus. You can now transfer files using the Add/Download button.



1. Even if it is connected in gMTP, your device won’t appear in the File Manager. You can manage your files transfer only in the gMTP GUI.

2. When attempting to download files from your phone, it will return an error saying the file is not found. This is because the default Download path has been to set to “/” (root) and you have no permission to write to the root folder. To change this, simply open the Preferences and change the Download path to “/home/username” or any other path that you desire.


That’s it.

Damien Damien

Damien Oh started writing tech articles since 2007 and has over 10 years of experience in the tech industry. He is proficient in Windows, Linux, Mac, Android and iOS, and worked as a part time WordPress Developer. He is currently the owner and Editor-in-Chief of Make Tech Easier.


  1. I’ve tried about a half dozen of these G-Nex MTP how-to’s,  and none of them work.  I end up with stuff like copying a directory, and all the files that were inside it end up outside of it.  Then I can’t delete the stuff which copied incorrectly.  And that’s If the phone mounts at all.  Fortunately There’s FTP servers available for Android.  I installed Swift FTP, which once it’s started allows me connect to the phone with Nautilus through my Wifi.  I copied over about 25g of music that way.  

    Somebody needs to fix the MTP thing though.  The phone should just show up in the file browser without having to mess around.  The Linux community needs set up a system where people can donate money towards solving the problems they run into.  When enough money has been donated towards a given problem, some hacker can get the money by solving the problem.  Theres a couple of issues which I would gladly donate $100 towards seeing solved. 

    1. The gMTP method has been working for me all the while, so I am quite surprised that you can’t get it working. While not as intuitive as the native file manager, the gMTP does get the work done, at least for me.

      1. yeah well, I have had another experience, the goddamn mtpfs, go-mtpfs, gmtp don’t work for me. I’m using an optimus L5 so PTP is out of the question and I’m using a 3G internet dongle so I can’t use the Airdroid or Swift FTP.

        Get your shit together Ubuntu, It’s supposed to just work out of the box.

  2. this was very useful – thank you.  I do however get the following error message each time I attempt to load a song onto the galaxy: “Error creating or updating album.”  I can click ok, and it works fine then, but it seems I’d have to click ok for each of the thousand or so songs I’d like to transfer.

    Is there a way around this?

    1. That’s weird. It works fine on my pc. Is there any difference in the configuration as above?

  3. After doing this tutorial, when I press “connect” i get: gmtp: symbol lookup error: gmtp: undefined symbol: LIBMTP_Detect_Raw_Devices

    1.  The issue is probably due to version 1.1.3 of gmtp. Try again with version 1.1.2. It works fine on my machine.

  4. I am getting the same error that TAOCHOK named.  Initially the program installed and I had it in the dock but it would not connect to the phone and after a couple of times trying, it would not load at all.  I had followed the instructions in this post.  I then went into the Ubuntu s/w center and did an auto uninstall, rebooted and installed the program from there.  The error remains the same.  I am going to have to find someone with a freaking windows install and transfer my music using their machine.  This officially sucks.  Regardless of how much Google wants me to use their cloud service, this phone NEEDS a microSD slot.  That is what stops this from being a perfect device for me.

    Google will hear about it.  I hope they care.

  5. This gMTP application just closes when I click on ‘Connect’. Maybe it’s lazy today, not feeling like reading some folders at the moment, who knows

    1. I am having exactly the same problem – gMTP falls after pressing connect. Did you find any solution?

  6. Hi,
    I get

    Detect: No raw devices found.
    Device 0 (VID=04e8 and PID=6860) is a Samsung GT-P7310/P7510/N7000/I9100/Galaxy Tab 7.7/10.1/S2/Nexus/Note.
    PTP_ERROR_IO: failed to open session, trying again after resetting USB interface
    LIBMTP libusb: Attempt to reset device

    If you have any idea…
    Welcome :-)

  7. Connected my Nexus 7 to Ubuntu 12.04. v1.1.3 of gmtp was missing stuff, v1.1.2 worked fine. Still working on getting nexus to recognize epub books transferred to it.

  8. Same here, gMTP shows No device attached, sometimes it shows the root folders but it takes too long to navigate and then it just disconnects. What a disappointment.

  9. The problem with these instructions is that you’re compiling a custom version of libmtp, but then installing the Ubuntu version of gmtp, which will pull in the compiled Ubuntu libmtp9 package as a dependency. Who knows which version any given gmtp is invoking?

    If you’re going to build libmtp from source, I think you have to build gmtp from source as well, and make sure that the Ubuntu binary libmtp9 package isn’t installed.

  10. re gnomad2 – no it didn’t work on my ubuntu 10.04 installed from repository connected to Galaxy Tab 2 10.1

  11. Hi,

    First thank you for giving the time to write the article. It was really helpful and I was able to connect to my Samsung Galaxy S3. But connection is WAY too slow every time I click on an item I have to wait for 5 to 20 seconds…
    Anyway I’m glad I read the comments, I’m going to go for the FTP solution.
    Again thank you

    1. You should check out this article instead for a better solution:

  12. I’m trying to connect to a Nexus 7 from Ubuntu 12.04. tried gMTP and keep getting the “Failed to get storage parameters from the device – need to disconnect.” message on the last song in an album. gMTP then dies and needs to be re-started. I also cannot copy more than a single album at a time. Major bummer! Is there anything better out there?

    1. yes. Check out this link ( for the go-mtpfs solution

Comments are closed.