[Guide] Customize RecoveryHD w/ 3rd Party Apps

Discussion in 'OS X Mountain Lion (10.8)' started by mac-hacks, Jan 8, 2013.

  1. mac-hacks, Jan 8, 2013
    Last edited: Jan 29, 2013

    macrumors regular

    OS X Mountain Lion.app
    Lion Recovery Update v1.0

    * To Avoid Permission Issues. Create Root Account and Login as Root when your ready to start guide.
    * Google it if you do not know how create root account
    * Your apps need to be set with following permissions: drwxr-xr-x root admin )
    * This guide will only show you how to customize BaseSystem.dmg. How you use it will be up to you.
    * IMPORTANT"There only 123.5 MB available space on RecoveryHD."
    * You have 2 options if want to use RecoveryHD on your disk.
    A) Keep 3rd party apps under 123.5 MB. If this is path you choose, delete BaseSystem.dmg normally in /dev/disk0s3 aka "Recovery Partition" and replace it with the one from guide.
    B) Know how to add space to partition, I will not show you in this guide. I may get to it at later date.


    1) Copy and Paste Utilities.plist we need to Hack to desktop.

    * Commands below assume "OS X Mountain Lion.app" is in /Applications. Change path if you need to.

    $ hdiutil attach /Applications/Install\ OS\ X\ Mountain\ Lion.app/Contents/SharedSupport/InstallESD.dmg  
    $ cp /Volumes/Mac\ OS\ X\ Base\ System/System/Installation/CDIS/OS\ X\ Utilities.app/Contents/Resources/Utilities.plist ~/Desktop
    * Create Project folder and name it Recovery. Add another folder named inside of it. Name it RecoveryHD:

    $ mkdir /tmp/Recovery
    $ mkdir /tmp/Recovery/RecoveryHD && cd /tmp/Recovery/RecoveryHD
    2) Preparation:

    You will only have 100 MB by default. We add 1GB to .dmg, you can add more if you need it.

    Locate Applications and paths for source files.

    You will need to run mdfind for each app.

    Open terminal and run:

    		$ mdfind "application name" 
    		# You may need to run $ mdfind "Company-Name-for-Software"
    $ mdfind Disk Warrior
    # You should see lines like below with directories. You will need save output from terminal window to txt file. 
    Open TextEdit.app or Notes.app and copy paths and save this text file we will need it shortly..

    3) Time to Hack:

    Open text editor or Xcode we need add "BundlePath", "Application.app", "Path", "TitleKey", and "name" to Utilities.plist for each Application you want to add GUI Menu/ RecoveryHD.

    To find "Path" -> "String", use "control + click" -> "Show Packages" -> navigate to /Contents/MacOS/"name-of-app".

    Copy and paste to bottom Utilities.plist found on ~/Desktop.


    *** "SignatureCheck"* add "-skipSignatureCheck 1" Argument to <key- Path -> for all apps you plan to RecoveryHD Menu.
    * Very Important and do not skip this!!!

    				<string>-skipSignatureCheck 1</string>
    Example how should look like with Xcode.


    4) BaseSystem:

    * Create tmp folder for hack BaseSystem.dmg :

    $ mkdir /tmp/Recovery
    $ mkdir /tmp/Recovery/RecoveryHD
    $ hdiutil attach /Applications/Install\ OS\ X\ Mountain\ Lion.app/Contents/SharedSupport/InstallESD.dmg
    $ hdiutil convert /Volumes/Mac\ OS\ X\ Install\ ESD/BaseSystem.dmg -format UDRW -o /tmp/Recovery/BaseSystem.dmg
    # Skip next line if you plan to re-size RecoveryHD or use dmtest to repackage ReccoveryUpdate.
    $ cp -r /Volumes/Mac\ OS\ X\ Install\ ESD/mach_kernel /Volumes/Mac\ OS\ X\ Base\ System\
    $ hdiutil eject /Volumes/Mac OS X Install ESD
    $ hdiutil resize -size 2g /private/tmp/Recovery/BaseSystem.dmg
    $ hdiutil attach /private/tmp/Recovery/BaseSystem.dm
    * Add Utility Software and Source files to BaseSystem.dmg:
    $ cp ~/Desktop/Utilities.plist /Volumes/Mac\ OS\ X\ Base\ System/System/Installation/CDIS/OS\ X\ Utilities.app/Contents/Resources/Utilities.plist
    Add Applications and Source Files:

    * Replace Utilities.plist with Hack Version:

    * Copy source directories paths to match same paths on Mac OS X Base System.
    * Use Paths from mdfind data we copied to .txt file.

    $ cp -r /Applications/"Name-Of-Software"app /Volumes/Mac\ OS\ X\ Base\ System/Applications
    $ cp -r /Library/Application\ Support/"Name-Of-Software" /Volumes/Mac\ OS\ X\ Base\ System/Library/Application\ Support
    $ cp -r /Applications/SpeedTools\ Utilities\ Pro.app /Volumes/Mac\ OS\ X\ Base\ System/Applications
    $ cp /Library/Application\ Support/SpeedTools\ Utilities\ Support /Volumes/Mac\ OS\ X\ Base\ System/Library/Application\
    5) Final Steps:

    Eject, Convert, Rename and move BaseSystem.dmg

    $ hdiutil eject /Volumes/Mac\ OS\ X\ Base\ System
    $ hdiutil convert /private/tmp/Recovery/BaseSystem.dmg -format UDRO -o /private/tmp/Recovery/RecoveryHD/BaseSystem.dmg
    $ sudo rm -rf /private/tmp/Recovery/BaseSystem.dmg
    Then Save RecoveryHD.dmg to your backup folder.
    You can stop here and make bootable USB or Netboot image from BaseSystem.dmg.

    6) You can try either of these script1 and script 2for restoring RecoveryHD to Disk. Both have instructions on how process works.

    I tested baseSystem.dmg with FLASH Drive. I've never used dmtest so Im not sure what it will do. I figure 10.8.3 will be release in near future so Im going to wait. I need to do clean OS restore on my testing rig and If lose OS it want be big deal. I limited on time to do 2 restores if some thing goes wrong. My clone is corrupt.

    * You can delete "alias" /Volumes/Mac OS X Base System/System/Installation/Packages
    and replace it with /Volumes/Mac OS X Install ESD/Packages from installESD.dmg.

    * This will allow you to install OS X over existing OS with out deleting your files.

    * It does not create RecoveryHD!!!

  2. macrumors 6502a

    AWESOME!!! Thanks! Now, Apple should allow to install third-parties on the Recover partition. At least DiskWarrior.
  3. macrumors regular

    It still needs some work to make it easier to add apps to recoveryHD. I was hoping developer who knows more about packaging scripts & imaging with asr would pick up where I left off. I was trying to write bash script to do work. "ASR" man page is limited on details for making asr.dmg. Other Tricky part of script will be to copy 3rd party app manifest to Utility.plist. Probably best approach would be to take the top Utility apps and either make gui or have folder with manifest that the script scans and uses any manifest in that folder. My 1st few attempts writing script failed. Im limited on time and waiting on 10.8.3 to be released before I spend anymore time on it.

    I think if some one has time. To write script to make shadow sparseimage of basesystem.dmg to copy over hack Utility.plist & .app to /Applications/Utilities/ with there support files and sets right permissions. Use the guide on github, creating RecvoveryHD with luggage & dmtest. I think will work. I don't have time to spend on it at moment.
  4. macrumors newbie

    We're having a heck of a time with this..not sure if something has changed or we are doing it wrong, but we've added the application and necessary plist file, but the app doesn't seem to launch. We can see it in the menu, but it doesn't launch. We tried two different apps with out any luck. Am wondering if it is is something to do with the "-skipSignatureCheck 1" argument? Below is one example of what we are using...is it correct?

    					<string>-skipSignatureCheck 1</string>
    			<string>/Applications/Disk Inventory X.app</string>
    			<string>/Applications/Disk Inventory X.app/Contents/MacOS/Disk Inventory X</string>
    			<string>Disk Inventory X</string>
    Thank you for any help on this.
  5. macrumors 6502



    Same thing happend to me any ideas
  6. Dalton63841, Jul 25, 2013
    Last edited: Jul 25, 2013

    macrumors 65816


    What is the purpose of LuggagePackages in this? Here is a tutorial I did a while back to turn the Recovery partition into a completely offline installer(much quicker restores), AND/OR adding applications to the Recovery partition. It isn't limited by the amount of partition space, because when the new files are written by dmtest it will adjust the size to fit automatically. The only necessary files are the dmtest executable and a BaseSystem.dmg and BaseSystem.chunklist either from an installer or from the Lion Recovery Update package.

  7. macrumors newbie

    Thanks Dalton, but I am looking to do this on a flash drive versus the local Recovery HD. I did try your process and just copy the BaseSystem.dmg over to a OS X Recovery Drive, but the issue appears to be permissions I think. For whatever reason, I can set the correct permissions on the [application].app correctly, but when I copy or move it to the dmg, it goes to admin:staff? If I try to chown it within the dmg it doesn't give me an error, but still retains the admin:staff ownership?

    Any ideas how to "force" it? I've su'd it and tried logged in as root with no luck?
  8. macrumors newbie

    Don't leave me hangin?!
  9. macrumors newbie

    Does it work on 10.9, 10.10


    Not sure anyone is actively on it. But I just am just trying on 10.10 but not able to. Wondering if anyone is able to make it work on 10.8? I don't mind to play around with it a little but it I had followed the instruction carefully but no avail.


Share This Page