Connecting the Google Nexus 7 to Ubuntu / Mint over USB

I have had the pleasure of using a Nexus 7 for the past few days, and while it is a fantastic tablet all around, there is one minor roadblock I hit, which was connecting it to my Ubuntu laptop to transfer files via USB. The problem stems from the fact that the Nexus 7 uses the Media Transfer Protocol (MTP), support for which is not included by default (yet) on Ubuntu.

But as with all things Linux, mounting the tab and transferring files was accomplished with only a few simple commands. Here is what I had to do:

  1. Open a terminal.
  2. Create a udev rules file for the Nexus 7 with it’s device id (18d1)
    sudo nano /etc/udev/rules.d/99-android.rules
  3. Paste the following contents into the, save and exit (ctrl+o, then ctrl+x):
    # Nexus 7
    SUBSYSTEM=="usb", SYSFS{idVendor}=="18d1", MODE="0666"

    You can find a list of vendor ids for various Android OEMs here.

  4. Make the file executable (gotta love the security on Linux)
    sudo chmod +x /etc/udev/rules.d/99-android.rules
  5. Install the mtp libraries from the repos
    sudo apt-get install libmtp-common libmtp-runtime libmtp9 mtpfs mtp-tools
  6. Create a mount point for the Nexus 7 and make it accessable to all users
    sudo mkdir /media/nexus7
    sudo chmod 755 /media/nexus7
  7. Finally plug your Nexus 7 into an empty USB slot on your comptuer and run the following command on the terminal:
    sudo mtpfs -o allow_other /media/nexus7
  8. In a few seconds, the tablet should appear mounted as an external drive on your file browser.
  9. Note that these steps are applicable to all Debian based systems including Linux Mint
  10. When you are done moving files, unmount the mounted folder before unplugging the device.
    sudo umount /media/nexus7

Leave a Reply

Your email address will not be published. Required fields are marked *


− two = 3

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>