# Mount your Nexus 7 with MTP

## wjholden

Your Nexus 7, being a newer Android device, uses Media Transfer Protocol (MTP) instead of connecting as a USB mass storage device.

My setup didn't automatically handle this correctly.

Some people suggested using gMTP. I found this program did not work.

Something that does help is to unmask media-libs/libmtp for the newest version. The stable 1.1.1 does not recognize the Nexus 7's identification numbers. Still works, but I liked that the newer version knows this is an Asus device.

So to mount it, all you need to do is install libmtp and mtpfs and issue

```
sudo mtpfs -o allow_other /path/to/mount/point
```

The mtpfs command correctly grabbed my one and only connected MTP-capable device; I'm not sure what it will do if you have more than one device connected. To remove, simply

```
sudo umount mtpfs
```

I haven't found a good automount solution, but if you want a userspace solution you can add something like this to /etc/fstab:

```
mtpfs          /media/nexus   fuse      user,noauto,allow_other   0 0
```

and set user_allow_other in /etc/fuse.conf. You'll still need to manually mount (e.g., mount /media/nexus) but at least you don't need sudo.

----------

## albright

this does not work for me

the nexus 7 mounts but then the connection breaks

see my post https://forums.gentoo.org/viewtopic-t-931602-highlight-.html

running in gdb did not seem to generate any extra useful

information

----------

## danomac

 *albright wrote:*   

> this does not work for me
> 
> the nexus 7 mounts but then the connection breaks
> 
> 

 

albright: I had the same problem.

Try my solution here. It took a lot of experimenting, but I did eventually get it to work...

----------

## albright

 *Quote:*   

> It took a lot of experimenting, but I did eventually get it to work...

 

no luck for me, on either x86 or amd64 system;

it will mount and I (usually) can copy from the nexus to my desktop but

copying from desktop to nexus causes disconnection (sometimes, very

rarely, it works for one file ...)

I can use the wireless network, which is probably faster than the

absolutely crap mtpfs system ...

----------

## wjholden

The only thing I can think of that hasn't been mentioned elsewhere was to keep the screen on. I have my device encrypted and I assume it kills the USB port when the user is not authenticated.

----------

## albright

 *Quote:*   

> The only thing I can think of that hasn't been mentioned elsewhere was to keep the screen on

 

makes no difference ...

----------

## albright

I discovered that using jmtpfs (from the poly-c overlay) works

much better than mtpfs

I still get long hangs while the nexus is connected. What I mean,

a df -h command will not respond if the nexus is busy for perhaps

30 seconds to one minute; dolphin file manager also hangs for

the same amount of time ...

but the connection otherwise seems stable and files can be

transferred back and forth without losing the connection

----------

## shazeal

Thanks for this worked perfectly on my Samsung Galaxy S3, just had to change the USB ids in the udev rule. I am on stable mtpfs-1.0 / libmtp-1.1.4.

@albright

I dont know about the jmtpfs since I didnt try it, but mtpfs has delays not 30s though.

EDIT: Oh I am on CM 9.10 Rom for the phone as well if that makes any difference.

----------

## grant123

gigolo works great for opening the device in thunar.

----------

## mikegpitt

I'm less than impressed with mtpfs.  I just got a new Nexus 4 and the "mass media" mount option is apparently removed in stock Android now.  (I thought it was there since it's still in new Cyanogenmod builds, but whatever...)

Two main issues I'm having with mtpfs:

1) It's SLOW... it takes a long time to transfer files and even longer to delete them

2) For some reason my directory structure isn't respected.  Files appear outside the proper directories, etc.  Not sure why this is happening, but it makes it quite annoying when transferring GB's of music to then find out the files are scattered all over the place.

I know this isn't a support thread, so I'm not really looking for help (unless someone has some tips)... but sharing in case others have this issue.  Right now I'm transferring files via FTP to the phone, which is also quite slow.

It would be nice to have some of the mtpfs alternatives in the official portage tree.  Maybe I'll check bugzilla.

----------

## blackraven

After fighting for more then hour with varios versions of mtpfs and a lot of googling, I finally got my devices working with gentoo (I've got HTC One X and Nexus 10, both are now working as a charm!). 

I summarized my findings here: 

https://wiki.gentoo.org/wiki/MTP

Feel free to use/comment.

Personally I'll stick with go-mtpfs option as it seems to be more stable, fast and hassle-free.

----------

