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

ipsw dyld extract --all fails with optimization failure #467

Open
2 tasks done
R6-Mute opened this issue May 6, 2024 · 2 comments
Open
2 tasks done

ipsw dyld extract --all fails with optimization failure #467

R6-Mute opened this issue May 6, 2024 · 2 comments
Assignees
Labels
bug Something isn't working triage

Comments

@R6-Mute
Copy link

R6-Mute commented May 6, 2024

What happened?

Trying to extract dylibs from ipsw with the command
ipsw dyld extract -a --objc --slide --stubs ./21E237__iPhone16,1/dyld_shared_cache_arm64e
on iOS 17.4.1 iPhone16,1
returns an error:
failed to extract dylib /System/Library/PrivateFrameworks/CoreALD.framework/CoreALD: failed to optimize load commands: failed to remap offset in LC_ENCRYPTION_INFO_64: failed to remap offset 0x4000

Seems that running just with -a--all gives the same result, but would be nice to not fail the whole process just say which one failed and continue with the extraction.

My setup:
MBP M3 Sonoma 14.4.1

How can we reproduce this?

run ipsw dyld extract -a --objc --slide --stubs ./21E237__iPhone16,1/dyld_shared_cache_arm64e
on the extracted dyld from iPhone16,1_17.4.1_21E237_Restore.ipsw

ipsw version

Version: 3.1.480, BuildCommit: 2fffe45e5437a6f0ac4527edc4336fb80d853bbb

Search

  • I did search for other open and closed issues before opening this

Code of Conduct

  • I agree to follow this project's Code of Conduct

Additional context

No response

@R6-Mute R6-Mute added bug Something isn't working triage labels May 6, 2024
@R6-Mute
Copy link
Author

R6-Mute commented May 6, 2024

simple echo 123 > OUTPUT_FOLDER_PATH/System/Library/PrivateFrameworks/CoreALD.framework/CoreALD "tricked" the script to go over the problematic dylib and finish extracting the rest : )

@nemzutkovic
Copy link

nemzutkovic commented Jun 18, 2024

Hi. I'm running into this issue as well. Here are some more details:

Device: Macbook Pro M1 Max Sonoma 14.5
Firmware Extracting: https://updates.cdn-apple.com/2024SpringFCS/fullrestores/052-39331/01B884E9-B6BA-493B-B9C2-A877A9F29360/iPhone11,8_17.5_21F79_Restore.ipsw
IPSW Version: ipsw version Version: 3.1.500, BuildCommit: 6bebd309b594a61bcb02934b6ab38d90c1e61d69
Command Used: ipsw dyld extract extracted_files/21F79__iPhone11,8/dyld_shared_cache_arm64e --all

Result:

ipsw dyld extract extracted_files/21F79__iPhone11,8/dyld_shared_cache_arm64e --all --force
   • Extracting all dylibs from extracted_files/21F79__iPhone11,8/dyld_shared_cache_arm64e
        11s [====================================================================>---------| 3034/3412 ]
       
          ⨯ failed to extract dylib /System/Library/PrivateFrameworks/CoreALD.framework/CoreALD: failed to optimize load commands: failed to remap offset in LC_ENCRYPTION_INFO_64: failed to remap offset 0x4000

I've tried restarting my Mac, using --force, updating to the latest version of IPSW, but neither seem to address the issue. I also tried the comment mentioned above, but the CoreALD.framework/CoreALD path does not exist, as it hasn't been created yet.

Note: Doesn't happen with https://updates.cdn-apple.com/2023FallFCS/fullrestores/042-49415/A6D69931-A729-44D2-AC2A-EB3ED7E20EBB/iPhone11,8_17.0_21A329_Restore.ipsw. Seems to be happening on all of the newer iOS versions that just came out

Any suggestions or workarounds?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage
Projects
None yet
Development

No branches or pull requests

3 participants