The Full Wiki

Apple Disk Image: Wikis

Advertisements
  

Note: Many of our articles have direct quotes from sources you can cite, within the Wikipedia article! This article doesn't yet, but we're working on it! See more info or our list of citable articles.

Encyclopedia

From Wikipedia, the free encyclopedia

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 uses a proprietary 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 v10.3 and newer versions, or Disk Copy in Mac OS X v10.2 and 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.

Legacy Apple disk image files intended for Mac OS 9 and below generally have .smi or .img file extensions.[1]

Contents

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[2].

The UDIF format supports ADC (an old proprietary compression format by Apple), zlib and bzip2 compression internally. Apple has 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 (A parody of FileVault), and dmg2img and DMGExtractor have since implemented support for encrypted images. DMG files can be converted into ISO files using software like PowerISO. [3][4]

Support

Advertisements

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.

Non-Macintosh

There are few options available to extract files or mount the dmg proprietary format. The supported features are limited because of the proprietary nature of the format.

There are two well known cross platform and GPL licensed format conversion utilities called dmg2img and DMGEXtractor.

dmg2img command line utility was originally written in Perl script; however, the Perl version is no longer maintained, and the project moved to C code which can be compiled on many platforms (Windows, Unix/Linux, Mac OS X, ...). Presently, without additional tools, the resulting images can be mounted only under Mac OS X and under Linux (provided hfsplus support has been enabled from kernel modules, in the latter case). UDCO compressed images are supported since version 1.5.

DMGExtractor is written in Java with GUI, and it supports more advanced features of dmg including AES-128 encrypted images but not UDCO images.

In Windows, most dmg images can be opened using several other programs such as Acute Systems TransMac, HFSExplorer, 7-Zip, UltraISO or IsoBuster. MacDrive can also mount simple dmg files as drives under windows, but not sparse disk or encrypted dmgs.

In Linux and possibly other UNIX flavors, most dmg files 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).

See also

Footnotes

References


Advertisements






Got something to say? Make a comment.
Your name
Your email address
Message