Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to start Jailbreak development

I am new to jailbreak development, but I have enough knowledge and experience of iOS development. I am really confused how to start coding for my idea. Moreover, I want to stick with Xcode for that. I have setup all necessary tools for jailbreaking; starting from theos to iOSOpenDev. Plus I have downloaded all private iOS frameworks.

My Idea: Basically what I want is to develop a simple tableview UI for my app, through which user will be able to change access settings for apps present in device. For that, what main things I need to do are:

  1. Get all apps identifiers and names present in device.

  2. Tackle with app launch events to control which app should be launched.

  3. Run my app as root.

Now my Questions:

1- Can this be done with normal Xcode project accessing private frameworks or I need to use NIC (New Instance Creator) generated project for that? Or there is any such iOSOpenDev template which can help me in creating such tweak?

2- If without xcode, how can I start developing my idea?

3- How can I take start?

Please guide me. Any links, suggestions will be appreciated. Thanks.

like image 409
NightFury Avatar asked May 23 '14 09:05

NightFury


1 Answers

Can this be done in Xcode?

In short, absolutely. A little more in the details, iOSOpenDev is a great tool and it has everything you need to develop any kind of tweaks. You can access private frameworks in Xcode, actually they are there by default in the SDK that comes with Xcode, the only thing you have to additionally install (iOSOpenDev takes care of this too) are the headers for these private frameworks which are dumped from the binaries shipped with the SDK.
NIC is really a very small part of the process, think of it as pressing "New project" in Xcode from the command line. It generates a basic project with a Tweak.xm file, a plist, a Makefile.
Just so you understand, there files one by one are:

  • The Tweak.xm is the file where you will be writing your code.
  • The plist (actual name is TweakName.plist) is specifying the filters for MobileSubstrate about where should your tweak be loaded. For example the default is com.apple.springboard which means it's getting loaded into the SpringBoard (it's a bundle identifier of the app). Or you can do things like com.apple.uikit which means basically any iOS app because everything uses UIKit.
  • The Makefile is what tells the compiler (actually the make command) how to compile the .xm code file.

The first 2 files are neccessary in any tweak, the third, Makefile is if you don't use Xcode, but rather compile it from the Terminal using make.
With all that said and however you can still do it using Xcode, I'd suggest the Theos-NIC-make way of doing this. First, it's much more stable, I experienced major bugs when trying to compile/install my tweaks with iOSOpenDev but @DHowett made Theos a masterpiece, I never had any problems with it even in the early days.
For getting started I'd suggest looking at some open source tweaks, 'tweaking' them a little more, modify some stuff and see how those take effect.

What are these things?
Theos: Build system for iOS, it can literally build anything as long as it's told how.
Logos: A tool to let you write beautiful code with the %hook - %end syntax instead of the much more difficult MobileSubstrate way

Some links:

  • Theos installation
  • How to use Logos
  • MobileSubstrate
  • @rpetrich's GitHub (literally tons of awesome tweaks)
  • @DHowett's Github (the guy who made Theos and Logos)
like image 186
Rickye Avatar answered Sep 30 '22 02:09

Rickye