Support for vendor_dlkm img
hosiet opened this issue · 5 comments
I am wondering if you would like to add support for vendor_dlkm
images, which is becoming increasingly common as described in https://source.android.com/devices/bootloader/partitions/vendor-odm-dlkm-partition . You may find such partition image from current Pixel 6 ROMs.
-> % ls
aosp build gradle helper README.md tools
avbImpl build.gradle.kts gradlew integrationTest.py settings.gradle.kts uiderrors
bbootimg doc gradlew.bat LICENSE.md src vendor_dlkm.img
-> % ./gradlew unpack
> Task :unpack FAILED
20:24:39.632 [main] WARN cfig.packable.PackableLauncher - No handler is activated, DO NOTHING!
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':unpack'.
> Process 'command '/usr/lib/jvm/java-18-openjdk-amd64/bin/java'' finished with non-zero exit value 2
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 operations aren't integrated in the tool.
Thanks for your work. Ideally I am looking for an end-to-end solution on unpacking/editing/repacking an existing vendor_dlkm.img
file, but seems that it is not available yet.
For workflow: the mount/view/umount operations should not be a major problem; I was even using regular mount(8)
on Linux and that works.
Besides, with current git HEAD 68afa18 the unpack action cannot give any results. After running ./gradlew unpack
, ./build/unzip_boot/
dir is empty. I have set bHackingMode = true
in build.gradle.kts
file.
I am attaching the file sample here as well.
% file vendor_dlkm.img
vendor_dlkm.img: Linux rev 1.0 ext2 filesystem data, UUID=15718fdd-fd35-585a-a26d-2215dc1f0c1b, volume name "vendor_dlkm" (extents) (large files) (huge files)
7z is required to extract ext4.
19:04:54.694 [main] INFO Helper - 7z x build/unzip_boot/vendor_dlkm.img -y -obuild/unzip_boot/vendor_dlkm
I just submited a commit to support the "pack" task. Nicely have a try ~