- Joined
- Mar 23, 2011
- Messages
- 19
- Motherboard
- Gigabyte GA-X99-UD5 WiFI v1
- CPU
- i7 5930K
- Graphics
- GTX 1080
Extracting an OS X Combo Update Manually
Sometimes it's necessary to replace various files with Apple's originals to keep our machines going, especially before/after updates. Doing this manually may seem to be a lot of trouble vs using a tool, but hopefully this will help de-mystify how Apple packages a Combo Update and show how to create an archive of an "original" Apple kext if you didn't happen to back it up before modifying it.
For those who are comfortable using terminal and UNIX in general here's how to manually extract files from a OS X Combo update:
Download the combo update from Apple
Mount the DMG
Open a terminal window
Create a directory to hold the extracted combo updates
/Users/darthrum# mkdir Combos
Copy the combo pkg file
/Users/darthrum# cd Combos
/Users/darthrum# cp /Volumes/OS \X\ 10.10.4\ Update\ Combo\OSXCombo10.10.4.pkg .
Create a directory to extract this specific pkg into
/Users/darthrum# mkdir 10.10.4
Extract the main pkg
/Users/darthrum# cd 10.10.4
/Users/darthrum# xar -xvf ../OSXCombo10.10.4.pkg
In the extracted pkg directory are two compressed cpio files. For reasons I cannot fathom one is compressed using gzip (Scripts) and the other with bzip2 (Payload). Of the two files Payload is the more important as it contains the well "Payload".
/Users/darthrum# cd OSXCombo10.10.4.pkg
Now extract the Scripts objects
/Users/darthrum# cat Scripts | gunzip | cpio -idv
Uncompress the Payload objects file using bunzip2. it'll complain but succeed producing a file called Payload.out
/Users/darthrum# bunzip2 Payload
Now extract the Payload.out file
/Users/darthrum# cpio -idv < Payload.out
With the update now fully extracted, individual files or directories can be copied, here's the directory listing after the extract is done.
/Users/darthrum# ls -l
Applications
Bom
Library
PackageInfo
Payload.out
Scripts
System
Tools
bin
postinstall
postinstall_actions
preinstall
preinstall_actions
private
sbin
usr
We can select individual files or directories for use, such as extensions. Let's create a pax archive of the AppleHDA (audio) Kext so we can restore it later if needed.
/Users/darthrum# cd System/Library/Extensions
Check that we're in the right directory
/Users/darthrum# pwd
/Users/darthrum/Combos/10.10.4/OSXUpdCombo10.10.4.pkg/System/Library/Extensions
Create the pax archive
/Users/darthrum# pax -wvf /Users/darthrum/AppleHDA.kext.pax AppleHDA.kext
Or if you want to just overwrite the current kext (at your own risk).
/Users/darthrum# sudo cp -pR AppleHDA.kext /Systems/Library/Extensions
[size=-2]darthrum[/size]
Sometimes it's necessary to replace various files with Apple's originals to keep our machines going, especially before/after updates. Doing this manually may seem to be a lot of trouble vs using a tool, but hopefully this will help de-mystify how Apple packages a Combo Update and show how to create an archive of an "original" Apple kext if you didn't happen to back it up before modifying it.
For those who are comfortable using terminal and UNIX in general here's how to manually extract files from a OS X Combo update:
Download the combo update from Apple
Mount the DMG
Open a terminal window
Create a directory to hold the extracted combo updates
/Users/darthrum# mkdir Combos
Copy the combo pkg file
/Users/darthrum# cd Combos
/Users/darthrum# cp /Volumes/OS \X\ 10.10.4\ Update\ Combo\OSXCombo10.10.4.pkg .
Create a directory to extract this specific pkg into
/Users/darthrum# mkdir 10.10.4
Extract the main pkg
/Users/darthrum# cd 10.10.4
/Users/darthrum# xar -xvf ../OSXCombo10.10.4.pkg
In the extracted pkg directory are two compressed cpio files. For reasons I cannot fathom one is compressed using gzip (Scripts) and the other with bzip2 (Payload). Of the two files Payload is the more important as it contains the well "Payload".
/Users/darthrum# cd OSXCombo10.10.4.pkg
Now extract the Scripts objects
/Users/darthrum# cat Scripts | gunzip | cpio -idv
Uncompress the Payload objects file using bunzip2. it'll complain but succeed producing a file called Payload.out
/Users/darthrum# bunzip2 Payload
Now extract the Payload.out file
/Users/darthrum# cpio -idv < Payload.out
With the update now fully extracted, individual files or directories can be copied, here's the directory listing after the extract is done.
/Users/darthrum# ls -l
Applications
Bom
Library
PackageInfo
Payload.out
Scripts
System
Tools
bin
postinstall
postinstall_actions
preinstall
preinstall_actions
private
sbin
usr
We can select individual files or directories for use, such as extensions. Let's create a pax archive of the AppleHDA (audio) Kext so we can restore it later if needed.
/Users/darthrum# cd System/Library/Extensions
Check that we're in the right directory
/Users/darthrum# pwd
/Users/darthrum/Combos/10.10.4/OSXUpdCombo10.10.4.pkg/System/Library/Extensions
Create the pax archive
/Users/darthrum# pax -wvf /Users/darthrum/AppleHDA.kext.pax AppleHDA.kext
Or if you want to just overwrite the current kext (at your own risk).
/Users/darthrum# sudo cp -pR AppleHDA.kext /Systems/Library/Extensions
[size=-2]darthrum[/size]