theos-jailed
theos-jailed copied to clipboard
Add support for Linux/jailbroken iOS/Windows platforms
The code uses some 'tools' which may only be available on Mac such as PlistBuddy.
but would it be possible if we can replace the files that aren't available on ios to alternatives? plistbuddy to sed for example.
Unfortunately, some of the tools used (such as insert_dylib) aren't built for arm architectures, and don't have a replacement. If you can find a way around this, I may be able to add iOS support. Pull requests are welcome.
I recently managed to port insert_dylib
to iOS, so I might be able to convert the entire project some time in the future. However, another issue would still remain of porting the bash scripts from BSD to GNU. Again, if anyone could help me do that, it would definitely speed up the process and would be greatly appreciated.
@kabiroberai converting bash scripts to/from GNU is pretty easy -- you just need to know the differences between the various utilities (cp
, mv
, echo
, etc.). I can provide assistance if need be.
@citrusui thanks, I'd definitely appreciate that as I haven't had much experience with GNU flavoured bash.
As a follow up to the comments by you and @kirb in #28 (about plutil alternatives on iOS), do any of them support conversion from the NextStep format?
As kirb mentioned, Erica Utilities has its own version of plutil
. I don’t have a device to test with, so I really have no idea. kirb probably knows... he knows everything :P
btw, I’ll be going on a trip this week and won’t have access to my laptop. i won’t be able contribute anything until then.
CF can read NeXTSTEP, XML, and binary plists; and write XML and binary (but not NeXT). plutil is just using CoreFoundation/Foundation so it has the same behavior.
any update on this? :)
Hey @Antonn1, I’m going to be busy until March with school stuff, but after that I’ll definitely have some time to work on Theos Jailed.
I’m also making an app called Supercharge that lets you make tweaks on non-jailbroken devices (which is why I had to port insert_dylib
to iOS). Once that’s out, it’ll hopefully pave the way for more improvements to Theos Jailed too.
can't wait! :) :)
any updates on this? :)
its been 1 year since the suggestion and march is very close :)
March 26th is the date of my last exam, so I’ll try porting Theos Jailed after that. I finally jailbroke my 7 Plus (Electra RC1.3 via coolstar) which means that it’ll be easier for me to confirm that it works.
how about now @kabiroberai?
hope all exams are good :)
Exams went well, I’m going to take out some time to work on this soon
I've been thinking about this, and I've realised that Theos Jailed can't fully work on other OSes yet since they don't have codesign
. There are alternatives, but they're either outdated or closed-source, which means I can't use them in this project. This means that on other operating systems you'll probably have to sideload the patched app with Impactor yourself, i.e. make install
won't work.
I've made ./install
work correctly on iOS with 3cb40dc, however I still have to modify a few more things before the entire project works on jailbroken iOS. The main hurdle at the moment is finding an alternative to PlistBuddy, so I'd appreciate help regarding that.
i think sed will work? sed is available on most OS unlike plutil :)
sed isn't built to parse complex plist files though. Perhaps I could use a regular XML parser instead.
Ideally should use libplist for all plist reads/writes even if XML.
Hmm, has anyone cross-compiled it for iOS yet? Seems promising
Looks like the cli doesn't provide all the functionality I need :/
not possible? :(
It's possible, but somebody will need to create a viable alternative to PlistBuddy first
xmllint is in-built and can read plist files, syntax is same as the MacOS terminal, if ya need assistance :)
hope everything is well. i know you are mostly focused on "Supercharge" now, still i gotta ask if you got to updating/find alternatives to the required tools in order for theos-jailed to work on iOS?
About 4 years late to the issue, but I had to deal with the same problem a while ago so I thought I might as well share what I found:
For Linux, https://github.com/withgraphite/plutil has a version of PlistBuddy written with cross-platform use in mind
For iOS, these 3 functions that are just wrappers for Sam Bingner’s plutil for iOS seem to work fine.
RemovePlistKey () { plutil -remove -key "$1" "$2" &>/dev/null }
$1 is the plist key $2 is the plist file
ReplacePlistValue () { plutil -value "$1" -key "$2" "$3" &>/dev/null }
$1 is the new value for the key $2 is the plist key $3 is the plist file
ExtractPlistValue () { plutil -key "$1" "$2" &>/dev/null }
$1 is the plist key $2 is the plist file
The solution I have used in Azule (https://github.com/Al4ise/Azule), for example is to use a different set of these 3 functions for ios and macOS/Linux. On macOS and Linux, they would be wrappers of PlistBuddy, and on iOS - of plutil. I might try to make a pull request on the topic in the near future, but I wanted to see if anyone would find any problems in the concept first.
I already built my own solution for it until kabiroberai build a native solution. Syto203/theos-jailed@ a71d0bfa12dfb0f20325f179a43069554078d8e2
And the PR here #73
Oh well, yeah maybe it's a bit better than using that unofficial plutil. Good job! Looks great
For Linux you might need to adjust the “sed” command since it might not work nicely with all distros. For example in arch u can use this one syto203/theos-jailed@58a4f68ee0c2f40494a5df5e048b9606491afde7
In Theos core we came across a similar issue of not having a cross-platform plutil available, theos/theos#134, and we’re probably going to solve it by using DHowett’s ply (likely on all platforms). Perhaps Theos could put ply in $THEOS/bin so it’s available on $PATH for theos-jailed to use.
does ply allow mutation or is it read-only? Theos Jailed uses PlistBuddy to set keys so we definitely need something with write support. Another option worth mentioning is Swift, which has support for modifying plists even on Linux via PropertyList[Serialization/Encoder/Decoder] in Foundation. Since we’re already building a system to bootstrap Swift-based support tools for Orion, we could do the same here. And in the process, modernising Theos Jailed’s Swift support would be a nice bonus — especially if it can be made to work with Orion, which should definitely be possible.