Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List of enhancements/features directed towards jailbreak developers. #628

Open
HearseDev opened this issue Sep 18, 2022 · 4 comments
Open

Comments

@HearseDev
Copy link

HearseDev commented Sep 18, 2022

These are couple of enhancements/features directed towards iOS jailbreak developers that could make flex a better tool than it already is.

  1. Rather than having no argument names for methods, flex should add an argument name such as arg#. The reason for this is it would make life easier to just copy and paste the method declaration rather than manually typing every argument name, this gets difficult especially if the method has tons of arguments. The declaration would be valid syntax for objective c, rather than incomplete without the argument names so it would would plug and play when copying and pasting especially when you just want to log the method in a hook.

  2. FlexExtend is a tweak made by me https://github.com/flexextend, which is old and broken and poorly written by me one night. It provided a way to copy full header to the pasteboard. Which would include the interface, the property list, class/instance methods along with the argument names following scheme mentioned above (arg#). Along with that it also provided a full hook in logos syntax, which logged every method in the class and also logged all arguments(using NSLog) with support for format specifiers, such as int, strings, floats, etc. Even things for things like selectors, it would use objective c methods such as NSStringFromSelector, etc. for logging the arguments using NSLog to provide an easy option to log methods automatically rather than doing it one by one. I believe this was and still is a game changer that would make life easier for jailbreak developers. (I would obviously rewrite all of these for the pull request since flex extend is fairly old and I have grown a lot since as a developer and I believe I can do a good job at executing this). If this feature is not in the scope of what flex stands for, then I would be happy to rewrite FlexExtend properly. Here is a sample of what FlexExtend provided, https://pastebin.com/YttYbS5B . (P.S it was a long ago I wrote the tweak, I am aware that I called %orig twice which is not best practice. And the formatting of the log statement is a little off as well)

  3. Unrelated to flex, I was thinking about also updating flexing instead of making yet another tweak that extends flex to provide an easy way for jailbreak developers to inspect iOS. Adding features such as a preference bundle, blacklisting, etc. Also adding a really smart functionality of a tweak called FlexList which is on the bigboss repo that allows for 3D Touch option for automatically opening flex the instance the app is opened. The reason I would want to add this to flexing instead of using FlexList is because I think FlexList is old and not really known and I believe it does some things incorrectly. I believe this is really useful, please let me know if this is in the scope of what flexing is about.

  4. This last feature is one of the most important ones on this list because it excludes using a class dump for applications. Adding a feature to search through all methods in a selected image. On top of that, if this is actually possible, perhaps provide a whole new option to make use of this functionality? And if this is possible, what would also be possible is producing a header for every single class in the selected image (functionality mentioned in 2), which could be saved into the documents folder of that app (This might be a stretch because this functionality would only be limited to jailbroken users to make use a file manager to make use of those headers)? I believe this is another game changer making flex an amazing utility for jailbreak developers because this excludes the use of classdump tools, etc. which are not updated or are private or requires the use of a computer and a decrypted binary.

Let me know what you think.

@NSExceptional
Copy link
Collaborator

Rather than having no argument names for methods, flex should add an argument name such as arg#.

Referring to the "Copy… Declaration" feature, right? I agree 👍🏻 I can add this

FLEXTend

That all sounds neat! I can't say I'd want to merge all of that functionality directly, but I can at least add APIs as necessary to make it work as officially supported extension so that it won't break in the future. (Also yes, calling %orig twice can be very bad for methods that have side-effects, heh)

Preference bundle

I'm hoping I can avoid ever adding a preference bundle to FLEX. In fact for it to work properly in regular apps, it should be fully configurable from within itself. The one exception might be something like "open automatically in specific apps" but I think I have a potential workaround for that

blacklisting

Libhooker and iCleaner should cover this use case imo

3D Touch option for automatically opening flex the instance the app is opened.

Ooooo I like this, I've never even heard of this. Need to see how it is implemented.


Did you figure out how to search methods in an image? It's not super intuitive, but it's under the "runtime browser" feature

@HearseDev
Copy link
Author

HearseDev commented Sep 18, 2022

Yes i eventually did end up figuring out how to search methods. I never payed attention to the placeholder string in the search bar. I apologize haha

FlexList

First it places hooks for adding the 3d touch option. You can look at my tweak which does the exact same thing: https://github.com/hearsedev/3developer

It also injects into UIKit and uses a plist that specifies which processes are enabled to enable the necessary hooks to auto open flex.

Adding internal API

I honestly think that would amazing, thank you.

@NSExceptional
Copy link
Collaborator

Unrelated but what the hell is that XLsn0w/Cydia repo? lol

@HearseDev
Copy link
Author

Unrelated but what the hell is that XLsn0w/Cydia repo? lol

I actually have no clue, might want to run a translator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants