TrungNguyen1909 / qemu-t8030

iPhone 11 emulated on QEMU
Other
1.99k stars 206 forks source link

Accept .im4p kernel cache, device tree, static trust cache files #7

Closed qmfrederik closed 3 years ago

qmfrederik commented 3 years ago

We're currently required to extract the kernel image, device tree and static trust cache from the .img4 files.

It may be useful if qemu itself can take care of the extraction - it would make the process easier. Qemu already links with OpenSSL and liblzfse, so it already has the infrastructure required to manipulate im4p files in place.

Would you be open to a PR which adds such a feature?

TrungNguyen1909 commented 3 years ago

Yes, it would be nice. Please make sure it can handle both format (packed and extracted).

TrungNguyen1909 commented 3 years ago

Resolved in PR #9

TrungNguyen1909 commented 3 years ago

Trust cache im4p has 2 types of payload_type:

rtsc for ramdisk's trustcache trst for rootdisk's trustcache

qemu-system-aarch64: Could parse ASN.1 data in file 'Firmware/038-44087-125.dmg.trustcache' because it is not a 'trst' object, found 'rtscIM4P' object.
TrungNguyen1909 commented 3 years ago

I suggest leaving payload_type check to caller of extract_im4p_payload

TrungNguyen1909 commented 3 years ago

Addressed in a596748