On a jailbroken iOS device, I have successfully decrypted an app, and disabled ASLR, thanks to the hundredth of tutorials available.

But then, none explain how relaunch the app once ASLR has been disabled. How to do that ?

I have tried copy and paste the app binary in the installation folder, but this fails to start.

If I understand correctly, disabling the ASLR is useful to be able to find procedure's adresses using, say, Hopper, and then put breakpoints at these adresses in the app while using it. Am I wrong ?

I wonder if my workflow is the correct one. At the end I would like to use Hopper as a static analyser and setting breakpoints using lldb dynamically. Is it the correct way ?

1 Answer 1


I found a solution thanks to this ressource on GitHub: https://github.com/peterfillmore/removePIE/issues/1

  • After disabling ASLR, I copied the binary from the iPhone to a laptop.
  • Then, as described in the previously linked ressource, I extracted the entitlements with ldid, and put it back in while signing them. This step requires an apple developper account.
  • Copied back to the iPhone.
  • Finally, updated the authorisations (chmod), also described in the linked page.

The ldidtool can be installed through brew: http://brewformulas.org/Ldid

Here is an exemple for the Facebook app, taken from the previous linked page:

myPC: ~ peterfillmore$ ldid -e ./Facebook > ent.xml
myPC: ~ peterfillmore$ codesign -f -s "iPhone Developer" --entitlements ent.xml ./Facebook
./Facebook: replacing existing signature
#resign app binary (need apple developper account)

iPad:/usrapps/73547808-1899-412F-9CBF-C636B7851EE9/Facebook.app root# rm ./Facebook
#remove existing binary to clear cache(i think)

myPC:~ peterfillmore$ scp ./Facebook [email protected]://usrapps/xxx/Facebook.app/Facebook
#copy back to device

iPad:/usrapps/xxx/Facebook.app root# chmod 0755 ./Facebook
#change back to executable

iPad:/usrapps/xxx/Facebook.app root# ./Facebook
#executes fine

I hope this will help others.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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