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.