iOS 8 Jailbreak Develepment

Device list:

  1. An iPhone that has been jailbroken
  • A Macs with an Intel Core

I. Software on your iPhone

    • APT front-end for iOS device
  • OpenSSH
    • Secure shell for TheOS
    • Change your iPhone default root/mobile password. link
  • Perl
    • Perl runtime for TheOS pl script
    • cydia source:
  • TheOS for iOS
    • the package build system
    • cydia source:

II. Software on your Mac

  1. Xcode 6.1
  • TheOS for mac
    • path: /opt/theos/
  • ldid
    • path: /opt/dev/bin/ldid
  • dpkg-deb
    • path: /opt/dev/bin/dpkg-deb
  • IOSOpenDev
    • connect Xcode with TheOS
    • path: /opt/iOSOpenDev

1. Install theos

mkdir /opt/theos
git clone /opt/theos

## copy cydia substrate lib file
scp mobile@iphone.local:/Library/Frameworks/CydiaSubstrate.framework/CydiaSubstrate /opt/theos/lib/libsubstrate.dylib

## copy cydia substrate header file
scp mobile@iphone.local:/Library/Frameworks/CydiaSubstrate.framework/Headers/CydiaSubstrate.h /opt/theos/include/substrate.h

2. Install ldid

mkdir /opt/dev/src
git clone git://
cd ldid
git submodule update --init
cp -f ./ldid /opt/dev/bin/ldid

3. Install dpkg

curl -O
chmod a+x dpkg-deb-fat
mv dpkg-deb-fat /opt/dev/bin/dpkg-deb

4. Install iOSOpenDev

open iOSOpenDev-1.6-2.pkg

5. Update mac ssh client config

## 1. update /etc/hosts	iphone.local

## 2. gererate public key for auto ssh login
ssh-keygen -f ~/.ssh/iphone_id_dsa
scp ~/.ssh/ mobile@iphone.local:/var/mobile/.ssh/
ssh mobile@iphone.local
	> cat ~/.ssh/ >> ~/.ssh/authorized_keys
    > rm ~/.ssh/
	> exit

## 3. nano ~/.ssh/config
Host iphone.local
	HostName iphone.local
	Port 22
	User mobile
	IdentityFile ~/.ssh/iphone_id_dsa

6. Set enviroment

## nano ~/.bash_profile

export iOSOpenDevPath=/opt/iOSOpenDev
export THEOS="/opt/theos"
export THEOS_DEVICE_IP=iphone.local
export PATH=/opt/dev/bin:$THEOS/bin:$iOSOpenDevPath/bin:$PATH

III. first project

1. new Xcode project

2. edit HelloWorld.xm file

2. check your config

Project / TARGETS / Build Settings / User-Defined:


3. build for profiling

Product -> Build For -> Build For Profiling

4. done

#### REF:


Theos: package build system

Not to be confused with a toolchain or SDK, Theos helps create and manage projects. Theos:

  • Creates new empty projects based on templates ( see NIC, below )
  • Handles Makefiles for your build environment
  • Automates packaging ( to .deb ) and installation script ( New Instance Creator )

The New Instance Creator is a script, included with Theos, that creates empty projects for you to use as starting points for your development.
link script

Logos is a component of the Theos development suite that allows method hooking code to be written easily and clearly, using a set of special preprocessor directives.

logify .pl script

Logify is a component of the Theos development suite that accepts a class header (.h file) as input and generates a MobileSubstrate extension (.xm file) which hooks all of that class''s methods, printing log messages when they are called. This helps a hook developer see when certain methods are invoked during use.


IOSOpenDev: iOS open dev tools

iOSOpenDev is an open-source project that sets up the iOS SDK to allow open development in Xcode of jailbreak-type projects not supported nor allowed by default and provides Xcode templates for building common jailbreak-type projects and the various tools needed for such development.

iOS 8 Jailbreak Develepment
Share this