Unable to perform file operations on a MTP device mounted via GVFS: "Operation not supported"

A guess: you are now actually using MTP for accessing your Walkman, and MTP sucks.

Details

The Operation not supported error could indicate that your Walkman uses an MTP implementation that doesn't support "direct" access. According to http://intr.overt.org/blog/?p=174 this kind of direct access is an Android-specific extension, so it's probably not supported by your Walkman.

As result, you can only use a few selected ways to access files on your Walkman using MTP: I guess everything that reads or writes files in one single operation is supported, while access to selected parts of a file is not supported for these MTP implementations. And it appears that cp and Python always use the latter access method and hence fail.

Possible Workaround

However, you might be able to just replace cp by gvfs-copy. In my tests with a Samsung Android phone (which has a crippled MTP implementation as well) gvfs-copy was able to copy files to the phone where cp failed.

Background

I couldn't find much info about these device-dependent MTP limitations; here are some snippets where the situation is explained somewhat:

https://askubuntu.com/a/284831 https://bugs.launchpad.net/ubuntu/+source/gvfs/+bug/1389001/comments/2 https://bugs.launchpad.net/ubuntu/+source/gvfs/+bug/1157583/comments/1

Why did it work before?

As to why your Walkman was accessible with cp in Mint 14 but not in Mint 17, this might be caused by an internal switch from PTP to MTP as access system. At least that's what I noticed for the Samsung device when switching from Ubuntu 12.04 to 14.04. The phone supports both PTP and MTP, but Ubuntu 12.04 apparently only supports PTP; so that's what was used. Since the new Ubuntu version has built-in support for MTP, this is now used instead.

Actually it might even be the case that your Walkman was previously accessed as USB Mass Storage Device, which is what USB hard disks and flash drives use. Maybe for some reason Linux (or your Walkman) decided that MTP was preferable over Mass Storage access.

You can see the access method used by looking at the URL for the Walkman (in Nautilus, go to the Walkman folder, press Ctrl+L and look at the address bar): for MTP the device is found under eg. mtp://[usb:001,004]/ while for PTP it's something like gphoto2://[usb:001,004]/store_00010001. For Mass Storage access the URL is just a normal path like /media/WALKMAN.

I don't know if MTP has any actual advantages over PTP or Mass Storage, or whether it's possible to switch back to PTP or Mass Storage. Under Linux, both MTP and PTP implementations have their own set of bugs, so it might depend on your use case which one is better. AFAIK Mass Storage is the most desirable option for the user but device support in phones is waning.


In order to access my cell phone I had to install mtp-server via the Synaptic Package Manager on my Linux Mint 17.1 Mate. My previous Linux Mint 17 Mate didn't require me to install mtp-server, my cell phone was recognized automatically upon connecting via usb port. Maybe this info will help.


I ran into this very problem on Ubuntu 16.04 and Samsung Galaxy SIII connected in MTP mode.

Using Oliver's suggestion to use gvfs-copy, copying directly from my NAS to phone doesn't work: (neither did Nautilus). This is a work-round for a possible bug in gvfs-copy.

gvfs-copy '/run/user/1000/gvfs/smb-share:server=n2100,share=public/Music/The Story of Funk-1.mp2' '/run/user/1000/gvfs/mtp:host=%5Busb%3A001%2C005%5D/Card/Music/Radio/'
Error copying file /run/user/1000/gvfs/smb-share:server=n2100,share=public/Music/The Story of Funk-1.mp2: Operation unsupported

Neither did the alternate path format suggested by the manpage:

gvfs-copy 'smb://n2100/public/Music/The Story of Funk-1.mp2' 'mtp://[usb:001,005]/Card/Music/Radio'
Error copying file smb://n2100/public/Music/The Story of Funk-1.mp2: Operation unsupported

Copying the file to a local folder first however did work. {Thanks akostadinov} (and so did Nautilus).

gvfs-copy '/home/nigel/The Story of Funk-1.mp2' 'mtp://[usb:001,005]/Card/Music/Radio'