From iPhone Development Wiki
Revision as of 04:00, 26 December 2015 by Uroboro (talk | contribs) (Formatting and proper tag for code.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Injects a dynamic library into an already running process


   usage: cynject <pid> <dylib> [args...]



We want to get the bundle identifier for a certain process.

Creating a dylib

First we create a dylib. We have two different approaches to this. First is to use Iheos and create a tweak.

%ctor {
	HBLogDebug(@"Bundle Identifier: %@", [%c(NSBundle) mainBundle].bundleIdentifier);

After installation, the dylib will be in /Library/MobileSubstrate/DynamicLibraries

We could also use clang with this install script and create the dylib manually.


Once we have the dylib

  1. cynject 443 absolute_path/to/your_dylib_path.dylib


The bundle identifier should appear in the syslog