2

I want to remove a LOAD_COMMAND from my iOS app binary.

I tried jtool:

jtool -rC 3 my_app_binary

This worked when I was removing a dynamic library. But it generated an empty binary file and the original binary was not altered when I wanted to remove:

LC 03: LC_SEGMENT_64          Mem: 0x100007000-0x100007000  __RESTRICT

I found the same with optool. I could delete a dylib but not this RESTRICT load command.

Next stop is Hopper...

1

If you compile optool from source, there is a new unrestrict flag.

optool unrestrict -t Payload/MY_APP.app/MY_APP

This worked. Load command removed.

There is even a nice guide explaining how to compile from source, here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.