Apple Disk Image

From Wikipedia, the free encyclopedia

  (Redirected from .dmg)
Jump to: navigation, search
DMG
Filename extension .dmg
Internet media type application/x-apple-diskimage
Uniform Type Identifier com.apple.disk-image
Developed by Apple Inc

A file with the extension .dmg (an abbreviation for disk image) uses a disk image format commonly found on Mac OS X. The format allows secure password protection as well as file compression and hence serves both security and file distribution functions. Its most common function is the distribution of software over the Internet. When opened, DMG files are "mounted" as a drive within the Finder.

DMG files can be easily created (with or without encryption) using utilities that are included in OS X: Disk Utility in Mac OS X v.10.5, Mac OS X v10.4 and 10.3 or Disk Copy in earlier versions. These utilities also use DMG files as images for burning CDs and DVDs. DMG files may also be managed via the command line using the hdiutil utility.

DMG files are published with a MIME type of application/x-apple-diskimage. As many web server administrators tend to be less knowledgeable about Apple-specific file types, this MIME type is often not set, resulting in the user experience of attempting to download DMG files as text directly to the browser window, forcing the use of a control-click or similar workaround to download the file. For this reason, DMG files may be distributed as bzip2 (.dmg.bz2) or ZIP (.dmg.zip) files. These wrappers typically don't compress the file further, but rather help ensure that the files are handled correctly by the server and browser software.

Contents

[edit] Data format

Files with the extension .dmg are essentially raw disk images (i.e. contain block data), optionally with one or two layers applied that provide compression and encryption. In hdiutil these layers are called CUDIFEncoding (Universal Disk Image Format), and CEncryptedEncoding[1].

The UDIF format supports ADC (an old proprietary compression format by Apple), zlib and bzip2 compression internally. Apple have not released any documentation on the format, but attempts to reverse engineer parts of the format have been successful. Free software implementations include dmg2img and DMGExtractor.

The encrypted layer was reverse engineered in an implementation called VileFault, and dmg2img and DMGExtractor have since implemented support for encrypted images.

[edit] Support

[edit] Macintosh

In Mac OS X 10.2.3, Apple introduced Internet-Enabled Disk Images for use with the Apple utility Disk Copy, which was integrated into Disk Utility in 10.3. The Disk Copy application had the ability to display a multi-lingual software license agreement before mounting a disk image. The image will not be mounted unless the user indicates agreement with the license.[1]

Currently, the only way to open a DMG in Mac OS 9 is to use the developer version of Disk Copy (version 6.4), or a beta version of the unreleased 6.5. However either version can only open uncompressed DMG images. If a DMG is compressed it is impossible to open that image on Mac OS 9 regardless of what version of Disk Copy is used.

[edit] Non-Macintosh

Utilities exist to convert DMG files into ISO images.[2] However, DMG files often contain other types of disk images such as HFS+ volumes.

To open this kind of file in Windows, several programs such as Acute Systems TransMac, HFSExplorer, UltraISO or IsoBuster can be used. There is also an option of a simple free command line utility called dmg2img which can be used to convert the dmg file to an iso if none of the above tools are able to open it. In Linux, the file can be burned to cd/dvd using the program cdrecord or directly mounted to a mountpoint (e.g. mount -o loop,ro -t hfsplus imagefile.dmg /mnt/mountpoint).

[edit] See also

[edit] Footnotes

[edit] References

Personal tools