Tuesday, May 26, 2009

Just for fun: Some undocumented flags of ldid

ldid was used most commonly to pseudosign an app, so that it would run in a jailbroken device. It is also used to attach an entitlement file to an executable. But besides the well-known -S (pseudosign/add entitlement) and less-well-known -e (dump entitlement) flag, there are a couple of flags went undocumented.

-p <Files>Print the paths of the input files.
-u <Files>Print the UUID of the input files.
-t <Files>Print the timestamp of a dylib.
-T<NewTimestamp> <Files>Assign the timestamp of a dylib. Pass "-" to <NewTimestamp> to assign the timestamp to a hash.
-sCalculate the sha1 without changing anything. Incompatible with the -S flag.


  1. I actually developed ldid for these other purposes. "ldid" is the Link (Load) Identity editor: I use it in Telesphoreo to query and change identifiers of binaries, such as UUIDs and timestamps. It actually has a number of other flags for doing things like getting words via address.