Tutorial: Install the latest Theos step by step

Please refer to the official document

Foreword

Theos, which was originally developed by DHowett, became stalled after he joined Microsoft and no longer had time for maintenance. Then Adam Demasi a.k.a. kirb picked it up and made several significant changes to it ever since. Therefore, the installation of Theos from iOS App Reverse Engineering no longer works, and this post is an update of the outdated content.

Install dpkg and ldid

dpkg is the

package manager for Debian,

while ldid is

a tool made by saurik for modifying a binary’s entitlements easily. ldid also generates SHA1 hashes for the binary signature, so the iPhone kernel executes the binary.

First install Homebrew if you don’t have it, and then just run:
FunMaker-MBP:~ snakeninny$ brew install dpkg ldid

Install Theos

We used to install Theos at /opt/theos, and let’s keep it the same.
Run:
FunMaker-MBP:~ snakeninny$ sudo git clone --recursive https://github.com/theos/theos.git /opt/theos

Then change the owner of /opt/theos to yourself:
FunMaker-MBP:~ snakeninny$ sudo chown $(id -u):$(id -g) /opt/theos

Last but not least, set the $THEOS variable in your environment by editing ~/.bash_profile, and add such a line to that file:
export THEOS=/opt/theos

~/.bash_profile looks like this afterwards:

Test

cd to a writable directory and run:
FunMaker-MBP:Code snakeninny$ nic.pl
If New Instance Creator is run, you’ve got Theos successfully installed. Congrats!

Update Theos

Remember to pull recursively, using the following command:
FunMaker-MBP:theos snakeninny$ git submodule update --recursive

Much easier than the original setup, huh?

Happy tweaking!

References:

  1. Installation · theos/theos Wiki · GitHub
  2. http://stackoverflow.com/questions/1030169/easy-way-pull-latest-of-all-submodules
4 个赞

how about kirb’s theos ?

1 个赞

This repo is declared and maintained as the official Theos project, and kirb is one of the contributors

2 个赞

The parameter ‘–recursive’ here is very important, as in official tutorial from iPhoneDevWiKi, it has no this parameter and cause some errors. It took me almost several hours to figure it out.

你好请问,为什么我按照你的顺序执行到这步就提示命令找不到?

JoneMacPro:lib Jone$ sudo /opt/theos/bin/bootstrap.sh substrate
sudo: /opt/theos/bin/bootstrap.sh: command not found

我也没有找到 bootstrap.sh

我试了一下,貌似是新版Theos不需要运行这个命令了,可以直接跳过

对,我之前使用的是新版的,没有这个可以的

新版本安装更简单了。:grin: