Skip to content

Commit

Permalink
Merge pull request #25 from doronz88/feature/kernelcache-extract
Browse files Browse the repository at this point in the history
build_identity: extract kernelcache im4p
  • Loading branch information
doronz88 authored Aug 19, 2024
2 parents da68526 + 94d7cf8 commit ce5f068
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ipsw_parser/build_identity.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

from cached_property import cached_property
from plumbum import local
from pyimg4 import IM4P

from ipsw_parser.component import Component

Expand Down Expand Up @@ -161,7 +162,10 @@ def extract(self, output: Path) -> None:
kernel_output = output / 'System/Library/Caches/com.apple.kernelcaches' / kernel_path.parts[-1]

logger.info(f'extracting kernel into: {kernel_output}')
kernel_output.write_bytes(kernel_component.data)
# kernel_output.write_bytes(kernel_component.data)
im4p = IM4P(kernel_component.data)
im4p.payload.decompress()
kernel_output.write_bytes(im4p.payload.output().data)

for cryptex in ('App', 'OS'):
name = {
Expand Down

0 comments on commit ce5f068

Please sign in to comment.