then the command “zip” doesn’t exist on your phone’s ROM …
as said: use adb pull
on your pc:
key in “adb help” will show e.g. the options for pull
I’m beginning to wonder why you’re so fixed to use find and zip
- (even with zero compression, what btw. would have - IMO- less affect on folders containing jpeg/mpX !) -
hell, copy the folder content via “adb pull” to your pc and zip that folder there if you’re nailed to have one file …
or (being on the phone) copy DCIM folder to the sd card and pull the card …
because it is highly customizable and I wanted to include the sdcard/ folder itself when zipping. Other webdav clients don’t allow setting the home folder as root / . Also because this webdav client shows hidden files and folders. The only problem setting this whole process is back is -0 store without compression and zip changing the filesize upon archiving.
adb … is only to talk to the phone (with special case “adb shell”), nothing else.
there (on the phone) you have a small set of linux commands (ls, cp, etc), but not all and they might behave different !
adb pull/push are executed on the pc (without “adb shell” first)
I’ve tried to connect a windows share onto android using mixexplorer but nothing shows up. The folder is shared on windows with the workgroup everyone enabled for reading and writing. The connection is via smb
well something positive happened, I tried a different app called FV file explorer, set up a webdav server on my android and connected my fedora VM to the server. It worked and the better thing is instead of showing binary for videos like the olive tree’s app webdav server pro, FV file manager shows the video file as the proper filetype MPEG-4 file. When I tried the find and zip command again, it doesn’t give me the zip I/O error bad address.
The downside is that it can’t be set to the root folder
davfs2 is network dav too. gvfs is on user level, initiated by a gnome-based filemanager or the gio command, davfs is on root level with the mount command or /etc/fstab. Just alternatives for the same thing. I do not know whether they share codebase.
Sorry, I’ve no idea. I’ve setup a Fedora webdav server and tried the gvfs client without issues up to now. I’ll see whether I can check the davfs this week.
Can you use the same command with “tar” ?
find /webdavlocation -type f | tar -T - -cvf output.tar
-T - means read names from stdin, equivalent to -@ for zip
-cvf means create archive, verbose, output to file
with tar xvf output.tar you extract the archive into the current directory, leading slashes are stripped. No compression.
If tar runs fine and stores correct data, it might exclude the dav transport and points the problem to zip.
I can create .tar files with your command but I get messages like this
./sdcard/DCIM/Camera/20220617_184728.jpg
tar: ./sdcard/DCIM/Camera/20220617_184728.jpg: file changed as we read it
./sdcard/DCIM/Camera/20220618_130700.jpg
tar: ./sdcard/DCIM/Camera/20220618_130700.jpg: file changed as we read it
./sdcard/DCIM/Camera/20220731_180105.jpg
tar: ./sdcard/DCIM/Camera/20220731_180105.jpg: File shrank by 1996522 bytes; padding with zeros
./sdcard/DCIM/Camera/20221015_234657.jpg
tar: ./sdcard/DCIM/Camera/20221015_234657.jpg: file changed as we read it
./sdcard/DCIM/Camera/20220616_225912.jpg
tar: ./sdcard/DCIM/Camera/20220616_225912.jpg: File shrank by 251711 bytes; padding with zeros
./sdcard/DCIM/Camera/20220617_184812.jpg
tar: ./sdcard/DCIM/Camera/20220617_184812.jpg: File shrank by 2437800 bytes; padding with zeros
at the end of the process I got an error
tar: {}: Cannot stat: No such file or directory
tar: +: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
If tar command creates .tar files witout compression what are these messages for? Is there an option to make uncompressed .tar archives?
There is something completely messed up:
The thing I tried was:
find /home/hj/Music -type f | tar -T - -cvf /tmp/output.tar
find produces a list of filenames, tar read the files and appends them into /tmp/output.tar after stripping off the leading slash.
Appartently, you started from the directory containing sdcard, that is OK,
but it you do not specify an full path output directory, you’re writing back to the card. The “{}” and “+” are not used in the command, so where are they coming from?
Or have you mixed two methods into a completely wrong one?
This file size changed came back too several times in all exercises. At least, check the files on the card and I hope you backed up before.
tar without option does not compress, if you add “z” or “j” to “cvf” it does gzip or bzip2 compression, which makes not that much sense for jpg’s
The problem lies with newer ubuntu-like kernels above 20.04. I’m not sure how fedora is affected but I just tried different versions of ubuntu, linux mint and nothing worked above for distros based off ubuntu 20.04. There is something wrong or changed in ubuntu like systems above 20.04. Now we need to determine what it is…
Here is a screenshot showing that find and zip command works on ubuntu 20.04.6 LTS. Even zorin 16.3 worked lol. But it doesn’t work for anything above 20.04
There’s a high likely chance the zip version you are using has a zip file size limit of 4 gigabytes. At least test it and make sure that it can create a zip file larger than 4 gigabytes. Some versions will happily create the zip file and then just stop at 4 gigabytes and not bother to tell you any sort of error pretending to archive and compress the rest of your data.
It’s my recommendation to stop using zip as an archiving compression program and use more modern ones or tar archive with modern compression. This could have been solved in minutes doing so instead of insisting on using a sketchy program from 15 years ago.
Edit:
I’m sorry, I am not helping. I missed the tar comments. I thought this was a new thread and not something months old.
It’s also likely then that the is file corruption on the device. It’s likely that certain files were not saved properly so they are marked as say 250k size on the file system, but there’s only 230k of actual data for the file. I could see this happening with digital cameras for various reasons. Have you attempted to validate that the files that threw the size errors are in fact valid? Using tools like ffprobe and ffplay from the ffmpeg package can easily help with that (ffmpeg is available in the RPM Fusion repository, it is not part of the core Fedora). Or just try to load them in an image editor.
I also question why are using find in the first place. The ‘-type f’ means regular file. Why would there be anything but regular files in the camera folder? That sounds like a serious issue if there are non regular files where they shouldn’t be. I don’t remember ever seeing non regular files in the DCIM folder of any camera for the past 20 years. Have you tried just the basic tar command of something like;
tar -cvf /path/to/tarfile.tar /path/to/jpeg/files/*.jpg
Examples of the ffprobe and ffplay command are fairly simple;
ffprobe will probe the file and tell you what it is and potential errors with it.
ffprobe -i /path/to/media/file.jpg
ffplay will display the file to a window and display similar information as ffprobe. (To exit the window must be selected and hit q.).
ffplay -i /path/to/media/file.jpg