Difference between revisions of "MTP"

From ArchWiki
Jump to: navigation, search
m (this article has been a stub since 26 Oct 2009; it may require expansion, but in that case it needs Template:Expansion with an explanation)
Line 14: Line 14:
  
 
==Using media players==
 
==Using media players==
You can also use your mtp device in music players such as amaroK. To do this you may have to edit "/lib/udev/rules.d/69-libmtp.rules":
+
You can also use your mtp device in music players such as Amarok. To do this you may have to edit "/etc/udev/rules.d/51-android.rules" (The MTP device used in the following example is a Galaxy Nexus):
 
To do this run:
 
To do this run:
     lsusb -v
+
     $ lsusb
 
and look for your device, it will be something like:
 
and look for your device, it will be something like:
     Bus 002 Device 007: ID 072b:4847 W Technology
+
     Bus 003 Device 011: ID 04e8:6860 Samsung Electronics Co., Ltd GT-I9100 Phone [Galaxy S II], GT-P7500 [Galaxy Tab 10.1]
 
in which case the entry would be:
 
in which case the entry would be:
     SYSFS{idVendor}=="072b", SYSFS{idProduct}=="4847", SYMLINK+="libmtp-%k", MODE="666"
+
     SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", ATTR{idProduct}=="6860", MODE="0666"
 
+
Then, reload udev rules:
There are a lot of devices already configured that just lack the proper MODE setting. Please ensure you search for you device ID in the rules before adding a second entry.
+
    # udevadm control --reload
  
 
{{Note | After installing MTP you may have to reboot for your device to be recognised''}}
 
{{Note | After installing MTP you may have to reboot for your device to be recognised''}}
Line 29: Line 29:
 
Mtpfs is FUSE filesystem that supports reading and writing from any MTP device. Basically it allows you to mount your device as an external drive.<br> It's available in the community repository.
 
Mtpfs is FUSE filesystem that supports reading and writing from any MTP device. Basically it allows you to mount your device as an external drive.<br> It's available in the community repository.
 
*To mount your device  
 
*To mount your device  
# mtpfs -o allow_other /media/YOURMOUNTPOINT
+
    # mtpfs -o allow_other /media/YOURMOUNTPOINT
 
*To unmount your device
 
*To unmount your device
# umount /media/YOURMOUNTPOINT
+
    # umount /media/YOURMOUNTPOINT
 +
Also, you can put them into your ~/.bashrc:
 +
    alias android-connect="mtpfs -o allow_other /media/YOURMOUNTPOINT"
 +
    alias android-disconnect="umount /media/YOURMOUNTPOINT"

Revision as of 09:44, 11 June 2012

This template has only maintenance purposes. For linking to local translations please use interlanguage links, see Help:i18n#Interlanguage links.


Local languages: Català – Dansk – English – Español – Esperanto – Hrvatski – Indonesia – Italiano – Lietuviškai – Magyar – Nederlands – Norsk Bokmål – Polski – Português – Slovenský – Česky – Ελληνικά – Български – Русский – Српски – Українська – עברית – العربية – ไทย – 日本語 – 正體中文 – 简体中文 – 한국어


External languages (all articles in these languages should be moved to the external wiki): Deutsch – Français – Română – Suomi – Svenska – Tiếng Việt – Türkçe – فارسی

Tango-view-refresh-red.pngThis article or section is out of date.Tango-view-refresh-red.png

MTP is the "Media Transfer Protocol" and is used by many MP3 players such as the Creative Zen and some Walkmans. In addition, Android phones and tablets use it since version 3.0. It is part of the "Windows Media" Framework and has close relationship with Windows Media Player.

Installation

MTP support is provided by the libmtp package, to install:

   pacman -S libmtp

You then get a number of tools to use from the command line (such as mtp-detect). Use:

   mtp-detect

to detect/connect to the device.

Using media players

You can also use your mtp device in music players such as Amarok. To do this you may have to edit "/etc/udev/rules.d/51-android.rules" (The MTP device used in the following example is a Galaxy Nexus): To do this run:

   $ lsusb

and look for your device, it will be something like:

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

in which case the entry would be:

   SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", ATTR{idProduct}=="6860", MODE="0666"

Then, reload udev rules:

   # udevadm control --reload
Note: After installing MTP you may have to reboot for your device to be recognised

mtpfs

Mtpfs is FUSE filesystem that supports reading and writing from any MTP device. Basically it allows you to mount your device as an external drive.
It's available in the community repository.

  • To mount your device
   # mtpfs -o allow_other /media/YOURMOUNTPOINT
  • To unmount your device
   # umount /media/YOURMOUNTPOINT

Also, you can put them into your ~/.bashrc:

   alias android-connect="mtpfs -o allow_other /media/YOURMOUNTPOINT"
   alias android-disconnect="umount /media/YOURMOUNTPOINT"