Gvfs fails to copy file over 4 GB

Hello, I am experiencing a problem with copying large file sizes from my galaxy s21 to a fuse-zip mount point (Bitbucket). I have a zip file which I mounted with a empty folder in user space which gives me access to all the files in read-write. I connected my galaxy s21 with usb, then copied a file that is 16 GB into the fuse-zip folder, and when reaching 4 GB limit, the copy operation failed. Please see the following screenshots below:

The file is 16.3 GB (16,288,472,843 bytes) and is located within the DCIM/Camera folder on the galaxy s21

In the below 2 screenshots, I am copying the file above from my galaxy s21 to a fuse-zip folder using cp command which resulted in an error

Using rsync also failed after nearing completion when copying to local folder. It retries to copy again, fails again

My question is, why does gvfs or gnome vfs have a file size transfer limit of 4 GB ? is there a way to use 64-bit copy operations ? What can I do ?

It seems 64-bit file access is a Android extension of MTP. gvfs mtp backend explicitly checks whenever it supports android extensions before failing on accessing files higher than the vanilla MTP limit. I wonder if it fails to detect as an android device for GVFS. libmtp uses a different way to detect support for reading above 4 GB, maybe GVFS could adopt that.

(Just a guess, I have never contributed to gvfs or looked into mtp before. I assuming it is MTP because it looks like you are copying from your android device via MTP and it was an reading error not writing.)

I am not very familiar with MTP or not or gvfs, but I have several sources on discord linux servers and also the author of fuse-zip also hinting that gvfs could be the culprit of this 4 GB limit. He suggests that rsync has a bug, and let alone even cp and gvfs has a bug. How come gvfs can’t copy files over 4 GB ?

Also, I mounted my galaxy s21 with a webdav server pro app from the olive tree (https://play.google.com/store/apps/details?id=com.theolivetree.webdavserverpro) and then connected my phone in ubuntu as webdav connection, copying the same 16 GB file from webdav android to fuse-zip results in the same fail copy operation. So it seems that there is a problem with gvfs for large >4GB files.

How do I use libmtp in a similar fashion as copying large files from android MTP to fuse-zip ?

And yes, I am using MTP android (basically simple connecting my galaxy 21 to a USB 2.0 port on the back panel of my PC)

What’s even more bizarre is that when I copy a 5 GiB file from local folder into fuse-zip mounted folder, then there is no error, I even tested with a 16 GB test file and copied it into a fuse-zip folder, it copied without error…so again…the problem narrows down to GVFS

*if anyone has a large file greater than 4GiB can you also test this to make sure I’m not the only one having this issue ?

so then how do I get over 4 GB limit?

This topic was automatically closed 45 days after the last reply. New replies are no longer allowed.