EmergeTools / ETSymbolication

93 stars 3 forks source link

Support for macOS and other platform? #11

Open miku1958 opened 9 months ago

miku1958 commented 9 months ago

Any plan for this?

noahsmartin commented 9 months ago

Hey @miku1958 we don't have any plans for this ourselves, but I believe @vmanot had started working on it for macOS, and any contributions for other platforms are welcome!

miku1958 commented 9 months ago

Glad to know that, thank you!

vmanot commented 9 months ago

@miku1958 I'll PR support for macOS support soon.

The place where I'm blocked on, however, is extracting the dyld cache from a macOS firmware file. @noahsmartin I'd love to know if we need to use a separate tool for macOS firmwares.

landonepps commented 9 months ago

This works for macOS, though it extracts all binaries and not just the framework you need: https://github.com/keith/dyld-shared-cache-extractor

dyld-shared-cache-extractor \
   /System/Volumes/Preboot/Cryptexes/OS/System/Library/dyld/dyld_shared_cache_arm64e \
   /tmp/libraries
b3ntx commented 7 months ago

ipsw can replace the commands when looking for the unslid load address of a framework (or any Mach-O for that matter).

Dump load address of a framework:

➜  ipsw dsc macho -l 21B91__iPhone13,2_3/dyld_shared_cache_arm64e SwiftUI | grep -m1 -Eo 'addr=0x[0-9a-f]+' | cut -d'=' -f2
0x18b9f4000

Saves needing to install another tool, but if you still need to extract the framework you can use ipsw dsc extract <path_to_shared_cache> <framework>.

Bonus - download/extract shared cache from any device, any version without downloading the entire IPSW

ipsw download ipsw --macos --dyld --build 23C64, for example, to extract the shared cache from a macOS ipsw for Sonoma 14.2. If you already have the macOS ipsw, it's the same command from the README for extracting the shared cache (ipsw extract -d UniversalMac_14.3_23D56_Restore.ipsw). @vmanot

Kyle-Ye commented 5 months ago

A use case for macOS 14 + SwiftUI symbol needed. Currently I have to use macOS 12 to reproduce the bug and collect the related symbols.

https://github.com/EmergeTools/Pow/issues/63#issuecomment-2029099940