Copying files to an MTP device in the terminal
Posted: Fri May 31, 2019 3:03 pm
I've just connected my Android phone to my laptop to copy some new music across. I can copy/paste folders through Caja, but I figured it would be simpler in the terminal with rsync (I don't have a music player / syncer set up on Mint, I don't play music from my laptop).
Straight away I ran into a problem - where's it mounted? It only connects as an MTP device, it doesn't have a mass storage mode. Caja's address bar showed
I can read files from the SD card, but can't copy anything to it - I get
As I said, copying & pasting folders in Caja works fine, surely it can be done somehow in the terminal?
Straight away I ran into a problem - where's it mounted? It only connects as an MTP device, it doesn't have a mass storage mode. Caja's address bar showed
mtp://%5Busb%3A002,004%5D/Card/Music
. With a bit of googling, I found I could access it through the terminal at /run/user/1000/gvfs/mtp:host=%5Busb%3A002%2C004%5D/Card/Music
.I can read files from the SD card, but can't copy anything to it - I get
cp: cannot create regular file '........': operation not supported
. I tried touch foo
to create a file but got the same error - touch: cannot touch 'foo': Operation not supported
. Thinking it was permissions, I tried it with sudo, then got touch: cannot touch 'foo': Permission denied
.As I said, copying & pasting folders in Caja works fine, surely it can be done somehow in the terminal?