💻
Reimagine
  • Reimagine
  • Start using Theos
    • About Theos
    • Installing Theos
    • Theos FAQ
  • Create a Tweak
    • Create a Project
  • Documentation
    • Carbonite Modules
    • Corners as round as Kim's
  • Once Upon A Time
    • What?
  • Code Snippets
    • #100DaysOfCode - Antique
Powered by GitBook
On this page
  • Linux
  • Development Platforms
  • Prerequisites
  • Set up the THEOS environment variable
  • Clone Theos to the device
  • Get the toolchain
  • Get an iOS SDK
  • Install the Swift toolchain (Optional)
  • iOS
  • Development Platforms
  • Prerequisites
  • Set up the THEOS environment variable
  • Clone Theos to the device
  • Get the toolchain
  • Get an iOS SDK
  • Install the Swift toolchain (Optional)
  • macOS
  • Development Platforms
  • Prerequisites
  • Set up the THEOS environment variable
  • Clone Theos to the device
  • Get the toolchain
  • Get an iOS SDK
  • Windows

Was this helpful?

  1. Start using Theos

Installing Theos

This page will go through the steps of installing Theos for your development platform.

PreviousAbout TheosNextTheos FAQ

Last updated 5 years ago

Was this helpful?

Linux

This guide will help you install Theos on your Linux machine, Linux within Windows via and .

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.

Follow the instructions at to add the correct clang-6.0 source for your Linux distro, then run sudo apt-get update to refresh your sources.

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

  1. 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

After installing the above tools, run brew install ldid xz

Set up the THEOS environment variable

echo "export THEOS=~/theos" >> ~/.zprofile

If you are using macOS 10.14 or older, change ~/.zprofile to ~/.profile. The default shell was changed from bash to zsh in macOS 10.15. You can check which one you are using by running echo $SHELL.

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

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

You can get patched SDKs from here:

You can get patched SDKs from here:

(mandatory)

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 .

Windows Subsystem for Linux
Google Cloud Shell
http://apt.llvm.org
https://github.com/theos/sdks
Sam Bingner’s Repository
https://github.com/theos/sdks
Homebrew
Xcode
the SDKs repository