Fedora 38 - I/O zipping error using find command

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 …

i am in my adb shell as 127/dreamqltecan:/$ when i type adb it says adb:not found. This is frustrating getting it to work

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)

what hold you off from the following:

  1. find on the phone out the correct path to sdcard [1]
  • adb shell to get on the phone
  • ls -l to search in the direcory tree
  • off the phone with “exit”
  1. copy the the needed folder to the pc
    on the pc:
  • mkdir sdcard on your pc
  • cd sdcard
  • adb pull … …
  • zip the whole sdcard folder with the zipper on the pc

Are you sure it was “sdcard” ?
and not “DCIM something” (the folder where the phone digicam stores photos/videos) ?
if yes: => sdcard reader

if NO and it is DCIM folder ((usually ?) internal phone storage:

a) the above beginning with “2.”


  • adb shell to get on the phone
  • cp dcim-folder to-mountpoint-of-the-sdcard
  • afterwards sdcard reader


  • setup a samba share on your pc
  • switch on phone’s wifi
  • install MiXplorer
  • configure in MiXplorer a new samba storage link to your pc’s samba share
  • copy via MiXplorer the dcim folder to your pc

my favorite: the last one, cause I’m lazy (only: phone’s wifi on, cp, done !)

what about making a zip file directly from internal storage to the micro sd card folder ? Since I have a 128 GB storage, that can fit the entire phone

Haven’t we already been at the state: “zip is not running on your phone’s rom” ?
what is the win here ?

there are backup apps (maybe already build in) to comply this task better !
and usually they have a restore too

I’m offline now …

I meant not from within shell

wdym ?

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

you followed the above link (Howto setup a samba share in MiXplorer) ?

you could try first to connect to share with windows itself

  • find the “run” command or just key the following in the search box near the start menu (win10)

and hit Enter Key

the ip address range of the sharing box and client should be the same …
keywords: ip-addresses in Wifi versus wifi-guest versus LAN

-slightly remembering you’re working with a VM -

so it could be your VM uses ipaddr starting with 10. and your android operates with 192.
=> they can’t talk to each other

when it is Vbox:
=> network setting of the VM
=> “Bridged Adapter”
=> reboot or restart of the network of the VM

=> android backup apps !!!

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

when zipping inside davfs2 what kind of filesystem is it ? is it still network webdav or is the filesystem changed ? Is it now a NFS ?

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.

which one is more stable when zipping?

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

tar: ./sdcard/DCIM/Camera/20220617_184728.jpg: file changed as we read it
tar: ./sdcard/DCIM/Camera/20220618_130700.jpg: file changed as we read it
tar: ./sdcard/DCIM/Camera/20220731_180105.jpg: File shrank by 1996522 bytes; padding with zeros
tar: ./sdcard/DCIM/Camera/20221015_234657.jpg: file changed as we read it
tar: ./sdcard/DCIM/Camera/20220616_225912.jpg: File shrank by 251711 bytes; padding with zeros
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.

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