Results 42 comments of cfig

unpack/view: oem.img may be sparse ext4 image, or raw ext4 image. If it's sparse image, we can convert it to raw ext4 image, and then view the contents by mounting...

view oem.img contents: 1. (optional) simg2img 2. mount ``` $ udisksctl loop-setup --file oem.img Mapped file oem.img as /dev/loop0. $ udisksctl mount -b /dev/loop0 Mounted /dev/loop0 at /media/guest/oem ``` But...

From latest AOSP, we see Google may use EROFS instead of ext4 from Android 13. if you're really interested in unpacking/packing oem.img, please refer to AOSP code, there are tools...

GKI certificate generation: ``` rm -fr gki_arm64 && mkdir gki_arm64 out/host/linux-x86/bin/mkbootimg --kernel out/target/product/gki_arm64/kernel-5.10 --header_version 4 --output gki_arm64/boot-5.10.img @# generate boot-5.10.img.boot_signature out/host/linux-x86/bin/generate_gki_certificate \ --key build/make/target/product/gsi/testkey_rsa2048.pem \ --algorithm SHA256_RSA2048 \ --avbtool out/host/linux-x86/bin/avbtool...

GKI 1.0: header: typical 4KB boot signature. GKI 2.0: header: boot signature size is 0, but it will have 16KB boot signature implicitly.

boot.img in "oriole-sq3a.220705.003": ``` $ md5sum boot.img 8d71e89f8a0ecc288e14ca7d06cb0e99 boot.img ``` My local test pass. Can you paste your log?

Good catch ~ Latest `boot.img=>kernel` is an lz4 compressed kernel. If you decompress it: ``` red➜ ~/work/boot git:(394bfc5) ✗ lz4cat build/unzip_boot/kernel | xxd -g1 | head -5 00000000: 4d 5a...

Close it. Please comment if you still meet any problems ~

image conversion "sparse image -> raw ext4 image " is supported. But image mounting and editing aren't supported.

BTW, what's your ideal work flow on vendor_dlkm.img ? As the output will be raw ext4/erofs image file, we can use some linux tools(eg. udisksctl) to mount/view/unmount it. And such...