Format:BOM (Bill of Materials store)
| Platforms | Platform:macOS, Platform:iOS |
|---|---|
| Magic | 42 4F 4D 53 74 6F 72 65 ("BOMStore") |
| Extensions | .bom, .car (Assets.car) |
| Endianness | big-endian (the payload blocks of a .car are little-endian) |
| On this wiki | Facts · Code · Notes · Topics |
Apple's block-store container (magic "BOMStore", big-endian) used for installer .bom files and as the outer layer of compiled asset catalogs (Assets.car): a block table, named variables pointing at blocks, and B-tree-like "tree" blocks.
Layout
All BOM structures are big-endian. The 32-byte header is: magic "BOMStore" (8 bytes), version (u32, always 1), numberOfBlocks (non-null entries of the block table), indexOffset and indexLength (the block table; indexOffset + indexLength is the file end in files written by mkbom), varsOffset and varsLength.
Block table (at indexOffset): u32 count of pointer slots, then that many (address u32, length u32) pairs; slot 0 is always null, and a block is referred to by its slot index. A free list follows the table.
Vars (at varsOffset): u32 count, then entries of (block index u32, name length u8, name bytes, no terminator). The vars are the named roots of the file: an installer BOM has BomInfo, Paths, HLIndex, Size64 and VIndex; a compiled asset catalog has CARHEADER, KEYFORMAT, RENDITIONS, FACETKEYS and others (see Format:Assets.car (compiled asset catalog)). Unverified: the exact set of installer var names beyond what mkbom writes.
Trees
A tree var points to a block starting with the ASCII bytes "tree": version (u32, 1), child (block index of the root node), blockSize (4096 in bomutils), pathCount, and one unknown byte. A node block is: isLeaf (u16), count (u16), forward (u32 block index of next sibling node), backward (u32), then count pairs of two u32 block indexes. In a leaf of a generic tree (as used by asset catalogs) each pair is (value block, key block); in the installer Paths tree the pair is (PathInfo1 block, File block). To walk a tree, follow child pointers down to the first leaf, then follow forward.
Installer path records
In bomutils, a path leaf pair points to a PathInfo1 (id u32, index u32 of a PathInfo2) and a File record (parent id u32, NUL-terminated name). PathInfo2: type u8 (1 file, 2 directory, 3 link, 4 device), 1, architecture u16, mode u16, uid u32, gid u32, modtime u32, size u32, 1, checksum or device type u32, link name length u32 and the link name.
Identification
First 8 bytes "BOMStore". In an app bundle, Assets.car is a BOM. In a .pkg, Bom files sit in the xar archive (Unverified: reading the xar table of contents of .pkg files is not covered here).
Tools and sources
bomutils (GPL-2.0) documents the layout in src/bom.h; ipsw's pkg/bom (MIT, Go) reads BOMs generically (vars, blocks, trees) for asset catalogs. Both were read for this page.
See also Format:Assets.car (compiled asset catalog), Format:IPA, Platform:MacOS.
Code & repositories
- https://github.com/blacktop/ipsw @
a9eae76e8b1e901e4a03dd530defac8a1b33f91a· license: MIT
ipsw pkg/car (pure Go CAR reader/exporter with README on compression kinds and rendition keys) and pkg/bom (generic BOM reader).
Tested on: source read, not run: not run; source and README read · checked 2026-10-18; last activity 2026-10-16; Note: the latest release ships binaries; the wiki links only the source, never the binaries - https://github.com/hogliux/bomutils @
c247002e2f49878bab32dd0fcf805810ae0992cb· license: GPL-2.0
mkbom/lsbom clones for Linux; src/bom.h documents the BOMStore header, block table, vars, trees and installer path records.
Tested on: source read, not run: not built; src/bom.h read · checked 2026-10-18; last activity 2024-10-28