[Short Tip] Quickly copy files to Samsung Galaxy S20+ on Fedora 32

Sometimes, if you cannot properly transfer files to your phone, try another mtp implementation!

Transferring files from a Fedora 32 machine to an Android phone is usually not a problem: plugin in it (via USB), unlock screen, make sure that USB connection is set to file transfer, and open the phone in Nautilus.

However, I recently had to get a new phone, decided to opt for the Samsung Galaxy S20+ – and there I was not able to write files to the device:

rsync: open "/run/user/1000/gvfs/mtp:host=SAMSUNG_SAMSUNG_Android_R58N23ZDCVN/Phone/appdata/2020-04-12_23-38 - foldersync.db" failed: Operation not supported (95)

Note that other phones made no problems so far. And things got even more weird when I realized that I was able to create folders – but not files?!

After the usual tricks (enabling USB debugging, switching cables, etc.) I realized that this might be a special problem with the implementation of mtp by this phone. So instead of using libmtp, wich is used by default by for example gvfs, I tested other mtp implementations – and found simple-mtpfs, which worked like a charm:

$ sudo simple-mtpfs -l
1: SamsungGalaxy models (MTP)
$ sudo simple-mtpfs --device 1 /mnt
# you have to acknowledge access to the phone on the phone screen
# then you have to mount it again
$ sudo simple-mtpfs --device 1 /mnt
$ sudo rsync --verbose --progress --size-only --omit-dir-times --no-perms --recursive --inplace /home/liquidat/backup/ /mnt/Phone/

The performance is good – way better than trying to copy files via gphoto2, btw 😉

Image by Martin Pyško from Pixabay

5 thoughts on “[Short Tip] Quickly copy files to Samsung Galaxy S20+ on Fedora 32”

  1. Please file a bug against libmtp and provide logs. It’s great that it’s working for you now with an alternate library, but we need to fix this for everyone, by default. Thanks!

    1. Hi, I’d love too! But I failed to figure out what the actual problem was. So far I can only create a bug entry saying “doesn’t work” and I guess that is not what you would love to see, right? Any idea how to dig deeper into this?

    1. Thanks for the idea! However, that requires that both devices are in the same Wifi, something which was not given in this case (no Wifi available). If I would have had stable Wifi I would have uploaded all code to my Nextcloud instance anyway.
      Also, last time I tried to get this working it didn’t work as comfortable as I hope it would hence I never tried to have a second look at it.

    2. That is the drawbackof the GSConnext method!

      Thanks for the tip in the blog post though.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.