Tutorial: Install the latest Theos step by step


#1

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. https://github.com/theos/theos/wiki/Installation
  2. http://stackoverflow.com/questions/1030169/easy-way-pull-latest-of-all-submodules

运行Theos的自动化配置脚本出现的问题,求助!
使用InspectiveC来查看调用堆栈
新人求问,macports安装dpkg失败
找不到bootstrap.sh
$THEOS/bin/bootstrap.sh substrate使用这个命令出现一个error
Theos打包报错
打包执行make package,报dpkg-deb: 错误:废弃的压缩类型 lzma;请用 xz 代替
请问一下, 这个是啥情况?
重装theos错误
书上第29页,配置CydiaSubstrate出现问题
#2

how about kirb’s theos ?


#3

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


#4

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.


#5

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

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

我也没有找到 bootstrap.sh


#6

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


pinned #7

unpinned #8

pinned #9

#10

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


#11


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