I tried to sync ogg-audio-files to my android device like this:
rsync -av piano /run/user/1000/gvfs/mtp\:host\=%5Busb%3A002%2C005%5D/SanDisk/Music/
===> rsync -av piano/ /run/user/1000/gvfs/mtp:host=%5Busb%3A002%2C007%5D/SanDisk/Music/
sending incremental file list
rsync: failed to set times on "/run/user/1000/gvfs/mtp:host=%5Busb%3A002%2C007%5D/SanDisk/Music/.": Operation not supported (95)
...
foo-bar/one.ogg
...
rsync: mkstemp "/run/user/1000/gvfs/mtp:host=%5Busb%3A002%2C007%5D/SanDisk/Music/foo-bar/one.ogg.0gzy9t" failed: Operation not supported (95)
But only the directory got created. No file was transfered:
===> find /run/user/1000/gvfs/mtp:host=%5Busb%3A002%2C007%5D/SanDisk/Music/piano
/run/user/1000/gvfs/mtp:host=%5Busb%3A002%2C007%5D/SanDisk/Music/piano/foo-bar
How to rsync between my android device and my Ubuntu PC?
I found a work-around: I unplugged the micro-SC card from the android device and inserted it into the sd-card reader of my laptop. But a solution where I don't need to do this would be nice.
Best Answer
Not sure if you need a rooted device for this (I only run rooted LineageOS and am not familiar with other flavours). In LineageOS, /system/xbin/rsync exists by default, else, connect your phone to your PC and start a terminal and execute all of the commands below in the PC's terminal: