Skip to content

Instantly share code, notes, and snippets.

View indragiek's full-sized avatar

Indragie Karunaratne indragiek

View GitHub Profile
@indragiek
indragiek / dsc_extractor.patch
Created November 2, 2020 21:29 — forked from lightbulbone/dsc_extractor.patch
Patch for Apple's dsc_extractor in the dyld package.
--- dyld-210.2.3/launch-cache/dsc_extractor.cpp 2012-05-21 02:35:15.000000000 -0400
+++ dyld-210.2.3/launch-cache/dsc_extractor.cpp 2013-07-26 16:05:03.000000000 -0400
@@ -37,6 +37,7 @@
#include <mach-o/arch.h>
#include <mach-o/loader.h>
#include <Availability.h>
+#include <dlfcn.h>
#define NO_ULEB
#include "Architectures.hpp"

iOS Shared Cache Extraction

Having fallen off the iOS-exploration train due to completing my Masters and other commitments, I have finally climbed back aboard in pursuit of understanding the telephony stack.

Like most things in iOS that are used frequently, the vast majority of the frameworks and libraries used in the telephony stack reside in the DYLD shared cache located at /System/Library/Caches/com.apple.dyld/dyld_shared_cache_armv7.

In this post I am going to explain how to go about extracting this cache file so that you can then work with each library individually.

Get The Cache

The first step in all of this is to copy the cache over to your local machine. I did this using a program called iExplorer, but you can just as easily do it over SSH. As a side note, you can connect to your iDevice using SSH over USB if you install a tool called iProxy.

# Use Google Cloud Platform stackdriver with python structlog
from google.cloud.logging import Client
from google.cloud.logging import _helpers
from google.cloud.logging.handlers import CloudLoggingHandler
from google.cloud.logging.handlers.transports.background_thread import _Worker
# pip install python-json-logger
from pythonjsonlogger import jsonlogger