{"id":13641519,"url":"https://github.com/keith/dyld-shared-cache-extractor","last_synced_at":"2025-04-05T09:07:56.456Z","repository":{"id":37843857,"uuid":"392403761","full_name":"keith/dyld-shared-cache-extractor","owner":"keith","description":"A CLI for extracting libraries from Apple's dyld shared cache file","archived":false,"fork":false,"pushed_at":"2023-12-11T19:06:24.000Z","size":25,"stargazers_count":484,"open_issues_count":5,"forks_count":40,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-03-29T08:07:16.033Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/keith.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2021-08-03T17:43:07.000Z","updated_at":"2025-03-28T07:01:31.000Z","dependencies_parsed_at":"2023-12-11T19:52:20.507Z","dependency_job_id":null,"html_url":"https://github.com/keith/dyld-shared-cache-extractor","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keith%2Fdyld-shared-cache-extractor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keith%2Fdyld-shared-cache-extractor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keith%2Fdyld-shared-cache-extractor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keith%2Fdyld-shared-cache-extractor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/keith","download_url":"https://codeload.github.com/keith/dyld-shared-cache-extractor/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247312080,"owners_count":20918344,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-02T01:01:21.452Z","updated_at":"2025-04-05T09:07:56.071Z","avatar_url":"https://github.com/keith.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"# dyld-shared-cache-extractor\n\n[As of macOS Big Sur][mjtsai], instead of shipping the system libraries\nwith macOS, Apple ships a generated cache of all built in dynamic\nlibraries and excludes the originals. This tool allows you to extract\nthese libraries from the cache for reverse engineering.\n\n## Usage\n\nExtract the default shared cache to `/tmp/libraries`:\n\n```sh\ndyld-shared-cache-extractor \\\n   /System/Volumes/Preboot/Cryptexes/OS/System/Library/dyld/dyld_shared_cache_arm64e \\\n   /tmp/libraries\n```\n\nIf this fails it could be because the shared cache format has changed,\nand the version you're trying to extract isn't supported by the version\nof Xcode you have selected globally (which you can view with\n`xcode-select -p` and `xcodebuild -version`). In this case you might\nhave to download a newer version of Xcode (potentially a beta version if\nyou're trying to extract the cache from a beta OS version) and override\nthe Xcode version when running `dyld-shared-cache-extractor`:\n\n```sh\nDEVELOPER_DIR=/Applications/Xcode-beta.app \\\n   dyld-shared-cache-extractor \\\n   /System/Volumes/Preboot/Cryptexes/OS/System/Library/dyld/dyld_shared_cache_arm64e \\\n   /tmp/libraries\n```\n\nIf you want to prefer the system installation of `dsc_extractor.bundle`\ninstead of Xcode's version, you can pass it manually on the command\nline:\n\n```sh\ndyld-shared-cache-extractor \\\n   /System/Volumes/Preboot/Cryptexes/OS/System/Library/dyld/dyld_shared_cache_arm64e \\\n   /tmp/libraries \\\n   /usr/lib/dsc_extractor.bundle\n```\n\nOn macOS versions before Ventura the shared cache was in a different\nlocation, you can extract on older macOS versions with:\n\n```sh\ndyld-shared-cache-extractor \\\n   /System/Library/dyld/dyld_shared_cache_arm64e \\\n   /tmp/libraries\n```\n\n## Installation\n\n[Homebrew](https://brew.sh):\n\n```sh\nbrew install keith/formulae/dyld-shared-cache-extractor\n```\n\nManually:\n\n```sh\ncmake -B build\ncmake --build build\ncmake --install build\n```\n\n## More details\n\nThere are a few different ways you can interact with these shared\ncaches.\n\n1. Depending on what you're doing inspecting them in [Hopper][hopper] is\n   the easiest option\n2. For a bit more functionality you can build the\n   `dyld_shared_cache_util` target from the latest `dyld` [source\n   dump][dump], but this requires some [modifications][modifications]\n\nThe problem with the 2 options above is that they can lag behind format\nchanges in the shared cache. This tool loads the private\n`dsc_extractor.bundle` from Xcode, meaning it should always be able to\nextract the shared cache files even from beta OS versions (potentially\nusing a beta Xcode version).\n\nThis logic is based on the function at the bottom of\n`dyld3/shared-cache/dsc_extractor.cpp` from the `dyld` [source\ndump][dump].\n\n[dump]: https://opensource.apple.com\n[hopper]: https://www.hopperapp.com\n[mjtsai]: https://mjtsai.com/blog/2020/06/26/reverse-engineering-macos-11-0\n[modifications]: https://lapcatsoftware.com/articles/bigsur.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeith%2Fdyld-shared-cache-extractor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkeith%2Fdyld-shared-cache-extractor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeith%2Fdyld-shared-cache-extractor/lists"}