Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Mount your Nexus 7 with MTP
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
wjholden
l33t
l33t


Joined: 01 Mar 2004
Posts: 826
Location: Augusta, GA

PostPosted: Mon Sep 03, 2012 4:29 am    Post subject: Mount your Nexus 7 with MTP Reply with quote

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
Code:
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
Code:
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:
Code:
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.
Back to top
View user's profile Send private message
albright
Advocate
Advocate


Joined: 16 Nov 2003
Posts: 2588
Location: Near Toronto

PostPosted: Mon Sep 03, 2012 8:08 pm    Post subject: Reply with quote

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
_________________
.... there is nothing - absolutely nothing - half so much worth
doing as simply messing about with Linux ...
(apologies to Kenneth Graeme)
Back to top
View user's profile Send private message
danomac
l33t
l33t


Joined: 06 Nov 2004
Posts: 881
Location: Vancouver, BC

PostPosted: Tue Sep 11, 2012 3:41 pm    Post subject: Reply with quote

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...
Back to top
View user's profile Send private message
albright
Advocate
Advocate


Joined: 16 Nov 2003
Posts: 2588
Location: Near Toronto

PostPosted: Tue Sep 11, 2012 9:24 pm    Post subject: Reply with quote

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 ...
_________________
.... there is nothing - absolutely nothing - half so much worth
doing as simply messing about with Linux ...
(apologies to Kenneth Graeme)
Back to top
View user's profile Send private message
wjholden
l33t
l33t


Joined: 01 Mar 2004
Posts: 826
Location: Augusta, GA

PostPosted: Tue Sep 11, 2012 11:12 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
albright
Advocate
Advocate


Joined: 16 Nov 2003
Posts: 2588
Location: Near Toronto

PostPosted: Wed Sep 12, 2012 12:38 pm    Post subject: Reply with quote

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


makes no difference ...
_________________
.... there is nothing - absolutely nothing - half so much worth
doing as simply messing about with Linux ...
(apologies to Kenneth Graeme)
Back to top
View user's profile Send private message
albright
Advocate
Advocate


Joined: 16 Nov 2003
Posts: 2588
Location: Near Toronto

PostPosted: Sun Sep 16, 2012 1:18 pm    Post subject: Reply with quote

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
_________________
.... there is nothing - absolutely nothing - half so much worth
doing as simply messing about with Linux ...
(apologies to Kenneth Graeme)
Back to top
View user's profile Send private message
shazeal
Apprentice
Apprentice


Joined: 03 May 2006
Posts: 206
Location: New Zealand

PostPosted: Mon Sep 17, 2012 8:47 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
grant123
Veteran
Veteran


Joined: 23 Mar 2005
Posts: 1080

PostPosted: Sun Nov 25, 2012 3:15 am    Post subject: Reply with quote

gigolo works great for opening the device in thunar.
Back to top
View user's profile Send private message
mikegpitt
Advocate
Advocate


Joined: 22 May 2004
Posts: 3224

PostPosted: Thu Nov 29, 2012 3:28 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
blackraven
n00b
n00b


Joined: 28 Jan 2013
Posts: 3

PostPosted: Mon Jan 28, 2013 10:16 pm    Post subject: Reply with quote

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.
_________________
WBR
BR
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum