Installing Theos
This page will go through the steps of installing Theos for your development platform.
Linux
This guide will help you install Theos on your Linux machine, Linux within Windows via Windows Subsystem for Linux and Google Cloud Shell.
Development Platforms
Platform
Minimum OS Version
Supported Targets
Linux
Linux Kernel 3.16
Linux, iOS
Windows 10
Windows 10 Build 14393
Linux, iOS
Prerequisites
All the commands shown on the following instructions are meant to be run as the "user" user, not root. Similarly, Theos is also meant to be run as a normal user, not root.
On Linux or WSL:
sudo apt-get install fakeroot git perl clang-6.0 build-essential
build-essential or equivalent for your distro.
Additionally on WSL:
sudo update-alternatives --set fakeroot /usr/bin/fakeroot-tcp
On Google Cloud Shell:
# Setup llvm repository
echo -e "deb http://apt.llvm.org/stretch/ llvm-toolchain-stretch-6.0 main\ndeb-src http://apt.llvm.org/stretch/ llvm-toolchain-stretch-6.0 main" | sudo tee -a /etc/apt/sources.list.d/llvm.list
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo apt update
# Install dependencies
sudo apt install bash clang-6.0 coreutils fakeroot git grep make openssh-client perl rsync sed
Set up the THEOS environment variable
echo "export THEOS=~/theos" >> ~/.profile
For this change to take effect, you must restart your shell. Open a new tab and do
echo $THEOS
on your shell to check if this is working.
Clone Theos to the device
git clone --recursive https://github.com/theos/theos.git $THEOS
Get the toolchain
curl https://kabiroberai.com/toolchain/download.php?toolchain=ios-linux -Lo toolchain.tar.gz
tar xzf toolchain.tar.gz -C $THEOS/toolchain
rm toolchain.tar.gz
Get an iOS SDK
curl -LO https://github.com/theos/sdks/archive/master.zip
TMP=$(mktemp -d)
unzip master.zip -d $TMP
mv $TMP/sdks-master/*.sdk $THEOS/sdks
rm -r master.zip $TMP
Install the Swift toolchain (Optional)
curl https://kabiroberai.com/toolchain/download.php?toolchain=swift-ubuntu-latest -Lo swift-toolchain.tar.gz
tar xzf swift-toolchain.tar.gz -C $THEOS/toolchain
rm swift-toolchain.tar.gz
Note that the minimum SDK version required to compile Swift code is currently iOS 11.2.
iOS
Development Platforms
Platform
Minimum OS Version
Supported Targets
iOS
iOS 5.0
iOS
Prerequisites
All the commands shown on the following instructions are meant to be run as the "user" user, not root. Similarly, Theos is also meant to be run as a normal user, not root.
Add and install the following in Cydia
Theos Dependencies
Set up the THEOS environment variable
echo "export THEOS=~/theos" >> ~/.profile
For this change to take effect, you must restart your shell. Kill the terminal app in the App Switcher then reopen the terminal app and do
echo $THEOS
on your shell to check if this is working.
Clone Theos to the device
git clone --recursive https://github.com/theos/theos.git $THEOS
Get the toolchain
Theos Dependencies contains the iOS Toolchain
Get an iOS SDK
curl -LO https://github.com/theos/sdks/archive/master.zip
TMP=$(mktemp -d)
unzip master.zip -d $TMP
mv $TMP/sdks-master/*.sdk $THEOS/sdks
rm -r master.zip $TMP
Install the Swift toolchain (Optional)
curl https://kabiroberai.com/toolchain/download.php?toolchain=swift-ubuntu-latest -Lo swift-toolchain.tar.gz
tar xzf swift-toolchain.tar.gz -C $THEOS/toolchain
rm swift-toolchain.tar.gz
Note that the minimum SDK version required to compile Swift code is currently iOS 11.2.
macOS
Development Platforms
Platform
Minimum OS Version
Supported Targets
macOS
Mac OS X Mavericks (10.9)
iOS, macOS, watchOS, tvOS
Prerequisites
All the commands shown on the following instructions are meant to be run as the "user" user, not root. Similarly, Theos is also meant to be run as a normal user, not root.
Install the following tools
Xcode (mandatory)
After installing the above tools, run
brew install ldid xz
Set up the THEOS environment variable
echo "export THEOS=~/theos" >> ~/.zprofile
For this change to take effect, you must restart your shell. Open a new tab and do
echo $THEOS
on your shell to check if this is working.
Clone Theos to the device
git clone --recursive https://github.com/theos/theos.git $THEOS
Get the toolchain
Xcode includes the toolchain
Get an iOS SDK
Xcode always provides the latest iOS SDK, but as of Xcode 7.3, it no longer includes private frameworks you can link against. This may be an issue when developing tweaks. You can get patched SDKs from the SDKs repository.
curl -LO https://github.com/theos/sdks/archive/master.zip
TMP=$(mktemp -d)
unzip master.zip -d $TMP
mv $TMP/sdks-master/*.sdk $THEOS/sdks
rm -r master.zip $TMP
Windows
In-Progress
Last updated
Was this helpful?