When fed with a universal binary like this:
% file Shadowrocket
Shadowrocket: Mach-O universal binary with 2 architectures: [arm_v7:
- Mach-O executable arm_v7] [arm64]
Shadowrocket (for architecture armv7): Mach-O executable arm_v7
Shadowrocket (for architecture arm64): Mach-O 64-bit executable arm64
The release version will get a segmentation fault:
zsh: segmentation fault ./appdecrypt "/.../Shadowrocket.app"
The debug version trips over an assertion:
appdecrypt/dump.swift:112: Assertion failed
zsh: trace trap .build/debug/appdecrypt "/.../Shadowrocket.app"
where the code at line 112 is:
assert(header.pointee.magic == MH_MAGIC_64)
This is likely to be the reason of #18, too.
I don't know the exact mechanism of encryption with a universal binary. I guess there should be some implementation to automatically extract the matching architecture only, or just throws an error message warning user about the existence of universal binaries.
When fed with a universal binary like this:
The release version will get a segmentation fault:
The debug version trips over an assertion:
where the code at line 112 is:
This is likely to be the reason of #18, too.
I don't know the exact mechanism of encryption with a universal binary. I guess there should be some implementation to automatically extract the matching architecture only, or just throws an error message warning user about the existence of universal binaries.