Thursday 27 December 2012

Nexus 7 file transfer with Linux via USB

So getting a nexus 7 connected to your linux system and transferring files is a pain in the arse.

So here is the quick quick guide to doing it.

  1. Open a terminal
  2. Create a udev rules file for the Nexus 7 with it’s device id (18d1)
  3. sudo vim /etc/udev/rules.d/99-android.rules
  4. Paste the following contents into the, save and exit (ctrl+o, then ctrl+x):
  5. # Nexus 7
  6. SUBSYSTEM=="usb", SYSFS{idVendor}=="18d1", MODE="0666"
  7. Make the file executable (gotta love the security on Linux)
  8. sudo chmod +x /etc/udev/rules.d/99-android.rules
  9. Install the mtp libraries from the repos
  10. sudo apt-get install libmtp-common libmtp-runtime libmtp9 mtpfs mtp-tools
  11. Create a mount point for the Nexus 7 and make it accessable to all users
  12. sudo mkdir /media/nexus7
  13. sudo chmod 755 /media/nexus7
  14. Finally plug your Nexus 7 into an empty USB slot on your comptuer and run the following command on the terminal:
  15. sudo mtpfs -o allow_other /media/nexus7
  16. In a few seconds, the tablet should appear mounted as an external drive on your file browser.
  17. Note that these steps are applicable to all Debian based systems including Linux Mint
  18. When you are done moving files, unmount the mounted folder before unplugging the device.

  19. sudo umount /media/nexus7


Anonymous said...

thanks for sharing..徵信.

Domenec said...

I don't realize how you know all this thing but thanks a lot for share

Anonymous said...

I was so sure this would work but I got the following =(

Unable to open ~/.mtpz-data for reading, MTPZ disabled.Listing raw device(s)
No raw devices found.

running kubuntu 13.04 on a sony vaio vpcel22fx

Unknown said...

Thanks a lot for sharing this

Anonymous said...

You rock! Worked perfect in Ubuntu 12.04