Skip to content

Releases: m1stadev/PyIMG4

PyIMG4 0.8.6

29 Jul 16:36
7cb9cbe
Compare
Choose a tag to compare

Major Changes

  • Fix a bug where some LZFSE-compressed IM4Ps wouldn't be correctly recognized as compressed

Full Changelog: v0.8.5...v0.8.6

PyIMG4 0.8.5

22 Apr 20:19
3fdfdde
Compare
Choose a tag to compare

Major Changes

  • Add PYIMG4_FORCE_LZFSE environment variable
    • This environment variable forces the lzfse library to be used over apple-compress for *OS systems
    • I don't recommend this to be used, but offering it for the sake of having a different option.

Full Changelog: v0.8.4...v0.8.5

PyIMG4 0.8.4

22 Apr 00:52
1c28959
Compare
Choose a tag to compare
PyIMG4 0.8.4 Pre-release
Pre-release

Major Changes

  • The compression libraries are now no longer an optional dependency.
  • Fix a bug where incorrect Image4 payloads would be generated if any extra data was set (mostly A7-A9 kernelcaches)

Full Changelog: v0.8.3...v0.8.4

PyIMG4 0.8.3

05 Apr 19:38
0810b1e
Compare
Choose a tag to compare
PyIMG4 0.8.3 Pre-release
Pre-release

This is a small release to fix pyimg4.IM4PData not returning the correct compression type in some cases.

Full Changelog: v0.8.2...v0.8.3

PyIMG4 0.8.2

05 Apr 00:40
c548b28
Compare
Choose a tag to compare
PyIMG4 0.8.2 Pre-release
Pre-release

Major Changes

  • CLI: pyimg4 img4 create can now create an Image4 from raw data.
  • CLI: pyimg4 img4 extract can now extract raw data from an Image4.
  • CLI: pyimg4 im4p info now displays exact sizes when the verbose flag is passed,
  • CLI: pyimg4 im4p info now prints the compression name correctly.
  • Simplify ASN1-related code.
  • Optimize compression-related code to prevent unnecessary (de)compressions from being done.

API Changes

  • pyimg4.IM4PData
    • len(IM4PData) now returns the size of IM4PData.data
    • IM4PData.compression is now cached, and is set internally by IM4PData._detect_compression()

Full Changelog: v0.8.1...v0.8.2

PyIMG4 0.8.1

17 Feb 00:40
f321347
Compare
Choose a tag to compare
PyIMG4 0.8.1 Pre-release
Pre-release

Major Changes

  • Add apple-compress dependency for proper LZFSE compression on Darwin systems. (#36)
    • If you already have the compression dependencies installed, you will still need to manually install apple-compress if you don't already have it installed:
      • python3 -m pip install apple-compress
  • CLI: Add pyimg4 im4m extract command.
    • This command extracts an Image4 manifest from an SHSH blob, with support for also extracting update/no-nonce blobs.
    • Miscellaneous bug fixes.

API Changes

  • pyimg4.IM4PData
    • Can now take extra as an argument.
    • Can now take size as an argument.
      • This is meant to be the uncompressed size of the data. If you do not know the uncompressed size, you can choose to omit the argument, and it will be set to 0 by default (or the size of the data if uncompressed & unencrypted)
    • Remove get_lzfse_payload_size()/set_lzfse_payload_size()

Full Changelog: v0.8...v0.8.1

PyIMG4 0.8

22 Aug 20:29
1f6fc6b
Compare
Choose a tag to compare
PyIMG4 0.8 Pre-release
Pre-release

Major Changes

  • The minimum required Python version is now 3.8.
  • The compresison libraries are now an optional install for those who wish to install PyIMG4 without a build system.
    • A RuntimeError will be raised if you attempt to use any compression functionality without the required libraries installed.
    • To install these dependencies, you can use the compression extra: python3 -m pip install pyimg4[compression]
  • The pyimg4.IM4M class is now much less restrictive, to aid in IM4M fuzzing (more on the changes below).
  • pyimg4.IM4R.boot_nonce now prints the boot nonce in the correct endianness.
  • Other miscellaneous fixes.

API Changes

  • pyimg4.ManifestProperty

    • Can now be called with a fourcc/value pair.
  • pyimg4.ManifestImageProperties

    • Can now be called without any data.
  • pyimg4.IM4M

    • Can now be called without any data.
    • Added IM4M.output()
    • Added IM4M.add_image_properties()/IM4M.remove_image_properties()
    • Added IM4M.add_property()/IM4M.remove_property()
  • pyimg4.Keybag

    • A KeybagType is now only required when calling with a key/IV pair.

Full Changelog: v0.7...v0.8

PyIMG4 0.7

07 Dec 05:12
f0dc3f8
Compare
Choose a tag to compare
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 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

PyIMG4 0.6.3

25 Oct 18:38
9d061b3
Compare
Choose a tag to compare
PyIMG4 0.6.3 Pre-release
Pre-release

This update only has bugfixes and slight API changes.

Major Changes

  • Fix support for some IM4Ps that would be invalid when outputting via IM4P.output()
    • In IM4PData, if you have a payload that is both LZFSE-compressed and encrypted (These are commonly used in bootloader images for A11 and above devices), you now must set the uncompressed size of the payload using IM4PData.set_lzfse_payload_size(), or else the IM4P will be invalid when outputting. If you are passing an IM4P to the IM4P class, it will automatically do it for you.

API Changes

  • pyimg4.Compression
    • Add Compression.LZFSE_ENCRYPTED for encrypted + LZFSE-compressed payloads
    • Removed Compression.UNKNOWN
      • This enum was only used for detecting encrypted payloads. You should now transition over to using the IM4PData.encrypted property for detecting whether a payload is encrypted.

Full Changelog: v0.6.2...v0.6.3

PyIMG4 0.6.2

13 Jun 05:52
3d758fc
Compare
Choose a tag to compare
PyIMG4 0.6.2 Pre-release
Pre-release

Mostly a bugfix update, but the API has been slightly changed as well.

Major Changes

  • Support for "extra" data in complzss payloads in the CLI (A.K.A. KPP binary on A7-A9 kernelcaches)
  • Fix pyimg4 im4p extract
  • Cleaner error messages in the CLI

API Changes

  • pyimg4.IM4PData
    • IM4PData.output() now returns a named tuple with the data and any ASN.1-formatted keybags, if present
    • IM4PData.__repr__() now returns the length in hexadecimal
  • pyimg4.IM4M
    • IM4M.apnonce is now returned as bytes instead of str
    • IM4M.sepnonce is now returned as bytes instead of str

Full Changelog: v0.6.1...v0.6.2