MTP-Media Transfer Protocol in Pisi Linux

MTP or the Media Transfer Protocol, is a USB device class which is used by many mobile phones (e.g. Samsung Galaxy S4) and media players (e.g. Creative Zen).

Linux MTP support is provided by libmtp which can be installed with libmtp from the Pisi Linux Repositories. It can be installed on its own and used to access devices. However, a number of packages are available that use it as a dependency and add additional convenience (e.g. filemanager) functionalities and compatibility with particular device types – which includes improving transfer access speeds.

Integration with file manager

  • To view the contents of your Android device’s storage via MTP in your file manager, install the corresponding plugin:
  • For file managers that use GVFS (GNOME Files, Xfce’s Thunar), install gvfs-mtp for MTP or gvfs-gphoto2 for PTP support.
  • For file managers that use KIO (KDE’s Dolphin), install kio-mtp (not available at the moment for Pisi Linux 2.0) (PTP support is included by default).
  • After installing the required package, the device should show up in the file manager automatically and be accessible via an URL, for example mtp://[usb:002,013]/.


It might be required to create a mount-point directory first. The directory ~/mnt is used as an example below. Also do not forget to unlock your phone’s screen before connecting it to the computer.



Detect your device:


# mtp-detect


Note: Your regular user must be in the uucp group.

Connect to your device:

# mtp-connect

If connection is successful, there are several switch options to use in conjunction with mtp-connect to access data on the device. You might want to use some stand alone commands:

  • mtp-albumart mtp-emptyfolders mtp-getplaylist mtp-reset mtp-trexist
  • mtp-albums mtp-files mtp-hotplug mtp-sendfile mtp-connect mtp-folders
  • mtp-newfolder mtp-sendtr mtp-delfile mtp-format mtp-newplaylist mtp-thumb
  •  mtp-detect mtp-getfile mtp-playlists mtp-tracks

Warning: Some commands may be harmful to your MTP device!

Media players

You can also use your MTP device in music players such as Amarok. To achieve this, you might have to edit /etc/udev/rules.d/51-android.rules (the MTP device used in the following example is a Galaxy Nexus). Run:

$ lsusb

Search for your device. It should be something like that:

Bus 003 Device 011: ID 04e8:6860 Samsung Electronics Co., Ltd GT-I9100 Phone [Galaxy S II], GT-P7500 [Galaxy Tab 10.1]

And entry to /etc/udev/rules.d/51-android.rules will be this:

SUBSYSTEM==”usb”, ATTR{idVendor}==”04e8″, ATTR{idProduct}==”6860″, MODE=”0666″, OWNER=”[username]”

Also reload udev rules:

# sudo udevadm control –reload



If you see a message like:

Device 0 (VID=XXXX and PID=XXXX) is UNKNOWN. Please report this VID/PID and the device model to the libmtp development team

You should check whether your device is listed in the Supported devices list. If it is not, you should report it to the developers team. If it is, your libmtp might be slightly outdated. To allow it to be properly used by libmtp, you can add your device to:



If you have installed the gvfs-mtp package, and your device doesn’t show up in the file manager, you might need to reboot or write a udev rule in order to auto-mount the device.

Plug your device and get the vendor-id and product-id,respectively:

$ lsusb Bus 001 Device 007: ID 0421:0661 Nokia Mobile Phones Lumia 920 (…)

The two numbers after ID are vendorId : productID

Then make a udev rule, e.g.

# nano /etc/udev/rules.d/51-android.rules

Note You need Admin Rights to write it, is not a file there with this name create it

and type this rule:


Reload the udev rules.

# udevadm control –reload

And reboot the system. Now file managers (like Thunar) should be able to automount the MTP Device.


If you are not able to use the action “Open with File Manager”, you may work around this problem by editing the file /usr/share/apps/solid/actions/solid_mtp.desktop.

Change the line

Exec=kioclient exec mtp:udi=%i/


Exec=dolphin “mtp:/”

Source: Wiki Archlinux

Note: All the commands here work in Pisi Linux.