go install 41.neocities.org/drm/internal/extract-emmc-bin@latest
const ( B = 1 << 0 KB = 1 << 10 MB = 1 << 20 GB = 1 << 30 HEADERSIZE = 2 * MB // Header size is always 2MB TYPEPARTITION = 22592 OFFSETNAME = 0x10 OFFSETBASE = 0x08 OFFSETSIZE = 0x0C )
VARS
var ( BLOCKSIZE int64 = 0x200 // ErrNotAPartition is returned when a data block is not a valid partition type. ErrNotAPartition = errors.New("data block is not a valid partition type") )
Partition struct to hold partition information
NewPartitionFromBytes acts as a constructor, parsing a partition from a byte slice.
Extract saves the partition's data from the source file to a new file in the output directory.
String provides a human-readable summary of the partition, satisfying the fmt.Stringer interface.