Skip to content

Mac Installer format: XAR or DMG? #545

Description

@ankd1601

I am working on tool that extracts and views contents of various archives. One such archive is DMG. Tool is correctly extracting DMG archives. But one specific type of DMG file which is macOS Big Sur installer,SharedSupport.dmg or any other similar installer like Ventura and so on, is not getting extracted, as it has XAR header as well. So structure seems different from the other ones. When inspecting the byte stream,I see both a XAR and a DMG structure.

To be more specific, it has:

  1. the XAR signature "78 61 72 21" at the beginning of the file,
  2. and the DMG signature "6B 6F 6C 79" at the end of the file, i.e., there is a 512 byte-trailer that contains the magic signature "koly".

Any DMG package other than a macOS installer does not have such signature at the beginning of the file.

Does that mean a macOS installer isn't actually a DMG file but a XAR file? Why does it have XAR header?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions