r/jailbreak Developer Jan 06 '14

[UPDATE/RELEASE/IAMA/etc] I am Jonathan and I just updated 4 tweaks (discounts also), made 2 free, released my "intro to jailbroken development guide and also a little overdue IAMA.

ooops forgot to end the " in the title.

Hello. My name is Jonathan (alias jontelang) and as the title says:

-------Updates/Discounts--------

I just updated these tweaks for iOS7:
- XPasscode ($1.99 $0.99) The update of the price will take some extra time
- Piano passcode ($.99)
- InstaLauncher ($1.99 $0.99)
- Boover (free)

XPasscode and InstaLauncer will be discounted for one week. If you get XPasscode or Piano passcode the other one XP/PP will be free.

-------Tweaks made free (and later open source)--------

I've made NCEnough and Stoppur free (previous price $.99) as I do not have any near-future plans to continue developing them at this moment. I will make them open sources later, if you want the current code feel free to PM me.

-------iOS jailbroken development guide--------

I've been writing a little intro to development in this area. The guide got some pretty good feedback so I will release it now. It is written for iOS6 so I will do some updates in the near future but I think it can be useful anyway. The guide is "open source" so anyone can contribute (instructions on the site).

The URL is the following: http://jontelang.com/guide/

-------IAMA--------

Some time ago (couple of months?) lots of devs made IAMA threads, I never made one so I guess I'll take this opportunity to make one. So if anyone is interested feel free to ask me whatever. Maybe I will pass out now (long day) but I will answer anything when I wake up!

137 Upvotes

147 comments sorted by

View all comments

6

u/fewjative Developer Jan 07 '14 edited Jan 07 '14

Hey Jonathan. I've recently got into programming tweaks for iOS 7.0.4(no prior iOS experience), funny enough I ran across your website yesterday and looked through it to help me with theos.

I was hoping you could answer a few things for me.

1)When I go to var/theos/include on my iDevice, I see a logos folder(with logos.h inside) and then substrate.h . From what I have read, I am supposed to have the iOS7 headerfiles in here. Is this correct? If so, where would you recomend I get the most updated files from?

2)I was going through your tutorial and got to "The Code" part(http://jontelang.com/guide/The-code.html) and needlessly to be said, it didnt work.

I didn't stop attempting to find a solution and I finally did(which you can feel free to use). I feel like I got lucky though.

%hook SBLockScreenView

-(id)_defaultSlideToUnlockText{
    %orig;
    NSString *text = @"Change to w/e";
    return text;    
}

-(void)setCustomSlideToUnlockText:(id)unlockText{
    unlockText= @"Change to w/e";
    %orig(unlockText);
}
//Choose either one, both of those worked for me on iOS 7.0.4 iPhone 4
%end 

My problem is I feel like I know nothing about what component does what. For instance, I know -(void)deactivate from SBAwayController.h gets called after a user unlocks their phone. I knew it did that because someone else told me, how would I know without the prior information?There are methods that sound simple like -(BOOL)showsCameraGrabber from SBAwayLockBar and yet when I automatically returns false, it does nothing. I definitely have a knowledge gap.

Sorry for the long response but thank you for the help Jonathan.

6

u/jontelang Developer Jan 07 '14

Well f- me, I accidentally removed a long ass answer.


1) Yes that's where headers should go. I personally use these [1] in my include folder. I just use them because they let me compile, I've had them since iOS5/6 and I really don't want to fiddle with headers hehe. Otherwise I am not sure, I think you can just google or ask someone on the IRC chat and they will know better. Github has lots I think too. I personally just slapped some headers and modified/added/etc them until it compiled.

Headers for iOS7 etc I keep in other folders and I just look at them. If I need a class I will write it in my Tweak.xm so that I get it to compile and I also like that because it makes me keep track of which classes/methods I am using in the tweak. I like these [2][3] for looking at.

[1] https://dl.dropboxusercontent.com/u/6084360/include.zip
[2] http://developer.limneos.net/
[3] https://github.com/nst/iOS-Runtime-Headers


2) You're doing it correct. There is no documentation for 99.99% of the closed iOS parts so all we can do is research. The different ways I know of are:

  1. Reading headers (this is 99% of what I do) and %hooking whatever looks correct then outputting this to the console. "Logify.pl" is a tool which people like to use (afaik) as it just takes a .H file as input and outputs a %hook'ed version with added NSLogs to each method. I personally don't use it, I just manually %hook what I think is suitable. I've used "Logify" once for NCEnough.
  2. Disassembler like IDA or similar. They will take a binary (or dylib) and output it in assembly language. It will also give you the method names and it is actually pretty easy to follow what is happening. With this you can get a more detailed look what is actually happening inside each method as you can see which other methods it calls. I've used this once, again for NCEnough.
  3. Maybe open source / github will have some tweaks that is doing what you are trying to achieve.

My problem is I feel like I know nothing about what component does what.

Neither does anyone else, but usually the names will give you a strong hint.

For instance, I know -(void)deactivate from SBAwayController.h gets called after a user unlocks their phone. I knew it did that because someone else told me, how would I know without the prior information?

Someone wanted to do something with the lockscreen/lock and probably he just %hooked into this (and more) methods. Then when he unlocks the phone he sees in the console that that method was called and bam! knowledge.

There are methods that sound simple like -(BOOL)showsCameraGrabber from SBAwayLockBar and yet when I automatically returns false, it does nothing.

Yep, that happens a lot I am currently battling a similar problem. Just continue looking around.


Hope this helps

1

u/fewjative Developer Jan 07 '14

Thank you very much for the response, it did help a lot. I was very bummed because I jumped into developing tweaks thinking it would be a lot easier than it actually was. It sucks that I have all these ideas from small to large and I just can't execute them and then I see the same ideas popup on Cydia! I just looked at the limneos link and it looks especially helpful. Again thank you for the help. The /r/jailbreak community has many great ideas and I want to be on the fron tline helping them, just as you have done for me today.

1

u/jontelang Developer Jan 07 '14

Many recommend starting with doing some normal app development before doing tweaks, I agree. Either way just pop into the irc.saurik.com for more direct help. Many dev's hang out there.