Giter Club home page Giter Club logo

Comments (8)

0x09 avatar 0x09 commented on August 26, 2024

Hi, can you unmount the disk from FUSE and post the output of
hfsdump /dev/sdXX stat "/Users/abc/Font Library/A/Avant Garde Gothic URW/Avant Garde Gothic URW"

and also try running
hfsdump /dev/sdXX read "/Users/abc/Font Library/A/Avant Garde Gothic URW/Avant Garde Gothic URW/rsrc" > some_resource_data
(note the /rsrc at the end of the path in this one)

This should help indicate what's going wrong.

from hfsfuse.

0x09 avatar 0x09 commented on August 26, 2024

OK, I figured out what's going on here. The maximum size extended attribute the Linux kernel can support is 64kb. If the resource fork is larger than this, hfsfuse will return a range error, which in turn getting printed as "argument list too long".

The best way to deal with these at present is to read them with hfsdump as outlined above. I'm not sure what the best solution is for making these readable on the FUSE side (adding /rsrc to the path does not work with FUSE's path resolution), but I'll try to come up with some alternate syntax for that.

from hfsfuse.

ctron avatar ctron commented on August 26, 2024

Thanks for investigating this. Is there a simple command with hfsdump which will write out only the raw data into a file or stdout?

from hfsfuse.

0x09 avatar 0x09 commented on August 26, 2024

You can do this with the second command above. hfsdump <device> read <path> will write the data at path to stdout. Appending /rsrc to the path it will write the resource fork instead.

You can find all files with an oversized resource fork on the mounted volume using attr:

find Users/ -type f -exec attr -l {} \; |\
awk '$2 = "com.apple.ResourceFork" && $5 > 65536' |\
cut -d' ' -f9- > bigforks.txt

Then the list can be fed to hfsdump in a loop. For example if you wanted to place the fork data under a mirror of the hierarchy of the original volume at "rsrc/":

while read -r path; do
  mkdir -p "rsrc/$(dirname "$path")" && hfsdump /dev/sdXX read "/$path/rsrc" > "rsrc/$path"
done < bigforks.txt

Probably hfsdump should support some kind of bulk mode like debugfs does to make operations like this more efficient.

from hfsfuse.

ctron avatar ctron commented on August 26, 2024

That will work fine I guess with my small application, recovering the font files.

Thanks for all your help.

from hfsfuse.

0x09 avatar 0x09 commented on August 26, 2024

No problem. I'd like to leave this ticket open until I have a solution for this inside the FUSE driver.

FYI, I noticed that the hfsfuse.record.date_* xattrs were being printed incorrectly on Linux due to some time formatting differences vs the BSDs and just pushed a fix, you may want to update.

from hfsfuse.

0x09 avatar 0x09 commented on August 26, 2024

I've added two new options to facilitate accessing fork data within the FUSE driver -- one which allows setting a special file extension like .rsrc and one which mounts the entire volume as a resource fork view. I also expanded the documentation on fork and xattr handling: https://github.com/0x09/hfsfuse#extended-attributes-and-resource-forks

This should take care of any cases where extended attributes are too small to represent the fork data and make the forks easier to work with anyway.
Thanks for reporting this!

from hfsfuse.

ctron avatar ctron commented on August 26, 2024

This is awesome! Thanks for the changes!

from hfsfuse.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.