Skip to content

PyIMG4 0.7

Pre-release
Pre-release
Compare
Choose a tag to compare
@m1stadev m1stadev released this 07 Dec 05:12
· 97 commits to master since this release
f0dc3f8

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 to pyimg4._Property, and a new pyimg4.ManifestProperty class has taken its place, which subclasses it
  • Likewise, pyimg4.ManifestImageData has been renamed to pyimg4._PropertyGroup, and a new pyimg4.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
  • 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 and value as keyword arguments in place of passing ASN.1 data
  • 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
  • NEW: pyimg4.ManifestImageProperties
    • Used to store a group of ManifestPropertys for an image inside of an Image4 manifest
    • Add .digest property for fetching digest of image
  • 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
  • NEW: pyimg4.PayloadProperty
    • Used as a property for Image4 payload info
    • Nothing changed from _Property
  • pyimg4.IM4P
    • Add .properties attribute for viewing payload properties
  • pyimg4.IM4PData
    • keybags is no longer accepted as an argument
      • To add/remove keybags, use .add_keybag()/.remove_keybag()

Full Changelog: v0.6.3...v0.7