Questions tagged [mtp]

MTP stands for Media Transfer Protocol, which supports the transfer of music files on digital audio players and media files on portable media players, as well as personal information on personal digital assistants.

The Media Transfer Protocol is a devised set of custom extensions to the Picture Transfer Protocol (PTP). Whereas PTP was designed for downloading photographs from digital cameras, Media Transfer Protocol supports the transfer of music files on digital audio players and media files on portable media players, as well as personal information on personal digital assistants.

Media Transfer Protocol (commonly referred to as MTP) is part of the "Windows Media" framework and thus closely related to Windows Media Player. Windows Vista has built-in support for MTP. Support for Media Transfer Protocol in Windows XP requires the installation of Windows Media Player 10 or higher. Mac and Linux systems have software packages to support it.

The USB Implementers Forum device working group standardized MTP as a fully fledged Universal Serial Bus (USB) device class in May 2008. Since then MTP is an official extension to PTP and shares the same class code.

libmtp is a library for MTP. Its official documentation can be found here.

178 questions
80
votes
12 answers

Nexus 4 not showing files via MTP

I'm trying to simply write a simple XML file to the SD card and I noticed that my Nexus 4 does write the file, but it is not viewable via the MTP protocol using Windows 7. code: public void onCreate(Bundle savedInstanceState) { …
moonlightcheese
  • 10,354
  • 7
  • 45
  • 69
49
votes
3 answers

How to set Android M default USB config to MTP rather than "charging only"?

Whenever my device (Nexus 5, Android M Preview 3) connects via USB, the USB config always defaults to "charging only". This is quite problematic because the USB port on my device is faulty and sometimes disconnects and reconnects when bumped and so…
Will Hardwick-Smith
  • 869
  • 2
  • 13
  • 24
23
votes
4 answers

How to access an MTP USB device with python

How can I read from and write to my Galaxy Nexus phone, using MTP over a USB cable in python? I'm on a windows 7 computer.
foosion
  • 6,807
  • 23
  • 58
  • 97
20
votes
1 answer

Watch for changes in external USB storage for Honeycomb or later Android versions

I've got a DSLR camera and Samsung Galaxy Tab running Android Honeycomb. DSLR connected to a tablet using USB-cable (via USB kit enabling host functionality on a tablet). I'd like to being notified when user takes a photo using this external camera,…
Sunseeker
  • 1,467
  • 9
  • 21
19
votes
0 answers

Any way automatically allow the MTP connection approval request upon USB connection?

Whenever I connect the phone to my PC via USB, the phone displays a message asking me to DENY or ALLOW the MTP connection. I ALWAYS want to allow it My device: Samsung S5 Android: 6.0.1 Is there any way to always allow it as default option. the…
Nawaf Abdu
  • 537
  • 1
  • 5
  • 13
16
votes
0 answers

Java MTP library that works on Windows

Does anybody know of a working Java MTP library for Windows? I'm trying to pull/push files into an Android device and I can't use adb. So far I've found jMTP and jusbpmp but neither of them work properly: jMTP successfully recognizes my Android…
Moises Jimenez
  • 1,912
  • 3
  • 18
  • 42
13
votes
2 answers

How to manage files on an MTP Portable Device?

I have been researching this topic for days and I can't find anything on managing files on a MTP Portable Device (More specifically a Galaxy S4). I want to be able to... Copy files from the PC to the MTP Device Copy files from the MTP Device to the…
xChris6041x
  • 149
  • 1
  • 1
  • 8
11
votes
1 answer

WPD Object Filename Truncated at '.'

In my project, I'm using the Windows Portable Device (WPD) API to enumerate the contents of a mobile device. WPD API Enumeration Guide. I'm able to enumerate over each object and view their properties as shown in the API programming guide. WPD API…
mrg95
  • 1,999
  • 5
  • 34
  • 70
11
votes
1 answer

Connected a Mobile device (Android) as MTP, Now can we access this device and get Time

I am trying to develop an application in which I am connecting my mobile device to a Computer as a MTP. Now I am trying to access this MTP from my java code using some external library. My requirement is to get time from that device and calculate…
Anuj
  • 232
  • 1
  • 10
10
votes
1 answer

access mtp device with java

I have developed a small application that copies files from a folder to another.I use a JFileChooser to select the target directory.Something I hadn't tried for a long time is to select my phone as the target directory.I tried but I couldn't find it…
cssGEEK
  • 934
  • 2
  • 13
  • 36
9
votes
1 answer

.Net MTP / PTP Wrapper?

I'm writting a hobby project to deal with files on cameras. Previously I found issues with the camera and the FolderBrowserDialog. What I believe is happing is that the camera is using MTP or PTP (Picture Transfer Protocol not peer-to-peer). In…
NekoJoe
  • 173
  • 2
  • 8
8
votes
1 answer

How to up- and download data from an USB device using MTP (Device is not a camera)

I hope you can help me - my task is to up- and download some files to an USB device using MTP. I found this great example: http://www.codeproject.com/Articles/30726/Transferring-D90-images-with-WIA and now I can transfer some images from my…
Tom
  • 81
  • 1
  • 2
7
votes
1 answer

How to reliably copy items with PowerShell to an mtp device?

I want to be able to copy items (files, folders) from a Windows PC to an MTP device. I want to do it with PowerShell for scripting purposes. I found this thread: shell32 copyhere not working neither in .Net nor powershell script but the answer there…
andrzejtp
  • 73
  • 5
7
votes
3 answers

Issues traversing through directory hierarchy with Android Storage Access Framework / DocumentProvider using MTP

UPDATE: My initial question may be misleading so I want to rephrase it: I want to traverse through the hierarchy tree from an MTP connected device through Android's Storage Access Framework. I can't seem to achieve this because I get a…
6
votes
2 answers

Access MTP storage with System.IO from PowerShell

I'm trying to access MTP device storage to automate file copy, backup, etc. If Windows Explorer is able to open and browse Android device Internal Storage and connected SD card, how can I access these storages with PowerShell? I've found a lots of…
Josef B.
  • 140
  • 1
  • 12
1
2 3
11 12