Search code examples
javaiosmacosmach-o

Getting UUID from Mach-o binary under Java?


Are there any existing tools or libraries to grab the UUID(s) from the Mach-o binary load command header?


Solution

  • After attempting to us objdump from my Groovy process.

    "objdump -P load ${filename}".execute()
    

    I couldn't get this to work under our Ubuntu servers, even after I compiled binutils with arm support.

    I ended up hacking together a really quick and dirty library to read Mach-o binaries. I'm going to avoid posting it here because it was done so quickly, but a coworker of mine took some time and wrote up what looks like a much more robust solution, https://github.com/dzog/machismo