We often need to access the internal data of a MTP USB device like smartphones or media players.
And almost every such handheld device is equipped with a micro or mini USB port, meant to be connected to a PC via a USB cable, or a charger.
And that's when MTP comes to play it's role, as a bridge between two systems.
So, in this post we'll learn about MTP and it's application. Also how to connect those devices to a PC, running Windows or Linux.
ContentsShow / Hide
What is MTP?
The word MTP stands for
Media Transfer Protocol, although many other abbreviations exists.
So, basically a communication protocol between two different device to transfer data back and forth. It's developed by Microsoft as a part of their Windows Media Framework.
MTP is an extension of another very similar communication protocol PTP. Which is specially for older generation Cameras and Media Players for transferring Pictures.
As the term Media is stressed here, so you can think it as a optimized protocol for transferring media files such as Pictures, Videos and Music files. However it works just as well as for other file t.
MTP USB device driver
Let's know about the driver support of various MTP devices on Windows and Linux.
As MTP is developed by Microsoft, so there's no need of installing any driver on Windows Vista and later versions.
However MTP driver support could be added on Windows XP by installing Windows Media Player version 10 or later.
It shows up as a portable device in the Windows device manager.
If your device is not showing up, then just update the mtp usb device driver on Windows 10 by double tapping on the unrecognized portable devices.
On Linux, MTP support is provided by the opensource implementation of MTP protocol, called libmtp.
However only libmtp is not enough to connect a USB MTP devices on Linux. A proper backend like Gvfs or kio-mtp is also required.
So, if you don't have the proper MTP related tools, install them with apt on any Debian based Linux distribution.
sudo apt-get install gvfs-backends gvfs-bin gvfs-fuse gvfs-daemons
mount | grep 'gvfsd-fuse' gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
From the above command, you've got an idea that you can access mtp deice's files on Linux under the
You can see the directory path of the mtp device, a bit weird naming though.
MTP USB device on Android
Almost every android device features both PTP and MTP for transferring files to and from a PC. However you may need to enable it, depending on your vendor's preset.
So, if your phone is not being deceted as an android mtp device, then you might just need to enable it.
After connecting the device to a PC with the USB cable, drag down the notification panel. You will see a notification about how you want to connect your device to your PC.
Then just enable the Transfer Files option from the selection menu.
Then You can access the files of the android device from your PC.
Accessing the files
You can use any file manager like Windows Explorer and accessing the files.
It's just plug and play on Windows 10, could be accessed by Windows Explorer as and external device, screenshot below.
If all the required libraries and backends are installed, MTP is also just a matter or plugging in the device on Linux.
An example below with the gvfs backed, using the PCManFM-Qt file manager.
So, you can notice that the
mtp:// protocol is up here in the file manager's path bar, which is not known to many applications.
But you can access the files with other applications if you use the proper path. Check the linux driver section above to get a proper path location.
MTP is widely adopted among portable devices like Digital cameras, mp3 players, digital video player and most Android devices.
However MTP is very different from it's counterpart USB mas storage, which is a block device. It could be the only way to connect some portable devices to a PC. So comes with it's own set of problems, like only one file operation could be done at any given moment.
But there's an distinct advantage of MTP, any file rarely gets corrupted during transfer. Even you pull out the USB cable in middle of the operation.
Hope you've got an fair idea of MTP USB device and it's drivers.
Here you can know more details about this protocol.