liblp.include.metadata_format

Module Attributes

LP_METADATA_VERSION_FOR_EXPANDED_HEADER

Attributes for the LpMetadataPartition::attributes field.

LP_PARTITION_ATTR_READONLY

This flag is only intended to be used with super_empty.img and super.img on retrofit devices.

LP_PARTITION_ATTR_SLOT_SUFFIXED

This flag is applied automatically when using MetadataBuilder::NewForUpdate.

LP_PARTITION_ATTR_DISABLED

Mask that defines all valid attributes.

LP_PARTITION_ATTRIBUTE_MASK

Default name of the physical partition that holds logical partition entries.

LP_SECTOR_SIZE

Amount of space reserved at the start of every super partition to avoid creating an accidental boot sector.

LP_PARTITION_RESERVED_BYTES

This structure is stored at block 0 in the first 4096 bytes of the partition, and again in the following block.

LP_HEADER_FLAG_VIRTUAL_AB_DEVICE

This struct defines a logical partition entry, similar to what would be present in a GUID Partition Table.

LP_GROUP_SLOT_SUFFIXED

This struct defines an entry in the block_devices table.

LP_BLOCK_DEVICE_SLOT_SUFFIXED

For ease of writing compatibility checks, the original metadata header is preserved below, and typedefs are provided for the current version.

Classes

LpMetadataBlockDevice

LpMetadataExtent

LpMetadataGeometry

LpMetadataHeader

LpMetadataHeaderV1_0

LpMetadataHeaderV1_2

alias of LpMetadataHeader

LpMetadataPartition

LpMetadataPartitionGroup

LpMetadataTableDescriptor

liblp.include.metadata_format.LP_BLOCK_DEVICE_SLOT_SUFFIXED = 1

For ease of writing compatibility checks, the original metadata header is preserved below, and typedefs are provided for the current version.

liblp.include.metadata_format.LP_GROUP_SLOT_SUFFIXED = 1

This struct defines an entry in the block_devices table. There must be at least one device, and the first device must represent the partition holding the super metadata.

liblp.include.metadata_format.LP_HEADER_FLAG_VIRTUAL_AB_DEVICE = 1

This struct defines a logical partition entry, similar to what would be present in a GUID Partition Table.

liblp.include.metadata_format.LP_METADATA_VERSION_FOR_EXPANDED_HEADER = 2

Attributes for the LpMetadataPartition::attributes field.

READONLY - The partition should not be considered writable. When used with device mapper, the block device will be created as read-only.

liblp.include.metadata_format.LP_PARTITION_ATTRIBUTE_MASK = 15

Default name of the physical partition that holds logical partition entries. The layout of this partition will look like:

Disk Geometry

Geometry Backup

Metadata

Backup Metadata

Logical Partitions

liblp.include.metadata_format.LP_PARTITION_ATTR_DISABLED = 8

Mask that defines all valid attributes. When changing this, make sure to update ParseMetadata().

liblp.include.metadata_format.LP_PARTITION_ATTR_READONLY = 1

This flag is only intended to be used with super_empty.img and super.img on retrofit devices. On these devices there are A and B super partitions, and we don’t know ahead of time which slot the image will be applied to.

If set, the partition name needs a slot suffix applied. The slot suffix is determined by the metadata slot number (0 = _a, 1 = _b).

liblp.include.metadata_format.LP_PARTITION_ATTR_SLOT_SUFFIXED = 2

This flag is applied automatically when using MetadataBuilder::NewForUpdate. It signals that the partition was created (or modified) for a snapshot-based update. If this flag is not present, the partition was likely flashed via fastboot.

liblp.include.metadata_format.LP_PARTITION_RESERVED_BYTES = 4096

This structure is stored at block 0 in the first 4096 bytes of the partition, and again in the following block. It is never modified and describes how logical partition information can be located.

liblp.include.metadata_format.LP_SECTOR_SIZE = 512

Amount of space reserved at the start of every super partition to avoid creating an accidental boot sector.

class liblp.include.metadata_format.LpMetadataBlockDevice
alignment

Structure/Union member

alignment_offset

Structure/Union member

first_logical_sector

Structure/Union member

flags

Structure/Union member

partition_name

Structure/Union member

size

Structure/Union member

class liblp.include.metadata_format.LpMetadataExtent
num_sectors

Structure/Union member

target_data

Structure/Union member

target_source

Structure/Union member

target_type

Structure/Union member

class liblp.include.metadata_format.LpMetadataGeometry
checksum

Structure/Union member

logical_block_size

Structure/Union member

magic

Structure/Union member

metadata_max_size

Structure/Union member

metadata_slot_count

Structure/Union member

struct_size

Structure/Union member

class liblp.include.metadata_format.LpMetadataHeader
block_devices

Structure/Union member

extents

Structure/Union member

flags

Structure/Union member

groups

Structure/Union member

header_checksum

Structure/Union member

header_size

Structure/Union member

magic

Structure/Union member

major_version

Structure/Union member

minor_version

Structure/Union member

partitions

Structure/Union member

reserved

Structure/Union member

tables_checksum

Structure/Union member

tables_size

Structure/Union member

class liblp.include.metadata_format.LpMetadataHeaderV1_0
block_devices

Structure/Union member

extents

Structure/Union member

groups

Structure/Union member

header_checksum

Structure/Union member

header_size

Structure/Union member

magic

Structure/Union member

major_version

Structure/Union member

minor_version

Structure/Union member

partitions

Structure/Union member

tables_checksum

Structure/Union member

tables_size

Structure/Union member

liblp.include.metadata_format.LpMetadataHeaderV1_2

alias of LpMetadataHeader

class liblp.include.metadata_format.LpMetadataPartition
attributes

Structure/Union member

first_extent_index

Structure/Union member

group_index

Structure/Union member

name

Structure/Union member

num_extents

Structure/Union member

class liblp.include.metadata_format.LpMetadataPartitionGroup
flags

Structure/Union member

maximum_size

Structure/Union member

name

Structure/Union member

class liblp.include.metadata_format.LpMetadataTableDescriptor
entry_size

Structure/Union member

num_entries

Structure/Union member

offset

Structure/Union member