Theos on MAC OS

From Hawk Wiki
Jump to: navigation, search

Install theos

This procedure works on Mac OS Yosemite.
First, set the os path.

export THEOS=/git/theos

In mac, you can do "vim ~/.bash_profile" and add "export THEOS=/git/theos"
Download from git, you can choose your own folder

cd /git
git clone

Generate substrate

sudo $THEOS/bin/ substrate

There is a bug. Need to copy from iOS device /Library/Frameworks/CydiaSubstrate.framework/CydiaSubstrate to $THEOS/lib/libsubstrate.dylib

Install dkpg, download from
restart terminal after install

sudo port selfupdate
sudo port install dpkg

Additional templates (optional)
copy and paste to $THEOS/templates/iphone
Now you can create tweaks from templates


choose the tweak type.

After edit you tweak
add THEOS_DEVICE_IP = <your device ip> into makefile
also add ARCHS = armv7 arm64 into makefile

make package install
// enter your ssh password

sample tweak.xm

@interface NSString (MD5)
- (id)Md5String;

%hook NSString
// log string before and after md5
- (id)Md5String {
  %log(@"HW: -------------------------Tweak: Md5String-------------------------\n");
  id ret = %orig;
  return ret;

How to watch syslog in ios 8

apt-get install socat
socat - UNIX-CONNECT:/var/run/lockdown/syslog.sock


$THEOS/bin/ SomeClassHeader.h > tweak.xm

It can automatic generate tweak.xm file to log all functions provided in a header.

theos installation path


Application Path

ios 8




Application Document Path

ios8 and ios9