Hi guys, Chris here and I decided to go ahead and create a tutorial on how to setup Theos on your favorite iDevice if you are wanting to get into the world of jailbreak tweak development! When I was following other tutorials online they either weren’t detailed enough or they left out some very important details that I had to figure out for myself so I am creating this tutorial in hopes that I will cover everything and you all will be developing your very own tweaks in no time! That’s enough preface, so lets get started!
Before we start diving into this tutorial, we need to open our Cydia application and two different repos. Most everything needed else wise will be located on our default Cydia repos. If you don’t know how to add a repo to your Cydia that’s okay because I am going to tell you!
- Open Cydia from your Springboard
- Click on Sources located at the bottom of Cydia
- Next, click on Edit in the top right corner
- Then click the ‘+’ sign located in the top left corner
At this point we should now see a text input alert view on our screen This is where we are going to type in our repo address to add it to our sources. The repos we will be adding are as follows:
Once we have added these repos, we are ready to move on to the next step! Click on the Search icon located in the bottom rightmost corner of our Cydia app. It’s now time to start downloading the files needed to get Theos up and running on your iDevice! There are a few packages we need to download and they are as follows:
- BigBoss Recommended Tools
- Perl (Coolstar’s Repo)
- iOS Toolchain
- Theos (Howett’s Repo)
Now that we have all of the necessary files downloaded, its time to move on to the next step! Go back to your Springboard and locate the application iFile. Once you have found that, click on the application icon to launch.
Now that we are in iFile we should be looking at our root directory. If not, click on the center most icon located in the bottom navigation bar that looks like an open book and then click on Disk which should be the very first option. We now should see a list of files and folders located in our root directory. Scroll down until you see /var and click on that. If the installation of Theos was successful we should now see the following directory within the root of our device:
Once we have confirmed that Theos is now installed we can celebrate a little but there is still more work to be done. Remember how we had to add a repo and install Perl from it? Well now you are going to see why. We need to go back into the root of our iDevice and navigate to the following path:
In that directory we should see a file called perl5.22.0. Once you have located that file, click on Edit in the top right corner and then select it. Now we need to click on the clipboard icon located in the bottom right of iFile and then click Copy/Link. Once we have copied the file we need to go back into our root directory and navigate to the following path:
Click on the Edit button once more and then click on Create Link. DO NOT click on paste. This step is extremely important! We do not want to simply paste it but create a SymLink to the original file. We should now have the file name perl5.22.0 located into our new directory. Click Edit again and the click on the blue (I) icon to rename our file. We want to change the name to “perl”. Once we have renamed our file we need to navigate to:
We need to find the file ‘bootstrap.sh’ When you have located the file click on it and open using a Text Viewer. Now we need to find the line of code that reads as such:
if [[ "$(uname -s)" == "Darwin" && "$(uname -p)" != "arm" ]]
We need to add 64 to the end of arm so it should now look something like this:
if [[ "$(uname -s)" == "Darwin" && "$(uname -p)" != "arm64" ]]
Once you have made that change, save the file and now we need to navigate to yet another directory. The directory we will be visiting now is:
We now need to find the folder named ‘Darwin-arm.’ Once you have located the folder, click on Edit and then click on the blue (I) icon once more. We need to rename this folder to ‘Darwin-arm64.‘ Now that we have renamed our folder, we need to once again navigate to a different directory. The directory is:
There should only be one file located in this folder called ‘Darwin-arm.‘ We need to simply add 64 to the end of that filename resulting in ‘Darwin-arm64.‘ Now that we have made Theos compatible with arm64 devices, we can now download the SDK files corresponding to our current iOS version. The highest jailbreakable iOS version at the time of this post is iOS 9.3.3 so that will be what I use as an example for this tutorial.
Open your Safari app and navigate to the following website:
We now need to find the iOS 9.3 SDK and click on Download. When you click download, a new tab should appear showing us a file to download. Since we have iFile installed we should see a link that says ‘Open in iFile.‘ This is exactly what we want! Click on that and it should open iFile for us automatically. We now need to click on Edit and Copy the file. Once you have the file copied to the clipboard, we again need to navigate to a different directory. That directory is:
If you have a folder called ‘sdks‘, perfect! If not, we need to create that folder. Once you have created the folder click on it to navigate inside. We then need to click on Edit and then Paste the file into that folder. Now that the .zip file has been successfully copied into that folder, click on it and click Unarchiver to extract the SDK into that folder.
If you have made it this far then you are dedicated and want to start developing your very own tweaks so I commend you for that! I am going to simplify this next part of the tutorial by creating a list of commands we need to enter into Terminal to finish setting up Theos. Now we need to open up Terminal and login to our device by typing the following:
Now I am going to show you the list of commands to enter. Please note that after each command, you must click the Return/Enter button on your keyboard to sent that system command to your device. The commands are:
ldid -s clang
ldid -s clang++
Now that we have successfully ran all of those commands, we are now ready to launch Theos and get started on making our very first tweak! To do this we need to open Terminal and navigate to any directory we want to create our project in. I would recommend creating a new folder in your Documents directory called Development so you can better keep track of everything. To do this, open iFile and click on the ‘open book’ icon and then click on Documents. Then click on Edit and then the ‘+’ icon in the bottom left. Change the type to Directory and name it how you wish. Then in Terminal we need to run he following command to get to our Development folder:
Now that we are in the directory we want to create our tweak in, we need to run this command to show us our Theos menu:
If a menu appears showing us option to choose from then we have successfully installed Theos and can now start developing our tweaks! If you don’t want to run that command every time your create a new tweak, there is a simple trick to use so you can simply just type ‘Theos‘ and the menu will appear. To do this follow these steps:
- Open iFile
- Navigate to /bin
- Once there, create a file named theos
- Now open that file using a Text Viewer and then enter the command used to show the theos menu (/var/theos/bin/nic.pl)
- Save the file and then close iFile
Now whenever we are inside of a folder we can simply just type ‘theos’ and the Theos menu will appear!
I hope you have learned how to setup Theos on your iDevice today and if you have any questions, feel free to drop a comment and let me know and I will try my best to answer any questions you may have!