From Gentoo Wiki
Jump to:navigation Jump to:search
This page contains changes which are not marked for translation.

MTP (Media Transfer Protocol) is a protocol to allow the transfer of files to external devices. It is provided by several programs, most of them depending on FUSE.



Prepare for MTP implementations by activating CONFIG_FUSE_FS in the Linux kernel.

KERNEL Enable FUSE for MTP implementations:
File systems  ---> 
   <*> FUSE (Filesystem in Userspace) support

Available software

Here are some MTP packages available in Gentoo:

Name Package Homepage Description
MTPfs sys-fs/mtpfs A FUSE-based filesystem providing access to MTP devices. More mature than some of the alternatives.
Go-mtpfs sys-fs/go-mtpfs A simple FUSE-based filesystem written in Go language.
jmtpfs sys-fs/jmtpfs A FUSE and media-libs/libmtp based filesystem for accessing MTP devices.
gphotofs media-gfx/gphotofs gphotofs is a FUSE-based file system for interfacing with digital cameras using the gphoto2 application.
simple-mtpfs sys-fs/simple-mtpfs Like the others: a simple MTP FUSE filesystem driver written in C++.
Gnome gnome-base/gvfs Install gnome-base/gvfs with the mtp USE flag enabled. This can be either globally in make.conf's USE flag or for gnome-base/gvfs in package.use.
Thunar xfce-base/thunar-volman To have Thunar automount MTP devices (and other volumes), install the xfce-base/thunar-volman package and make sure gnome-base/gvfs is also installed with the mtp USE flag enabled as above.
Android File Transfer for Linux sys-fs/android-file-transfer-linux Robust MTP implementation with unlimited file size support, partial 64-bit edits, album cover, USB zero copy, with Qt, CLI and Fuse interfaces available.

KDE Plasma 5

kio-extras contains MTP support, but it requires the mtp USE flag.

Enable the global mtp use flag; one way of doing it is by creating a file named mtp in /etc/portage/package.use:

FILE /etc/portage/package.use/mtp
*/* mtp

Then run a @world update:

root #emerge --ask --deep --newuse --update @world

Alternatively, enable it in only in kde-apps/kio-extras:

FILE /etc/portage/package.use/mtp
kde-apps/kio-extras mtp

After either approach mentioned above, install kde-apps/kio-extras:

root #emerge --ask kde-apps/kio-extras

After this, quitting plasmashell and restarting is probably sufficient to get it working.

If that does not work, please try restarting the system.


gMTP is a simple MTP client for Solaris and Linux.

It is sufficient to just install and run media-sound/gmtp:

root #emerge --ask media-sound/gmtp
user $gmtp

Click on connect. A few second later, the file hierarchy on the device should appear. It is now possible to manipulate the files on the device. It support features like Album Artwork and playlists.


  • Make sure the Android device is not going to sleep and the screen is not getting locked. Set screen timeout to very long values, or enable the "Do not turn off the screen" flag in the device's Settings - Development section.
  • Some ROMs (e.g. PAC ROM) require the unlocking of the screen of the device before files will appear. If the screen is not unlocked the device will appear empty.
  • Sometimes (specifically on HTC One X) USB debugging automatically activates when device is connected to a PC. USB debugging must be disabled. Otherwise media-libs/libmtp can't recognize the device.
  • If the device is not recognized by media-libs/libmtp, try upgrading to latest (or even live) version.
  • Lumia devices might require media-libs/libmtp version 1.1.9 and sys-fs/simple-mtpfs to be mounted properly.
    • Lumia devices must be unlocked to be able to connect (enter the user's PIN).

See also

  • MTPfs — a FUSE-based filesystem providing access to MTP devices.