Releases: m1stadev/PyIMG4
Releases · m1stadev/PyIMG4
PyIMG4 0.8.6
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
Major Changes
- Add
PYIMG4_FORCE_LZFSE
environment variable- This environment variable forces the
lzfse
library to be used overapple-compress
for *OS systems - I don't recommend this to be used, but offering it for the sake of having a different option.
- This environment variable forces the
Full Changelog: v0.8.4...v0.8.5
PyIMG4 0.8.4
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
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
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 ofIM4PData.data
IM4PData.compression
is now cached, and is set internally byIM4PData._detect_compression()
Full Changelog: v0.8.1...v0.8.2
PyIMG4 0.8.1
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 installapple-compress
if you don't already have it installed:python3 -m pip install apple-compress
- If you already have the
- 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()
- Can now take
Full Changelog: v0.8...v0.8.1
PyIMG4 0.8
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]
- A
- 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.
- A
Full Changelog: v0.7...v0.8
PyIMG4 0.7
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
Full Changelog: v0.6.3...v0.7
PyIMG4 0.6.3
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 usingIM4PData.set_lzfse_payload_size()
, or else the IM4P will be invalid when outputting. If you are passing an IM4P to theIM4P
class, it will automatically do it for you.
- In
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.
- This enum was only used for detecting encrypted payloads. You should now transition over to using the
- Add
Full Changelog: v0.6.2...v0.6.3
PyIMG4 0.6.2
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 presentIM4PData.__repr__()
now returns the length in hexadecimal
pyimg4.IM4M
IM4M.apnonce
is now returned asbytes
instead ofstr
IM4M.sepnonce
is now returned asbytes
instead ofstr
Full Changelog: v0.6.1...v0.6.2