Edit Any DMG Image
It is quite easy to edit a DMG image.
To modify a DMG first mount the image in "read/write" mode (with shadow option), then when finished editing the DMG convert/copy the changes made inside the shadow copy into another DMG. Super easy!
Open the DMG R/W With Shadow
- Open Terminal.app and mount the image with the shadow option
hdiutil attach -owners on Original.dmg -shadow
- Edit the DMG contents, when finished editing unmount the image
hdiutil detach /dev/disk#
Where # is the image's disk number (use: diskutil list to list them all)
- Now convert the shadow to a new DMG
hdiutil convert -format UDZO -o The_Edited.dmg Original.dmg -shadow
Output Formats
These are the image output formats you can choose from:
| UDRW | UDIF read/write image |
| UDRO | UDIF read-only image |
| UDCO | UDIF ADC-compressed image |
| UDZO | UDIF zlib-compressed image |
| ULFO | UDIF lzfse-compressed image (OS X 10.11+ only) |
| UDBZ | UDIF bzip2-compressed image (Mac OS X 10.4+ only) |
| UDTO | DVD/CD-R master for export |
| UDSP | SPARSE (grows with content) |
| UDSB | SPARSEBUNDLE (grows with content; bundle-backed) |
| UFBI | UDIF entire image with MD5 checksum |
| UDRO | UDIF read-only (obsolete format) |
| UDCO | UDIF compressed (obsolete format) |
| RDWR | NDIF read/write image (deprecated) |
| RDXX | NDIF read-only image (Disk Copy 6.3.3 format; |
| ROCO | NDIF compressed image (deprecated) |
| RKEN | NDIF compressed (obsolete format) |
| DC42 | Disk Copy 4.2 image (obsolete format) |
{{ 'Comments (%count%)' | trans {count:count} }}
{{ 'Comments are closed.' | trans }}