Thursday, November 22, 2012

How to use UniBeast with InstallESD.dmg

Update 3: See below for a (supposed) workaround for UniBeast MountainLion 1.7 (I have not tried out v1.7 yet. Let me know if it works for you, though).

Update 2: See below for a workaround for UniBeast MountainLion 1.6.1.

Update: As commented below by osxtosh, this trick only works with UniBeast 1.5.3 and below.

UniBeast only needs InstallESD.dmg from the Install OS X ***.app. So, if you already have that file, you do not need to download the installer from Apple AppStore anymore. All you need to do is to create a directory structure (so called package) to satisfy UniBeast.

% cd /Applications
% mkdir -p "Install OS X Mountain Lion.app/Contents/SharedSupport"
% cd "Install OS X Mountain Lion.app/Contents"
% cp path_to_InstallESD.dmg SharedSupport/
% mkdir -p "_MASReceipt"
% dd if=/dev/random count=$[RANDOM % 4000] bs=1 of=_MASReceipt/receipt
% echo 'com.apple.InstallAssistant.MountainLion' >> _MASReceipt/receipt
% dd if=/dev/random count=$[3000 + RANDOM % 4000] bs=1 >> _MASReceipt/receipt

Remember to change Mountain Lion to the appropriate version that you took InstallESD.dmg from. Repeat the last three commands if the size of generated receipt is smaller than 4800 bytes.