Rustic Retreat
Hot Projects
Live broadcasts and documentation from a remote tech outpost in rustic Portugal. Sharing off-grid life, the necessary research & development and the pursuit of life, without centralized infrastructure.
This is an old revision of the document!
Since the Android folks decided that MTP should be the way to connect Android devices via USB I ran into some trouble while trying to get comfortable access to the OnePlus One. There are a couple of forum threads and blog entries out there how to hack some udev rules and use scripts that try to automount the MTPFS. Some recommend mtpfs others use go-mtpfs or jmtpfs. I've tried them all and the result was still not what I wanted to have. Why can't I just plug it in and have it pop up in thunar, like any other USB/Flash device?
Well, the answer is simple: Because I have forgotten to supply the mtp USE flag for gvfs, which manages all mounting related tasks in Xfce4 for me. I also switched to libmtp-9999, because the stable release doesn't know the OnePlus One yet.
Since it's basically a per machine decision, whether it's probable, that it will ever have to mount an MTP device, just put mtp into your global USE flags in /etc/portage/make.conf
Let's see how that would play out:
$ emerge -upvND --with-bdeps=y @world
And voila:
[ebuild U *] media-libs/libmtp-9999 [1.1.6-r1] USE="crypt -doc -examples -static-libs" 0 kB [ebuild R ] gnome-base/gvfs-1.20.2 USE="cdda gtk http mtp* udev udisks -afp -archive -avahi -bluray -fuse -gnome-online-accounts -gphoto2 -ios -libsecret -samba -systemd {-test}" 0 kB
After the emerge and logout/login to get gvfs reloaded you're good to go.
Connected to a Thinkpad x230 USB 2.0 port it sustained about 29MB/s read transfer rate (copying OnePlus One 4k videos to the Thinkpad's SSD), which is more or less the maximum one can get out of USB 2.0 anyways.