MTP Error Codes

banner art

The devices that supports Media Transport Protocol (MTP) can return the following error codes. Most of the error codes imply an error in the MTP stack, but are helpful in diagnosing the error situation.

HRESULT MTP response code MTP response code description Detail
0x80042003 0x2003 Session Not Open Indicates that the session handle of the operation is not a currently open session. This indicates an internal error in MTP stack.
0x80042004 0x2004 Invalid TransactionID Indicates that the TransactionID is zero or does not refer to a valid transaction. This indicates an internal error in MTP stack.
0x80042005 0x2005 Operation Not Supported Indicates that the operation code appears to be a valid code, but the device does not support the operation. This indicates an internal error in MTP stack.
0x80042006 0x2006 Parameter Not Supported Indicates that a non-zero parameter was specified in conjunction with the operation, and the parameter is not used for that operation. This indicates an internal error in MTP stack.
0x80042007 0x2007 Incomplete Transfer Indicates that the transfer did not complete, and any data transferred should be discarded. This response does not correspond to a cancelled transaction.
0x80042008 0x2008 Invalid StorageID Indicates that a storage ID sent with an operation does not refer to an actual valid store that is present on the device. This indicates an internal error in MTP stack.
0x80042009 0x2009 Invalid ObjectHandle Indicates that an object handle does not refer to an actual object that is present on the device. The application should enumerate the storages again.
0x8004200A 0x200A DeviceProp Not Supported Indicates that the device property code appears to be a valid code, but that property is not supported by the device. This indicates an internal error in MTP stack.
0x8004200B 0x200B Invalid ObjectFormatCode Indicates that the device does not support the particular object format code supplied in the given context.
0x80042012 0x2012 Partial Deletion Indicates that only a subset of the storages indicated for deletion were actually deleted, because some were write-protected or were on stores that are read-only.
0x80042013 0x2013 Store Not Available Indicates that the store (or the store that contains the indicated object) is not physically available. This can be caused by media ejection. This response shall not be used to indicate that the store is busy.
0x80042014 0x2014 Specification By Format Unsupported Indicates that the operation attempted to specify action only on objects of a particular format, and that capability is not supported. The operation should be attempted again without specifying by format. Any response of this nature infers that any future attempt to specify by format with the indicated operation will result in the same response. This indicates an internal error in MTP stack.
0x80042015 0x2015 No Valid ObjectInfo Indicates that the host did not provide valid object info to device before transferring the object. This indicates an internal error in MTP stack.
0x80042016 0x2016 Invalid Code Format Indicates that the data code does not have the correct format, and is therefore not valid. This indicates an internal error in MTP stack.
0x80042017 0x2017 Unknown Vendor Code Device does not know how to handle the vendor extended code.
0x8004201A 0x201A Invalid ParentObject Indicates that the object is not a valid parent object. This indicates an internal error in MTP stack.
0x8004201B 0x201B Invalid DeviceProp Format Indicates that an attempt was made to set a device property, but the data is not of the correct size or format. This indicates an internal error in MTP stack.
0x8004201C 0x201C Invalid DeviceProp Value Indicates that an attempt was made to set a device property to a value that is not allowed by the device. This indicates an internal error in MTP stack.
0x8004201E 0x201E Session Already Open Indicates that the host tried to open session while a session is already open. This indicates an internal error in MTP stack.
0x8004201F 0x201F Transaction Cancelled May be used to indicate that the operation was interrupted due to manual cancellation.
0x80042020 0x2020 Specification of Destination Unsupported Indicates that device does not support the specification of destination by the host. This indicates an internal error in MTP stack.
0x8004A801 0xA801 Invalid_ObjectPropCode Indicates that the device does not support the sent Object Property Code in this context. This indicates an internal error in MTP stack.
0x8004A802 0xA802 Invalid_ObjectProp_Format Indicates that an object property sent to the device is in an unsupported size or type. This indicates an internal error in MTP stack.
0x8004A803 0xA803 Invalid_ObjectProp_Value Indicates that an object property sent to the device is the correct type, but contains a value that is not supported. This indicates an internal error in MTP stack.
0x8004A804 0xA804 Invalid_ObjectReference Indicates that a sent Object Reference is not valid. Either the reference contains an object handle not present on the device, or the reference attempting to be set is unsupported in context. This can be due to an error in MTP stack or due to application using a stale storage object.
0x8004A806 0xA806 Invalid_Dataset Indicates that the dataset sent in the data phase of this operation is invalid. This indicates an internal error in MTP stack.
0x8004A807 0xA807 Object_Too_Large Indicates that the object desired to be sent cannot be stored in the file system of the device. This shall not be returned when there is insufficient space on the storage.

See Also