PyIMG4 0.7
Pre-release
Pre-release
Notes
This release reworks a lot of how certain classes work internally, mainly pyimg4.IM4R
, pyimg4.ManifestProperty
, and pyimg4.ManifestImageData
.
pyimg4.ManifestProperty
has been renamed topyimg4._Property
, and a newpyimg4.ManifestProperty
class has taken its place, which subclasses it- Likewise,
pyimg4.ManifestImageData
has been renamed topyimg4._PropertyGroup
, and a newpyimg4.ManifestImageProperties
class has taken its place, which subclasses it - Multiple different types of properties & property groups found within Image4 formats are stored the same way, thus making it more convenient to only write one class each to parse them!
Major Changes
- Fix compressing payloads with LZFSE
- Add support for payload properties present in newer bootloader images (#10)
- Add support for extra properties in Image4 restore info (#19)
- Add more test cases
- Add more commands to CLi & improve upon some commands, see below
CLI Changes
- Add
pyimg4 img4 info
for printing information on an Image4 file - Add
pyimg4 im4m verify
for verifying an IM4M with a build manifest pyimg4 im4m info
- Add
-v
flag for printing extra information
- Add
pyimg4 im4p info
- The payload size is now rounded to 2 decimal places when printed
- Print payload properties, if any
- Add
-v
flag for printing extra information - Print the decompressed size of a payload that is both LZFSE-compressed and encrypted.
pyimg4 im4r info
- Print extra properties, if any
API Changes
pyimg4.ManifestProperty
->pyimg4._Property
- Add
.output()
to output the ASN.1-encoded property .name
->.fourcc
- Accepts
fourcc
andvalue
as keyword arguments in place of passing ASN.1 data
- Add
- NEW:
pyimg4.ManifestProperty
- Used to both store a property for an image (such as DGST and EPRO) inside of an Image4 manifest, and store a property for the Image4 manifest itself
- Not meant to be called directly
pyimg4.ManifestImageData
->pyimg4._PropertyGroup
- Properties stored as list in
_PropertyGroup._properties
- Add
.output()
to output all stored ASN.1-encoded properties
- Properties stored as list in
- NEW:
pyimg4.ManifestImageProperties
- Used to store a group of
ManifestProperty
s for an image inside of an Image4 manifest - Add
.digest
property for fetching digest of image
- Used to store a group of
- NEW:
pyimg4.RestoreProperty
- Used as a property for Image4 restore info
- Nothing changed from
_Property
pyimg4.IM4R
- Now subclasses
_PropertyGroup
- Can add/remove properties via
.add_property()
/.remove_property()
.boot_nonce
property still exists for easy setting/retrieving of boot nonce
- Now subclasses
- NEW:
pyimg4.PayloadProperty
- Used as a property for Image4 payload info
- Nothing changed from
_Property
pyimg4.IM4P
- Add
.properties
attribute for viewing payload properties
- Add
pyimg4.IM4PData
keybags
is no longer accepted as an argument- To add/remove keybags, use
.add_keybag()
/.remove_keybag()
- To add/remove keybags, use