I connected USB cable from Nexus 7 running Ubuntu to my Ubuntu laptop but there is no new USB device found when I run lsusb. Is this function supported?
6 Answers
UPDATE Please take a look below for go-mtpfs example. go-mtpfs is much more reliable, but the instructions remain very similar.
Automatically mounting Nexus 7
Allow non-root users to mount fuse devices:
sudo vim /etc/fuse.conf
Un-comment **user_allow_other**.
Install mtpfs
sudo apt-get install mtp-tools mtpfs
Make mount point
sudo mkdir /mnt/nexus7
chown youruser:youruser /mnt/nexus7
Add udev rules
sudo gedit /etc/udev/rules.d/99-android.rules
#Nexus7
SUBSYSTEM=="usb", SYSFS{idVendor}=="18d1", MODE="0666"
sudo chmod +x /etc/udev/rules.d/99-android.rules
Add Nexus7 to fstab
sudo vim /etc/fstab
mtpfs /mnt/nexus7 fuse user,noauto,allow_other,defaults 0 0
Restart udev
sudo service udev restart
Access device
mount /mnt/nexus7
umount /mnt/nexus7

- 11,247
-
As well as manually mounting/unmounting, Nautilus should display your Nexus 7 in your 'Device' list so that you can more easily access it. – earthmeLon Nov 12 '12 at 20:40
-
After having various issues on different devices, I have switched to go-mtpfs, with most of these instructions remaining the same. – earthmeLon Mar 12 '13 at 22:18
-
I highly doubt this will work if it doesn't even show in lsusb. With the right cable, it works with out-of-the-box 13.10 – NoBugs Dec 26 '13 at 22:21
-
Glad to know that 13.10 supports this device out-of-the-box. This is mostly for previous versions of Ubuntu, which require special setup. @NoBugs – earthmeLon Dec 27 '13 at 20:29
A blog post by Bilal Akhtar has a supposedly more reliable way to connect to Android 4.0+ devices from Ubuntu. The steps are summarized here:
Install the
go-mtpfs
library, which you'll be using to connect:sudo apt-get install golang fuse git-core libmtp-dev libfuse-dev sudo adduser $USER fuse mkdir /tmp/go GOPATH=/tmp/go go get github.com/hanwen/go-mtpfs sudo mv /tmp/go/bin/go-mtpfs /usr/bin/ mkdir ~/MyAndroid
Note: At some point during installation, a screen may come up in your terminal asking if you want to share information about public Go packages you install with the developers. Feel free to answer this question however you want.
Mount your Nexus 7 or whatever using this command after plugging it into your USB port:
go-mtpfs ~/MyAndroid &
When you are finished, unmount your device by using this command:
fusermount -u ~/MyAndroid
I would also like to thank James Gifford for pointing this article out to me on Google+. ;)

- 14,781
I found that it doesn't work with cheap cables - if it doesn't even show "Nexus" in lsusb, your cable is bad. Try a better one.

- 1,400
-
1Some cables are "power only" for charging. No data lines, so those cables of course will not work. – ubfan1 Dec 26 '13 at 22:42
-
The one I first tried had 5 connections in the microUSB end, though it doesn't do anything but charge. – NoBugs Dec 27 '13 at 00:20
If the Nexus tablet has the Software Data Cable app available, this program will let you easily transfer files via a wireless link. See:
http://linuxnorth.wordpress.com/2012/04/23/a100-to-ubuntu-file-transfer/
and
http://linuxnorth.wordpress.com/2012/04/24/software-data-cable-addendum/

- 2,672
In contrast to all the other answers I would still claim that it's not yet possible at all. The question is clearly about "Nexus 7 running Ubuntu" and as far as I understand there is no special service in this first Ubutu port for the Nexus 7 that acts as a USB device. I have a Nexus 7 running Ubuntu here and didn't succeed with any of these solutions mentioned.
I think, all answers so far target Nexus 7 running Android.
Please correct me if I am wrong.

- 1,001
Install this PPA : https://launchpad.net/~langdalepl/+archive/gvfs-mtp
Update and upgrade.
Hey presto, working MTP support that automounts a Nexus 7 as a browsable folder in Nautilus.

- 5,216
sudo apt-get install mtpfs mtp-tools gmtp
and thensudo mtp-detect
, then launchgmtp
. – Marco Scannadinari Nov 12 '12 at 22:00