r/jailbreak • • Jun 03 '20
Tutorial [Tutorial] In Depth-Guide to making a tweak in 2020
Hey,
So with the new jailbreak and a whole load more people comes along a whole new wave of developers.
I made this fully in-depth guide on how to create tweaks to lower the bar of entry to new developers too hopefully inspire some people with some amazing ideas to finally create them
This guide is 14 sections long and i am planning on adding more soon
This guide is made so anyone with the tiniest bit of programming knowledge can create their very own tweak.
I hope you get some use out of this guide as it took me ages to create and put together.
Happy developing,
Kodey <3
A Discord Server Full of Developers if you need help or want to ask a question :)
39
u/[deleted] Jun 03 '20
Fantastic guide!
15
u/unaffected2 iPhone X, 14.3 | Jun 03 '20
I was waiting for something like this thx
9
u/FlushyRob iPhone X, 15.0.1 Jun 03 '20
How much easier is it on Mac compared to windows 10
7
u/seven_yes Jun 04 '20
Hats off to you sir
4
u/T-Nan iPhone 13 Pro, 15.0.1 Jun 04 '20
This is great!
I just started learning Java and Python, so idk how useful that is if at all, but it would be fun to mess around and try to come up with a tweak.
4
u/kejocu iPhone X, 13.5.1 | Jun 04 '20
I’m incredibly grateful for this! So many people here probably have coding experience, just not with the specifics required to make tweaks. This really does help bridge the gap.
3
u/the-bitlands iPhone 11, iOS 13.3 Jun 04 '20
Thank you so much for this. It gives me something to learn this summer before my senior year of high school. I know this is such an amateur question but in your earnest opinion — if someone spends 7-8 hours a week for 10-12 weeks learning and practicing, is that enough to become a somewhat decent tweak developer? I’m pretty good at STEM subjects and I don’t know if this is relevant at all but I’ve taken math up to Linear Algebra (and my professor told me it has applications in Computer Science so that’s why I mentioned). I’ve just never taken an actual CS class.
3
u/jorzuniga iPhone 11 Pro Max, 14.8 | Jun 04 '20
congrats!!!
3
u/Zabir_2008 iPhone X, iOS 13.2.2 Jun 04 '20
Thank you so much for this amazing guide man. 👍🏻👍🏻👏🏻
3
u/solwGer iPhone 11, 14.3 Beta | Jun 04 '20
C# developer here (not professionally but enough to create some custom programs for me & friends + family).
Read over this today morning still in bed (until the open source tweak part). Reads really good. Super simple and detailed explanations, should be clear even to non - coders.
As soon as I finish this big product at work and have some time, ill jump into tweak developing for sure. Thanks for your contributions to this community.
3
u/Plenty_Departure Jun 04 '20
While it works as a guide, it's not the best for someone who's completely new. Oversimplifying is the worst way to explain things to a beginner. You want to do the opposite, go as in depth as you can so that every single thing is explained.
For example
Don't just say "we're doing this" and then throw the code. That's confusing for someone who's new. It's better to take every keyword and explain it using logic. For example, you said:
I would say it like this: Logos uses keywords. All of these keywords start with a '%' sign. %hook - This keyword takes (hooks) an objective c class and allows us to do work in it. %end - this tells logos that we're done with that class. Between those two we can overwrite methods of this class, add new methods, add new code to methods. %hook is like @implementation in Objective C and %end is like @end in Objective C, the difference is that we're also modifying instead of just creating. To modify a method you just implement said method inside the %hook block. To run the original code you use %orig. To add a new method you add %new before the method body.
You also imply that %orig should always be used. This is wrong, it's optional and depends on what the goal is.
Then I see a lot of "we don't need to worry about it". Making a test tweak should be an example, not the whole guide. You don't learn anything if all you do is create a test tweak. So instead of "don't worry" say "this is used for... in our example we will...".
Here's another confusing statement:
This is technically wrong. What does "classes" mean? Their code? Their compiled code? You should say "class definitions can be stored in header files. We can generate header files from compiled binaries or we can use headers other people like limneos have generated and uploaded online". Same thing applies to "In objective-c, headers contain our methods and as you will remember our methods allow us to change and modify code on our device" etc.
There are a lot of instances where you over-simplify things to make them easier but you actually make them confusing and sometimes wrong. Also, you call theos a compiler somewhere, while a beginner won't immediately care about that they will eventually have to as they progress. Theos is not a compiler, theos is an IDE. Logos is a pre-processor (you got this part right), clang/gcc are compilers.
2
u/Poopsquare iPhone X, 13.5 | Jun 04 '20
Awesome guide. Thank you for this.
2
u/footysocc Jun 04 '20
Awesome, thanks man. Just a quick question, how can I find all the accessible/exposed functions and variables of, let's say, UIStatusBarDataBatteryEntry? Yesterday I was working on a small tweak (forked from an already finished one) but I had no idea which methods are available to me... IntelliSense obviously won't work :)
2
u/jontelang Developer Jun 04 '20
I’ll never understand why having a banner with the tweak name / dev is a thing in the preferences. It is not really useful, takes up space, repeats the tweak name on the page. They have already tapped the icon/name as well from the root page.
And if I’m gonna be super nit picky you actually reference the HID from Apple which explicitly tells us not to repeat the icon throughout the app, and I think this fits as the root is the entry point to the “app” (preferences). Of course it’s kinda subjective at this point.
/banner rant
Anyway, as someone who also wrote a guide a looong time ago (http://jontelang.com/guide) this looks like a looot of work, kudos.
I’d recommend adding more pictures for accessibility, it’s somehow more reassuring to see a screenshot over just reading text. I think this is similar to how videos are so popular even though technically you can’t really watch at your own pace.
I’d also make it super easy to have contributors, maybe through PRs.
2
u/P0l1zistensohn Jun 04 '20
This is awesome, thank you. I’ll definitely try this out!
2
u/[deleted] Jun 04 '20
This is so cool. With this i'll see if i can work on moving Controllers4All to 64bit devices. It'll take a very long time but hopefully i'm persevere
2
u/Racxie iPhone 15 Pro Max, 17.0| Jun 04 '20
Should be removed due to being a low effort post.
/s
2
u/Sleetui iPhone 13 Pro, 17.0 Jun 04 '20
Consider this for sidebar/wiki/FAQ?
u/PJ09
2
u/muhammadmannan_01 Jun 05 '20
Been looking for something like this forever. Thanks for sharing. I know how I’m gonna be spending my quarantine and summer break 🙌🏽✊🏼
2
u/ImAqeel iPhone XS, 14.3 | Jun 05 '20
I'm running 13.5 on A12. I followed your guide and compile the tweak for 13.4 (since 13.5 headers are broken) . Installed the deb file but Haptic is not working.
2
u/uecker87 iPhone 12 Pro, 14.3 Beta | Jun 05 '20
Hell yeah dude. Thanks for this. I'm a programmer but on a major ERP system at a university, with little to no knowledge on phone apps. I've always been interested in this stuff though and with the new jailbreak I finally have jumped on board.
1
u/[deleted] Jun 04 '20
Also thank you kinda stranger for the medal :)
1
u/Jacky793 Jun 04 '20
Really thank to you 👍🏼 great idea
1
u/DrRedthaCrush Jun 04 '20
I’ve just jailbroken my phone and I wanna know how secure jailbreaking is, am I more vulnerable now. And where would I go to download pirated tweaks just so I know to stay clear of them.
1
u/ImAqeel iPhone XS, 14.3 | Jun 04 '20
I have a question. How did you find out that AudioToolbox.framework must be used?
3
u/FuckVeggies iPhone 7 Plus, 14.2 | Jun 03 '20
+1 for Steve Kochan's book. Thank you for the guide
3
u/[deleted] Nov 02 '20
Guide link is broken :(
2
u/[deleted] Nov 08 '20
The link isnt working for me :/
1
u/Kakakashi Jun 04 '20
Thank you
1
u/Piloven Nov 24 '20
link is broken
1
u/sorrysad iPhone XS, 14.3 | Nov 26 '20
Why the guide is down?
0
u/Cyfer_Ninja_3006 iPhone 1st gen, 13.5 | Jun 04 '20
This is easily the best tweak development guide ive seen
0
u/[deleted] Jun 04 '20
[deleted] — view deleted comment
0
u/[deleted] Jun 04 '20
[deleted] — view deleted comment
0
u/[deleted] Jun 04 '20
[deleted] — view deleted comment
0
u/[deleted] Jun 04 '20
[deleted] — view deleted comment
0
u/[deleted] Jun 03 '20
[deleted] — view deleted comment
2
u/[deleted] Jun 04 '20
[removed] — view removed comment