go install 41.neocities.org/drm/blog/2025/10/tee@latest
const ( B = 1 << (10 * 0) // 2^0 KB = 1 << (10 * 1) // 2^10 MB = 1 << (10 * 2) // 2^20 GB = 1 << (10 * 3) // 2^30 DefaultBlockSize = 512 HeaderSize = 2 * MB // Header size is always 2MB TypePartition = 22592 // Magic number to identify a partition entry OffsetName = 0x10 OffsetBase = 0x08 OffsetSize = 0x0C )
Constants defined in the Python script
type Partition struct { Name string Base uint32 // Base address in blocks Size uint32 // Size in blocks }
Partition holds the extracted information for a single partition.