Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Change paths where we look for dyld and support multiple restore images #8

Merged
merged 1 commit into from
Sep 28, 2022

Conversation

phacops
Copy link
Collaborator

@phacops phacops commented Sep 28, 2022

We were short of debug image files on macOS and that was because we were not looking into the right image (only the base image when we needed to look at the full system too). This PR will now look at all the restore images.

At the same time, macOS 13.0 changes the location of the dyld directory as per #5 and we will now select the proper image to extract from based on the Cryptex1,SystemOS key in the BuildManifest.plist.

Copy link
Member

@Swatinem Swatinem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, though admittedly I have no idea what the code is doing :-D

or prefix == "ios"
and parsed_version >= version.parse("16.0")
):
system_restore_image_filename = read_build_manifest_plist(extract_dir)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this here yields a single value, whereas the other branch yields an iterator. why exactly is that?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Restore.plist contains 2 possible restore images, one for a base system and one seemingly being the real system. We were extracting from the base system so far which is why our symbols were incomplete. I'm returning both images here and will loop through both to extract symbols.

As for the BuildManifest.plist, we only found the Cryptex1,SystemOS image being useful to access the dyld we want, so that's why it's returning only one value. Maybe in the future we'll need/want to support multiple images.

@phacops phacops merged commit 4171add into main Sep 28, 2022
@phacops phacops deleted the pierre/fix-macos-dyld-paths branch September 28, 2022 13:49
@philipphofmann
Copy link
Member

Shouldn't this close #5, @phacops?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants