How jjolano/shadow works
Project type and purpose
• This is an iOS “tweak” — a jailbreak-detection bypass library that hooks into target apps at runtime. It consists of:
• A dynamic library (Shadow.dylib) loaded by a hooking engine (Substrate/Substitute or fishhook)
• A private framework (Shadow.framework) containing the core bypass logic, rulesets, and settings API
• A Settings bundle (ShadowSettings.bundle) to expose a configuration UI in Apple’s Settings app
• Build scripts, Makefiles, and Debian packaging metadata to assemble a .deb for Cydia/AltStore
File structure
• Top-level: Makefile, build.sh, common.h, control & layout for Debian packaging
• Shadow.dylib/…:
• hooks/ : X-code assembly stubs (.x) and headers to intercept Objective-C methods and syscalls
• layout/Library/libSandy : helper library for sandboxed preference loading
• Shadow.framework/…:
• Core.m, Backend.m, Utilities → business logic and rule evaluation
• Ruleset.m, Settings.m → load embedded .plist rule definitions, read user prefs
• layout/Library/Shadow/Rulesets : default rule files (StandardRules.plist, etc.)
• ShadowSettings.bundle/…:
• Resources/*.plist & .lproj : PreferenceLoader definitions for Settings.app UI
• Controller .m/.h files : table-view controllers for each screen
• shdw/: an executable entrypoint (CLI or diagnostic tool)
README for additional insights
• Confirms it’s a hook-based bypass for modern iOS jailbreak methods
Main components & their interactions
a. Components
1. Hooking Engine (Substrate/Substitute/fishhook)
2. Shadow.dylib (hook stubs)
3. Shadow.framework
– Core & Utilities
– Ruleset loader
– Settings API (reads /var/mobile/Library/Preferences/me.jjolano.shadow.plist)
4. Embedded Ruleset files (.plist)
5. iOS Settings App + ShadowSettings.bundle UI
6. Installer (dpkg) / control scripts (postinst triggers respring)
7. External Dependencies (libSandy, AltList, HookKit, RootBridge)
b. Relationships & Data flow
– At app launch, Hooking Engine injects Shadow.dylib → calls into Shadow.framework
– Shadow.framework intercepts detection calls (syscalls/Obj-C methods) → applies bypass logic from Ruleset
– Ruleset loader fetches built-in .plist files
– Settings API reads user preferences set via Settings.app UI
– Settings.bundle UI writes preferences → file watcher in framework picks up changes
– Installer writes all components into their target directories and triggers a device respring
c. Architectural patterns
– Plugin/Hook pipeline: decouples low-level hook stubs from high-level bypass logic
– MVC in Settings.bundle: plist model → controller .m files → table-view UI
– Configuration-as-data: .plist rulesets and preference files
d. Key technologies
– Assembly stubs (.x) for dyld/substrate hooking
– Objective-C framework code (.m/.h)
– plist for resource/config data
– Debian control files for packaging
Elements
• Installer (Debian packaging)
• Hooking engine & dependencies
• Shadow.dylib (hook stubs)
• Shadow.framework subcomponents (Core, Ruleset, Settings API)
• Settings.app + ShadowSettings.bundle (UI)
• Rule files (.plist) & Preferences file
• “Injects” / “Hooks” (engine → dylib)
• “Calls into” (dylib → framework)
• “Reads” (framework → .plist files / Preferences)
• “Writes” (Settings UI → Preferences)
• “Installs to” (Installer → device filesystem)
• Green for installer/build components
• Blue for runtime hooking components
• Yellow for configuration/UI components