Describe file layout

This commit is contained in:
Frederik Carlier
2017-11-11 21:36:45 +01:00
parent 7297ab9b61
commit 6c19e9c552

View File

@@ -38,6 +38,10 @@ The paths variable contains, you might have guessed it, the list of files embedd
This source tree contains a sample macOS installer, `Sample.pkg`, which deploys a file `hello.txt` to `/Applications`. The BOM file embedded in this installer is available as `BOM`.
The BOM header defines following offsets:
* The variable list: `0x2322`
* The index: `0x33f1`
The index of this BOM file contains the following items:
| Index | Offset | Length | Type | Description |
@@ -62,3 +66,38 @@ The index of this BOM file contains the following items:
| `0x11` | `0x339C` | `0x0023` | BomPathInfo | `hello.txt` |
| `0x12` | `0x33BF` | `0x000E` | BomFile | `hello.txt` |
| `0x13` | `0x33CD` | `0x0008` | BomPathInfo2 | `hello.txt` |
With the following values for the variables:
* BomInfo just points to the header at the start of the file
* HLIndex: an empty list
* Size64: An empty list
* VIndex: an empty list
* Paths: contains three entries, `.`, `Applications` and `hello.txt`
Sorted by offset, you get this file layout:
| Start | End | Length | Type | Description
| -------- | -------- | -------- | --------- | ---------------- |
| `0x0000` | `0x????` | `0x0000` | BOM Header | |
| `0x0200` | `0x????` | `0x000D` | Variable | VIndex |
| `0x021C` | `0x????` | `0x0015` | Variable | HLIndex |
| `0x0236` | `0x????` | `0x1000` | BomPaths | Paths |
| `0x1236` | `0x????` | `0x0015` | Variable | Paths |
| `0x1260` | `0x????` | `0x0006` | BomFile | `.` |
| `0x1266` | `0x????` | `0x0008` | BomPathInfo | `.` |
| `0x124B` | `0x????` | `0x0015` | | VIndex |
| `0x1271` | `0x????` | `0x1000` | BomPaths | HLIndex |
| `0x2286` | `0x????` | `0x0011` | BomFile | `Applications` |
| `0x2297` | `0x????` | `0x0008` | BomPathInfo2 | `Applications` |
| `0x2271` | `0x????` | `0x0015` | Variable | Size64 |
| `0x22A2` | `0x????` | `0x0080` | BomPaths | VIndex |
| `0x2322` | `0x????` | `0x003C` | Variables | |
| `0x235E` | `0x????` | `0x1000` | BomPaths | Size64 |
| `0x335E` | `0x????` | `0x001F` | BomPathInfo2 | `.` |
| `0x337D` | `0x????` | `0x001F` | BomPathInfo2 | `Applications` |
| `0x339C` | `0x????` | `0x0023` | BomPathInfo | `hello.txt` |
| `0x33BF` | `0x????` | `0x000E` | BomFile | `hello.txt` |
| `0x33CD` | `0x????` | `0x0008` | BomPathInfo2 | `hello.txt` |
| `0x33D5` | `0x????` | `0x001C` | Variable | BomInfo |
| `0x33F1` | `0x????` | `0x5590` | Index | |