Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for vendor_dlkm img #95

Closed
hosiet opened this issue Aug 2, 2022 · 5 comments
Closed

Support for vendor_dlkm img #95

hosiet opened this issue Aug 2, 2022 · 5 comments

Comments

@hosiet
Copy link

hosiet commented Aug 2, 2022

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
@cfig
Copy link
Owner

cfig commented Aug 3, 2022

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

@cfig
Copy link
Owner

cfig commented Aug 3, 2022

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.

@hosiet
Copy link
Author

hosiet commented Aug 3, 2022

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.

@hosiet
Copy link
Author

hosiet commented Aug 3, 2022

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)

vendor_dlkm.zip

@cfig
Copy link
Owner

cfig commented Dec 27, 2023

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 ~

@cfig cfig closed this as completed Dec 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants