Skip to content

small fraction of data is corrupted when reading files #107

@GregDMeyer

Description

@GregDMeyer

I consistently seeing small chunks of data getting corrupted when I copy files off of my device. Take the following output:

$  ifuse -o ro ~/iphone/  # FYI same thing seems to happen when not using read-only
$  cp ~/iphone/DCIM/108APPLE/IMG_8280.MOV /tmp/test_1.mov
$  cp ~/iphone/DCIM/108APPLE/IMG_8280.MOV /tmp/test_2.mov
$  cp ~/iphone/DCIM/108APPLE/IMG_8280.MOV /tmp/test_3.mov
$ du -sh /tmp/*.mov
319M	/tmp/test_1.mov
319M	/tmp/test_2.mov
319M	/tmp/test_3.mov
$ sha256sum /tmp/*mov
2b75696e3d35612b62aa7ae2d198650ab2ef7f9dcf0c6ab5f8ff6832855494fd  /tmp/test_1.mov
a8622f8572dd580bb06d2fb989b38bc04404a0322432a4ebb04276322d8925be  /tmp/test_2.mov
f7fb666916cf422dd484764804ec6f15bcedc60aee03fe86837ec929f1e4a002  /tmp/test_3.mov

The files sizes are the same but the content is different! Digging in a little more using a script I wrote to compare binary files (the X's mark where each file does not agree with either of the other two):

$  python binary_visual_diff.py /tmp/*.mov
/tmp/test_1.mov: .XX........X............X..........................X.......................X..................................X...XX............
/tmp/test_2.mov: ...........................X.......................X...................X....X..........X........................................
/tmp/test_3.mov: ...X.X......XXX.............................X.....XX..................X............X........X....XXX....................X.......

So the files mostly match, but apparently some of the bytes are just wrong. I wrote some code to copy files off the devices using the "majority vote" of several copies, which seems to work, as media files can play succesfully and seem to be correct. But it is obviously not ideal.

I ran ifuse with the -d option but didn't see any debugging output (maybe I did something wrong?). Let me know how I can dig in further!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions