Versions in this module Expand all Collapse all v0 v0.1.0 Nov 12, 2022 v0.0.1 Nov 10, 2022 Changes in this version + const BOOTIMG_DEFAULT_NAME + const MATRIX_ROW_PARTITION + const MATRIX_ROW_VALUE + const SNAP_BOOTIMG_PART_NUM + const SNAP_BOOTSELECT_RECOVERY_SIGNATURE + const SNAP_BOOTSELECT_SIGNATURE + const SNAP_BOOTSELECT_VERSION_V1 + const SNAP_BOOTSELECT_VERSION_V2 + const SNAP_FILE_NAME_MAX_LEN + const SNAP_RECOVERY_BOOTIMG_PART_NUM + const SNAP_RUN_BOOTIMG_PART_NUM + type Env struct + func NewEnv(path, backupPath string, version Version) *Env + func (l *Env) FindFreeKernelBootPartition(kernel string) (string, error) + func (l *Env) FindFreeRecoverySystemBootPartition(recoverySystem string) (string, error) + func (l *Env) Get(key string) string + func (l *Env) GetBootImageName() string + func (l *Env) GetKernelBootPartition(kernel string) (string, error) + func (l *Env) GetRecoverySystemBootPartition(recoverySystem string) (string, error) + func (l *Env) InitializeBootPartitions(bootPartLabels ...string) error + func (l *Env) Load() error + func (l *Env) LoadEnv(path string) error + func (l *Env) RemoveKernelFromBootPartition(kernel string) error + func (l *Env) RemoveRecoverySystemFromBootPartition(recoverySystem string) error + func (l *Env) Save() error + func (l *Env) Set(key, value string) + func (l *Env) SetBootPartitionKernel(bootpart, kernel string) error + func (l *Env) SetBootPartitionRecoverySystem(bootpart, recoverySystem string) error + type SnapBootSelect_v1 struct + Bootimg_file_name [SNAP_FILE_NAME_MAX_LEN]byte + Bootimg_matrix [SNAP_BOOTIMG_PART_NUM][2][SNAP_FILE_NAME_MAX_LEN]byte + Crc32 uint32 + Gadget_asset_matrix [SNAP_BOOTIMG_PART_NUM][2][SNAP_FILE_NAME_MAX_LEN]byte + Gadget_mode [SNAP_FILE_NAME_MAX_LEN]byte + Key_value_pairs [10][2][SNAP_FILE_NAME_MAX_LEN]byte + Reboot_reason [SNAP_FILE_NAME_MAX_LEN]byte + Signature uint32 + Snap_core [SNAP_FILE_NAME_MAX_LEN]byte + Snap_gadget [SNAP_FILE_NAME_MAX_LEN]byte + Snap_kernel [SNAP_FILE_NAME_MAX_LEN]byte + Snap_mode [SNAP_FILE_NAME_MAX_LEN]byte + Snap_try_core [SNAP_FILE_NAME_MAX_LEN]byte + Snap_try_gadget [SNAP_FILE_NAME_MAX_LEN]byte + Snap_try_kernel [SNAP_FILE_NAME_MAX_LEN]byte + Unused_key_01 [SNAP_FILE_NAME_MAX_LEN]byte + Unused_key_02 [SNAP_FILE_NAME_MAX_LEN]byte + Unused_key_03 [SNAP_FILE_NAME_MAX_LEN]byte + Unused_key_04 [SNAP_FILE_NAME_MAX_LEN]byte + Unused_key_05 [SNAP_FILE_NAME_MAX_LEN]byte + Unused_key_06 [SNAP_FILE_NAME_MAX_LEN]byte + Unused_key_07 [SNAP_FILE_NAME_MAX_LEN]byte + Unused_key_08 [SNAP_FILE_NAME_MAX_LEN]byte + Unused_key_09 [SNAP_FILE_NAME_MAX_LEN]byte + Unused_key_10 [SNAP_FILE_NAME_MAX_LEN]byte + Unused_key_11 [SNAP_FILE_NAME_MAX_LEN]byte + Unused_key_12 [SNAP_FILE_NAME_MAX_LEN]byte + Unused_key_13 [SNAP_FILE_NAME_MAX_LEN]byte + Unused_key_14 [SNAP_FILE_NAME_MAX_LEN]byte + Unused_key_15 [SNAP_FILE_NAME_MAX_LEN]byte + Unused_key_16 [SNAP_FILE_NAME_MAX_LEN]byte + Unused_key_17 [SNAP_FILE_NAME_MAX_LEN]byte + Unused_key_18 [SNAP_FILE_NAME_MAX_LEN]byte + Unused_key_19 [SNAP_FILE_NAME_MAX_LEN]byte + Unused_key_20 [SNAP_FILE_NAME_MAX_LEN]byte + Version uint32 + type SnapBootSelect_v2_recovery struct + Bootimg_file_name [SNAP_FILE_NAME_MAX_LEN]byte + Bootimg_matrix [SNAP_RECOVERY_BOOTIMG_PART_NUM][2][SNAP_FILE_NAME_MAX_LEN]byte + Crc32 uint32 + Device_lock_state [SNAP_FILE_NAME_MAX_LEN]byte + Key_value_pairs [10][2][SNAP_FILE_NAME_MAX_LEN]byte + Recovery_system_status [SNAP_FILE_NAME_MAX_LEN]byte + Signature uint32 + Snapd_recovery_mode [SNAP_FILE_NAME_MAX_LEN]byte + Snapd_recovery_system [SNAP_FILE_NAME_MAX_LEN]byte + Try_recovery_system [SNAP_FILE_NAME_MAX_LEN]byte + Unused_key_01 [SNAP_FILE_NAME_MAX_LEN]byte + Unused_key_02 [SNAP_FILE_NAME_MAX_LEN]byte + Unused_key_03 [SNAP_FILE_NAME_MAX_LEN]byte + Unused_key_04 [SNAP_FILE_NAME_MAX_LEN]byte + Unused_key_05 [SNAP_FILE_NAME_MAX_LEN]byte + Unused_key_06 [SNAP_FILE_NAME_MAX_LEN]byte + Unused_key_07 [SNAP_FILE_NAME_MAX_LEN]byte + Unused_key_08 [SNAP_FILE_NAME_MAX_LEN]byte + Unused_key_09 [SNAP_FILE_NAME_MAX_LEN]byte + Unused_key_10 [SNAP_FILE_NAME_MAX_LEN]byte + Unused_key_11 [SNAP_FILE_NAME_MAX_LEN]byte + Unused_key_12 [SNAP_FILE_NAME_MAX_LEN]byte + Unused_key_13 [SNAP_FILE_NAME_MAX_LEN]byte + Unused_key_14 [SNAP_FILE_NAME_MAX_LEN]byte + Unused_key_15 [SNAP_FILE_NAME_MAX_LEN]byte + Unused_key_16 [SNAP_FILE_NAME_MAX_LEN]byte + Unused_key_17 [SNAP_FILE_NAME_MAX_LEN]byte + Version uint32 + type SnapBootSelect_v2_run struct + Bootimg_file_name [SNAP_FILE_NAME_MAX_LEN]byte + Bootimg_matrix [SNAP_RUN_BOOTIMG_PART_NUM][2][SNAP_FILE_NAME_MAX_LEN]byte + Crc32 uint32 + Gadget_asset_matrix [SNAP_RUN_BOOTIMG_PART_NUM][2][SNAP_FILE_NAME_MAX_LEN]byte + Gadget_mode [SNAP_FILE_NAME_MAX_LEN]byte + Kernel_status [SNAP_FILE_NAME_MAX_LEN]byte + Key_value_pairs [10][2][SNAP_FILE_NAME_MAX_LEN]byte + Signature uint32 + Snap_gadget [SNAP_FILE_NAME_MAX_LEN]byte + Snap_kernel [SNAP_FILE_NAME_MAX_LEN]byte + Snap_try_gadget [SNAP_FILE_NAME_MAX_LEN]byte + Snap_try_kernel [SNAP_FILE_NAME_MAX_LEN]byte + Unused_key_01 [SNAP_FILE_NAME_MAX_LEN]byte + Unused_key_02 [SNAP_FILE_NAME_MAX_LEN]byte + Unused_key_03 [SNAP_FILE_NAME_MAX_LEN]byte + Unused_key_04 [SNAP_FILE_NAME_MAX_LEN]byte + Unused_key_05 [SNAP_FILE_NAME_MAX_LEN]byte + Unused_key_06 [SNAP_FILE_NAME_MAX_LEN]byte + Unused_key_07 [SNAP_FILE_NAME_MAX_LEN]byte + Unused_key_08 [SNAP_FILE_NAME_MAX_LEN]byte + Unused_key_09 [SNAP_FILE_NAME_MAX_LEN]byte + Unused_key_10 [SNAP_FILE_NAME_MAX_LEN]byte + Unused_key_11 [SNAP_FILE_NAME_MAX_LEN]byte + Unused_key_12 [SNAP_FILE_NAME_MAX_LEN]byte + Unused_key_13 [SNAP_FILE_NAME_MAX_LEN]byte + Unused_key_14 [SNAP_FILE_NAME_MAX_LEN]byte + Unused_key_15 [SNAP_FILE_NAME_MAX_LEN]byte + Unused_key_16 [SNAP_FILE_NAME_MAX_LEN]byte + Unused_key_17 [SNAP_FILE_NAME_MAX_LEN]byte + Unused_key_18 [SNAP_FILE_NAME_MAX_LEN]byte + Unused_key_19 [SNAP_FILE_NAME_MAX_LEN]byte + Unused_key_20 [SNAP_FILE_NAME_MAX_LEN]byte + Version uint32 + type Version int + const V1 + const V2Recovery + const V2Run + func (v Version) Number() uint32 + func (v Version) Signature() uint32