-
Notifications
You must be signed in to change notification settings - Fork 550
Please support arm64e #77
Comments
Not something I can do if Apple doesn’t support it. Try using alternative solutions in this project’s repo |
I updated the documentation to explain this, take a look https://github.com/HikariObfuscator/Hikari/wiki/Troubleshooting#aarch64e-support |
Updated documentation to add a detailed guide on how to support arm64e |
Thank you! |
Apple has now open-sourced their arm64e implementation, with quite some porting work we can get Hikari proper arm64e now. swiftlang/llvm-project#14 |
@Naville I attempted to compile for arm64e using the Hanabi alternative method which hasn't worked, installed and patched. Am I missing something? Getting the error "invalid arch name '-arch arm64e'". I can compile arm64 no problem. Using in a Theos tweak. |
Not really sure. Apple has now open-sourced their ARM64E so I just ported Hikari to LLVM9+ and used Apple's fork instead. That port won't be open-sourced though |
@Naville I used the latest HikariObfuscatorInstaller-2020.05.04Signed.pkg and then Hanabi and then that would technically be enough to compile for arm64e as in your documentation about AArch64e Support? In my makefile I include the |
No. Either my documentation is unclear or you misunderstood it. PKG installers were based off now "deprecated" (Or should I say old) LLVM versions which doesn't contain ARM64E support. For AArch64E you'll need to inject Hikari into Apple Clang's Pass Pipeline. Either using Binary hooking(which the subproject Hanabi achieved in older Xcode versions) or port the passes to the LLVM version Apple Clang is using and inject the passes at source-level based off Apple's LLVM fork EDIT: Typo |
@Naville Sorry for bugging you again, do you have a link to the binary hooking in Hanabi or code used? I’m not a super experienced developer so bear with me. I seen a fellow tweak developer using the function wrapper method and it works on arm64e so it’s obviously possible, just unsure how to do it for my tweak just yet. |
The hook itself is pretty trivial, just use standard InlineHook Libraries(I used MobileSubstrate), the actual difficulty lies in knowing where to hook and handling issues which requires actual understanding of LLVM due to it's complexity. |
Hanabi's core mechanism should work fine at least for last major Xcode Release (11 I think) but never bothered porting that implementation due to private fork switching to alternative implementation. But AFAIK it should still work reasonably well as long as you take care of the remaining quirks |
@Naville I’d really like to get it working for a mobile substrate tweak, so I’ll keep trying and see how far I can get. |
Basically you have two options:
|
@ca13ra1 You may have already tried it, but there are many other simple Obfuscators out there. I merged one of them (LLVM10 compatible) into Apple's LLVM and it's probably working fine; Hikari is one of the most powerful obfuscators and I love it, but that doesn't mean it can't be cracked. (In fact, my tweak once got cracked by Julioverne, probably it is because arm64e isn't obfuscated tho) |
@Naville Is it at all possible to just compile to just the function wrapper into my tweak manually? Sorry for the last question. I’m very interested in this project and it’s unfortunate it’s now private. I’m assuming that’s exactly how the other developer of a tweak did it for arm64e. the developer of the tweak did have issues but seem to resolved them but still using Hakari. I disassembled the dylib and there’s function built into maybe the %ctor method when the tweak is initialized. |
Replied in that repo |
@Naville Thanks, been pulling my hair out trying to figure this out 😅 |
Why are you compiling a compiler pass with your Tweak? It's supposed to be used with your compiler |
Oops, I'm still trying to figure this all out. Apparently the incorrect way. I'll just have to wait and see what the other developer used or at least hints towards. |
Could not compile for arm64e.
Error Message
clang-8: error: invalid arch name '-arch arm64e'
The text was updated successfully, but these errors were encountered: