arandomdev / DyldExtractor

Extract Binaries from Apple's Dyld Shared Cache
MIT License
404 stars 40 forks source link

Cache's magic does not start with 'dyld', most likely given a file that's not a cache or the file is broken. #47

Closed zy364601065 closed 2 years ago

zy364601065 commented 2 years ago

system % dyldex_all dyld_shared_cache_arm64e Traceback (most recent call last): File "/usr/local/bin/dyldex_all", line 299, in _main() File "/usr/local/bin/dyldex_all", line 228, in _main dyldCtx = DyldContext(f) File "/usr/local/lib/python3.10/site-packages/DyldExtractor/dyld/dyld_context.py", line 36, in init raise ValueError("Cache's magic does not start with 'dyld', most likely given a file that's not a cache or the file is broken.") # noqa ValueError: Cache's magic does not start with 'dyld', most likely given a file that's not a cache or the file is broken.

arandomdev commented 2 years ago

Where did you get the cache file from?

zy364601065 commented 2 years ago

Get from /System/Library/Caches/com.apple.dyld/ iPhone system is iOS 13.1.3

arandomdev commented 2 years ago

It says that it's probably broken, are you able to open the cache file in a hex editor and tell me what the first few bytes are? It should be like something here, where the first 4 are dyld.

If not, can you send the file to me? My email is haow6449@gmail.com.

zy364601065 commented 2 years ago

I will send the document to you. Thank you for your reply

arandomdev commented 2 years ago

Okay, I looked at your file, and it seems that the first 0x2c580 bytes are all zeros, which is not correct. I don't know how you got your file, but I suggest using SCP if you have a jail broken phone, or directly extracting it from an IPSW. https://github.com/blacktop/ipsw.