Patches OSX Application Bundles
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Ruby OsX Application Bundle Patcher

What for?

This tiny ruby script patches specific files in application bundles, it reads all nessecary informations from a xml file. I was tired of patching manually...


  1. Create xml file with all information. The structure is simple:
	<patch app="YourAppName" version="VersionNumber">
		<file path="PathToFile">
			<md5>md5 value of original file</md5>
				<original>code to patch</original>

<patches> can contain multiple <patch>-tags, as well as <patch> can contain more than one <file>-tags, <file> can contain multiple <md5>-tags and last but not least multiple <code>-tags. The original code should contain enough code to identify the correct location. Then the patched code replaces the original byte by byte from the beginning (please take a look at the example).

  1. Call patcher.rb with 2 parameters: $PathToApplication $PathToPatchFile

  2. You are done. A backup of the patched file was automatically created, in case something went wrong. The patcher appended the suffix .orig .


There is an example application "" and a corresponding xml-file. Feel free to test it with ./patcher.rb ./ ./patches.xml .


Torsten wrote the very first patch script, which inspired me to pimp it a bit. The sample application is taken from Andrew Nesbitt's blog: , which was modified by me, to demonstrate how the patcher works.


At the moment, this script only works with ruby version 1.8.7. I tested only what I needed for my stuff, so be careful.