From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "struct" |
|---|
| subject | "Format:Android LP metadata (super.img)" |
|---|
| claim | "LpMetadataHeader is a packed 256-byte little-endian struct: magic, versions, header_size, SHA-256 header checksum, tables_size, SHA-256 tables checksum, four table descriptors (partitions, extents, groups, block_devices), flags (header 1.2+) and 124 reserved bytes." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Format:Android LP metadata (super.img)" |
|---|
| observed_in | |
|---|
|
|---|
| data | | name | "LpMetadataHeader" |
|---|
| size | "0x100" |
|---|
| endianness | "little" |
|---|
| abi | "packed" |
|---|
| fields | | offset | "0x0" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "magic" |
|---|
|
| offset | "0x4" |
|---|
| size | 2 |
|---|
| type | "uint16_t" |
|---|
| name | "major_version" |
|---|
|
| offset | "0x6" |
|---|
| size | 2 |
|---|
| type | "uint16_t" |
|---|
| name | "minor_version" |
|---|
|
| offset | "0x8" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "header_size" |
|---|
|
| offset | "0xC" |
|---|
| size | 32 |
|---|
| type | "uint8_t[32]" |
|---|
| name | "header_checksum" |
|---|
|
| offset | "0x2C" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "tables_size" |
|---|
|
| offset | "0x30" |
|---|
| size | 32 |
|---|
| type | "uint8_t[32]" |
|---|
| name | "tables_checksum" |
|---|
|
| offset | "0x50" |
|---|
| size | 12 |
|---|
| type | "LpMetadataTableDescriptor" |
|---|
| name | "partitions" |
|---|
|
| offset | "0x5C" |
|---|
| size | 12 |
|---|
| type | "LpMetadataTableDescriptor" |
|---|
| name | "extents" |
|---|
|
| offset | "0x68" |
|---|
| size | 12 |
|---|
| type | "LpMetadataTableDescriptor" |
|---|
| name | "groups" |
|---|
|
| offset | "0x74" |
|---|
| size | 12 |
|---|
| type | "LpMetadataTableDescriptor" |
|---|
| name | "block_devices" |
|---|
|
| offset | "0x80" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "flags" |
|---|
| condition | "minor_version >= 2; zero in older headers" |
|---|
|
| offset | "0x84" |
|---|
| size | 124 |
|---|
| type | "uint8_t[124]" |
|---|
| name | "reserved" |
|---|
|
|
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "Struct with offset comments (44, 48, 80, 92, 104, 116, 128, 132 'pad to 256 bytes'), packed attribute; LpMetadataHeaderV1_0 at 386-398 is the older form without flags and reserved." |
|---|
| repo | "https://android.googlesource.com/platform/system/core" |
|---|
| commit | "a3b721a32242006b59cb12bd62c9133632af3a2d" |
|---|
| path | "fs_mgr/liblp/include/liblp/metadata_format.h" |
|---|
| lines | "182-236" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "LpMetadataHeader" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-19T08:59:00.278Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T11:54:43.143Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read metadata_format.h at the cited commit: summed field sizes give offsets 0,4,6,8,12,44,48,80,92,104,116,128,132 and 256 total; flags/reserved belong to header minor version 2 (LP_METADATA_VERSION_FOR_EXPANDED_HEADER), V1_0 header is the first 128 bytes." |
|---|
|
|
|---|