<s>
Apple	B-Operating_System
Disk	I-Operating_System
Image	I-Operating_System
is	O
a	O
disk	B-Application
image	I-Application
format	O
commonly	O
used	O
by	O
the	O
macOS	B-Operating_System
operating	O
system	O
.	O
</s>
<s>
When	O
opened	O
,	O
an	O
Apple	B-Operating_System
Disk	I-Operating_System
Image	I-Operating_System
is	O
mounted	O
as	O
a	O
volume	O
within	O
the	O
Finder	B-Application
.	O
</s>
<s>
An	O
Apple	B-Operating_System
Disk	I-Operating_System
Image	I-Operating_System
can	O
be	O
structured	O
according	O
to	O
one	O
of	O
several	O
proprietary	O
disk	B-Application
image	I-Application
formats	O
,	O
including	O
the	O
Universal	O
Disk	B-Application
Image	I-Application
Format	O
(	O
UDIF	B-Operating_System
)	O
from	O
Mac	B-Operating_System
OS	I-Operating_System
X	I-Operating_System
and	O
the	O
New	B-Operating_System
Disk	I-Operating_System
Image	I-Operating_System
Format	I-Operating_System
(	O
NDIF	B-Operating_System
)	O
from	O
Mac	B-Operating_System
OS	I-Operating_System
9	I-Operating_System
.	O
</s>
<s>
An	O
Apple	B-Operating_System
disk	I-Operating_System
image	I-Operating_System
file	O
's	O
name	O
usually	O
has	O
"	O
.dmg	B-Operating_System
"	O
as	O
its	O
extension	O
.	O
</s>
<s>
A	O
disk	B-Application
image	I-Application
is	O
a	O
compressed	O
copy	O
of	O
the	O
contents	O
of	O
a	O
disk	O
or	O
folder	O
.	O
</s>
<s>
Disk	B-Application
images	I-Application
have	O
.dmg	B-Operating_System
at	O
the	O
end	O
of	O
their	O
names	O
.	O
</s>
<s>
To	O
see	O
the	O
contents	O
of	O
a	O
disk	B-Application
image	I-Application
,	O
you	O
must	O
first	O
open	O
the	O
disk	B-Application
image	I-Application
so	O
it	O
appears	O
on	O
the	O
desktop	O
or	O
in	O
a	O
Finder	B-Application
window	O
.	O
</s>
<s>
Apple	B-Operating_System
Disk	I-Operating_System
Image	I-Operating_System
files	O
are	O
published	O
with	O
a	O
MIME	B-Application
type	I-Application
of	O
application/x	O
-apple-diskimage	O
.	O
</s>
<s>
Different	O
file	B-Application
systems	I-Application
can	O
be	O
contained	O
inside	O
these	O
disk	B-Application
images	I-Application
,	O
and	O
there	O
is	O
also	O
support	O
for	O
creating	O
hybrid	O
optical	B-Device
media	I-Device
images	O
that	O
contain	O
multiple	O
file	B-Application
systems	I-Application
.	O
</s>
<s>
Some	O
of	O
the	O
file	B-Application
systems	I-Application
supported	O
include	O
Hierarchical	B-Application
File	I-Application
System	I-Application
(	O
HFS	B-Application
)	O
,	O
HFS	B-Application
Plus	I-Application
(	O
HFS+	B-Application
)	O
,	O
File	B-Application
Allocation	I-Application
Table	I-Application
(	O
FAT	O
)	O
,	O
ISO9660	B-Application
,	O
and	O
Universal	O
Disk	O
Format	O
(	O
UDF	O
)	O
.	O
</s>
<s>
Apple	B-Operating_System
Disk	I-Operating_System
Images	I-Operating_System
can	O
be	O
created	O
using	O
utilities	O
bundled	O
with	O
Mac	B-Operating_System
OS	I-Operating_System
X	I-Operating_System
,	O
specifically	O
Disk	B-Operating_System
Copy	I-Operating_System
in	O
Mac	B-Operating_System
OS	I-Operating_System
X	I-Operating_System
v10.2	I-Operating_System
and	O
earlier	O
and	O
Disk	B-Application
Utility	I-Application
in	O
Mac	B-Operating_System
OS	I-Operating_System
X	I-Operating_System
v10.3	I-Operating_System
and	O
later	O
.	O
</s>
<s>
These	O
utilities	O
can	O
also	O
use	O
Apple	B-Operating_System
disk	I-Operating_System
image	I-Operating_System
files	O
as	O
images	O
for	O
burning	O
CDs	O
and	O
DVDs	O
.	O
</s>
<s>
Disk	B-Application
image	I-Application
files	O
may	O
also	O
be	O
managed	O
via	O
the	O
command	B-Application
line	I-Application
interface	I-Application
using	O
the	O
utility	O
.	O
</s>
<s>
In	O
Mac	O
OS	O
X	O
v10.2.3	O
,	O
Apple	O
introduced	O
Compressed	O
Disk	B-Application
Images	I-Application
and	O
Internet-Enabled	O
Disk	B-Application
Images	I-Application
for	O
use	O
with	O
the	O
Apple	O
utility	O
Disk	B-Operating_System
Copy	I-Operating_System
,	O
which	O
was	O
later	O
integrated	O
into	O
Disk	B-Application
Utility	I-Application
in	O
10.3	B-Operating_System
.	O
</s>
<s>
The	O
Disk	B-Operating_System
Copy	I-Operating_System
application	O
had	O
the	O
ability	O
to	O
display	O
a	O
multilingual	O
software	O
license	O
agreement	O
before	O
mounting	B-Application
a	O
disk	B-Application
image	I-Application
.	O
</s>
<s>
An	O
Apple	B-Operating_System
Disk	I-Operating_System
Image	I-Operating_System
allows	O
secure	O
password	O
protection	O
as	O
well	O
as	O
file	B-General_Concept
compression	I-General_Concept
,	O
and	O
hence	O
serves	O
both	O
security	O
and	O
file	O
distribution	O
functions	O
;	O
such	O
a	O
disk	B-Application
image	I-Application
is	O
most	O
commonly	O
used	O
to	O
distribute	O
software	O
over	O
the	O
Internet	O
.	O
</s>
<s>
Apple	O
originally	O
created	O
its	O
disk	B-Application
image	I-Application
formats	O
because	O
the	O
resource	B-Operating_System
fork	I-Operating_System
used	O
by	O
Mac	O
applications	O
could	O
not	O
easily	O
be	O
transferred	O
over	O
mixed	O
networks	O
such	O
as	O
those	O
that	O
make	O
up	O
the	O
Internet	O
.	O
</s>
<s>
Even	O
as	O
the	O
use	O
of	O
resource	B-Operating_System
forks	I-Operating_System
declined	O
with	O
Mac	B-Operating_System
OS	I-Operating_System
X	I-Operating_System
,	O
disk	B-Application
images	I-Application
remained	O
the	O
standard	O
software	O
distribution	O
format	O
.	O
</s>
<s>
Disk	B-Application
images	I-Application
allow	O
the	O
distributor	O
to	O
control	O
the	O
Finder	B-Application
's	O
presentation	O
of	O
the	O
window	O
,	O
which	O
is	O
commonly	O
used	O
to	O
instruct	O
the	O
user	O
to	O
copy	O
the	O
application	O
to	O
the	O
correct	O
folder	O
.	O
</s>
<s>
A	O
previous	O
version	O
of	O
the	O
format	O
,	O
intended	O
only	O
for	O
floppy	B-Device
disk	I-Device
images	O
,	O
is	O
usually	O
referred	O
to	O
as	O
"	O
Disk	B-Operating_System
Copy	I-Operating_System
4.2	O
"	O
format	O
,	O
after	O
the	O
version	O
of	O
the	O
Disk	B-Operating_System
Copy	I-Operating_System
utility	O
that	O
was	O
used	O
to	O
handle	O
these	O
images	O
.	O
</s>
<s>
A	O
similar	O
format	O
that	O
supported	O
compression	O
of	O
floppy	B-Device
disk	I-Device
images	O
is	O
called	O
DART	O
.	O
</s>
<s>
New	B-Operating_System
Disk	I-Operating_System
Image	I-Operating_System
Format	I-Operating_System
(	O
NDIF	B-Operating_System
)	O
was	O
the	O
previous	O
default	O
disk	B-Application
image	I-Application
format	O
in	O
Mac	B-Operating_System
OS	I-Operating_System
9	I-Operating_System
,	O
and	O
disk	B-Application
images	I-Application
with	O
this	O
format	O
generally	O
have	O
a	O
.img	B-General_Concept
(	O
not	O
to	O
be	O
confused	O
with	O
raw	O
.img	B-General_Concept
disk	B-Application
image	I-Application
files	O
)	O
or	O
.smi	O
file	O
extension	O
.	O
</s>
<s>
Files	O
with	O
the	O
.smi	O
extension	O
are	O
actually	O
applications	O
that	O
mount	B-Application
an	O
embedded	O
disk	B-Application
image	I-Application
,	O
thus	O
a	O
"	O
Self	O
Mounting	B-Application
Image	O
"	O
,	O
intended	O
only	O
for	O
Mac	B-Operating_System
OS	I-Operating_System
9	I-Operating_System
and	O
earlier	O
.	O
</s>
<s>
Universal	O
Disk	B-Application
Image	I-Application
Format	O
(	O
UDIF	B-Operating_System
)	O
is	O
the	O
native	B-Application
format	I-Application
disk	B-Application
image	I-Application
format	O
for	O
Mac	B-Operating_System
OS	I-Operating_System
X	I-Operating_System
.	O
</s>
<s>
Disk	B-Application
images	I-Application
in	O
this	O
format	O
typically	O
have	O
a	O
.dmg	B-Operating_System
extension	O
.	O
</s>
<s>
Apple	B-Operating_System
disk	I-Operating_System
image	I-Operating_System
files	O
are	O
essentially	O
raw	O
disk	B-Application
images	I-Application
(	O
i.e.	O
</s>
<s>
UDIF	B-Operating_System
supports	O
ADC	O
(	O
an	O
old	O
proprietary	O
compression	O
format	O
by	O
Apple	O
)	O
,	O
zlib	B-Language
,	O
bzip2	B-Application
(	O
as	O
of	O
Mac	B-Application
OS	I-Application
X	I-Application
v10.4	I-Application
)	O
,	O
LZFSE	B-Application
(	O
as	O
of	O
Mac	B-Operating_System
OS	I-Operating_System
X	I-Operating_System
v10.11	I-Operating_System
)	O
,	O
and	O
lzma	B-General_Concept
(	O
as	O
of	O
macOS	B-Operating_System
v10.15	O
)	O
compression	O
internally	O
.	O
</s>
<s>
The	O
UDIF	B-Operating_System
metadata	O
is	O
found	O
at	O
the	O
end	O
of	O
the	O
disk	B-Application
image	I-Application
following	O
the	O
data	O
.	O
</s>
<s>
This	O
trailer	O
can	O
be	O
described	O
using	O
the	O
following	O
C	B-Language
structure	O
.	O
</s>
<s>
The	O
XML	O
plist	O
contains	O
a	O
(	O
blocks	O
)	O
key	O
,	O
with	O
information	O
about	O
how	O
the	O
preceding	O
data	B-Operating_System
fork	I-Operating_System
is	O
allocated	O
.	O
</s>
<s>
The	O
data	O
and	O
resource	B-Operating_System
fork	I-Operating_System
information	O
is	O
probably	O
inherited	O
from	O
NDIF	B-Operating_System
.	O
</s>
<s>
Version	O
1	O
has	O
a	O
trailer	O
at	O
the	O
end	O
of	O
the	O
file	O
,	O
while	O
version	O
2	O
(	O
default	O
since	O
OS	B-Operating_System
X	I-Operating_System
10.5	O
)	O
puts	O
it	O
at	O
the	O
beginning	O
.	O
</s>
<s>
Whether	O
the	O
encryption	O
is	O
a	O
layer	O
outside	O
of	O
or	O
inside	O
of	O
the	O
metadata	O
(	O
UDIF	B-Operating_System
)	O
is	O
unclear	O
from	O
reverse	O
engineered	O
documentation	O
,	O
but	O
judging	O
from	O
the	O
demonstration	O
it	O
's	O
probably	O
outside	O
.	O
</s>
<s>
There	O
are	O
few	O
options	O
available	O
to	O
extract	O
files	O
or	O
mount	B-Application
the	O
proprietary	O
Apple	B-Operating_System
Disk	I-Operating_System
Image	I-Operating_System
format	O
.	O
</s>
<s>
dmg2img	O
was	O
originally	O
written	O
in	O
Perl	B-Language
;	O
however	O
,	O
the	O
Perl	B-Language
version	O
is	O
no	O
longer	O
maintained	O
,	O
and	O
the	O
project	O
was	O
rewritten	O
in	O
C	B-Language
.	O
It	O
extracts	O
the	O
raw	O
disk	B-Application
image	I-Application
from	O
a	O
DMG	B-Operating_System
,	O
without	O
handling	O
the	O
file	B-Application
system	I-Application
inside	O
.	O
</s>
<s>
UDIF	B-Operating_System
ADC-compressed	O
images	O
(	O
UDCO	O
)	O
have	O
been	O
supported	O
since	O
version	O
1.5	O
.	O
</s>
<s>
DMGEXtractor	O
is	O
written	O
in	O
Java	B-Language
with	O
a	O
graphical	B-Application
user	I-Application
interface	I-Application
(	O
GUI	B-Application
)	O
,	O
and	O
it	O
supports	O
more	O
advanced	O
features	O
of	O
dmg	B-Operating_System
including	O
AES-128	O
encrypted	O
images	O
but	O
not	O
UDCO	O
images	O
.	O
</s>
<s>
The	B-Application
Sleuth	I-Application
Kit	I-Application
.	O
</s>
<s>
Only	O
handles	O
uncompressed	B-General_Concept
DMG	B-Operating_System
format	O
,	O
HFS+	B-Application
,	O
and	O
APFS	O
.	O
</s>
<s>
Most	O
dmg	B-Operating_System
files	O
are	O
unencrypted	O
.	O
</s>
<s>
Because	O
the	O
dmg	B-Operating_System
metadata	O
is	O
found	O
in	O
the	O
end	O
,	O
a	O
program	O
not	O
understanding	O
dmg	B-Operating_System
files	O
can	O
nevertheless	O
read	O
it	O
as	O
if	O
it	O
was	O
a	O
normal	O
disk	B-Application
image	I-Application
,	O
as	O
long	O
as	O
there	O
is	O
support	O
for	O
the	O
file	B-Application
system	I-Application
inside	O
.	O
</s>
<s>
Cross-platform	O
:	O
7-zip	B-Language
(	O
HFS/HFS	O
+	O
)	O
,	O
PeaZip	B-Application
(	O
HFS/HFS	O
+	O
)	O
.	O
</s>
<s>
Windows	O
:	O
UltraISO	B-Application
,	O
IsoBuster	B-Application
,	O
MacDrive	O
(	O
HFS/HFS	O
+	O
)	O
.	O
</s>
<s>
Unix-like	O
:	O
cdrecord	B-Language
and	O
(	O
e.g.	O
</s>
<s>
Tools	O
with	O
specific	O
dmg	B-Operating_System
support	O
include	O
:	O
</s>
<s>
Transmac	O
can	O
handle	O
both	O
UDIF	B-Operating_System
.dmg	B-Operating_System
files	O
and	O
sparsebundles	O
,	O
as	O
well	O
as	O
HFS/HFS	O
+	O
and	O
APFS	O
.	O
</s>
<s>
It	O
can	O
be	O
used	O
to	O
create	O
bootable	O
macOS	B-Operating_System
installers	O
under	O
Windows	O
.	O
</s>
<s>
A	O
free	O
Apple	O
DMG	B-Operating_System
Disk	B-Application
Image	I-Application
Viewer	O
also	O
exists	O
,	O
but	O
it	O
is	O
unknown	O
how	O
much	O
what	O
it	O
actually	O
supports	O
.	O
</s>
<s>
darling-dmg	O
is	O
a	O
FUSE	B-Application
module	I-Application
enabling	O
easy	O
DMG	B-Operating_System
file	O
mounting	B-Application
on	O
Linux	O
.	O
</s>
<s>
It	O
supports	O
UDIF	B-Operating_System
and	O
HFS/HFS	O
+	O
.	O
</s>
