[Android Software Development] chronolz:
Hi,

I have been trying to unpack boot.img.lz4 for SM-G998B/DS. I have tried this in Win 10 and Ubuntu 2004 WSL 2 using AIK v3.7.

This is the output I get from "unpacking.bat boot.img.lz4"

Android Image Kitchen - UnpackImg Script

by osm0sis @ xda-developers

Supplied image: boot.img.lz4

Setting up work folders . . .

Image type: AOSP

Signature with "AVBv2" type detected.

Splitting image to "split_img/" . . .

Android magic found at: 21

BOARD_KERNEL_CMDLINE ☻□¶☺☺,

BOARD_KERNEL_BASE 0x000a2356

BOARD_NAME ux=permissive3

BOARD_PAGE_SIZE 1868719209

BOARD_HASH_TYPE sha256

BOARD_KERNEL_OFFSET 0x00008000

BOARD_RAMDISK_OFFSET 0x00f5e2d6

BOARD_SECOND_OFFSET 0x60f5dcaa

BOARD_TAGS_OFFSET 0x6f684118

BOARD_OS_VERSION 55.26.45

BOARD_OS_PATCH_LEVEL 2070-05

BOARD_DT_SIZE 1932424303

Unpacking ramdisk to "ramdisk/" . . .

Compression used: tar

'"Android.Image.Kitchen.v3.7-Win32\Android Image Kitchen\\android_win_tools"\tar' is not recognized as an internal or external command,

operable program or batch file.

When I check files in the split_cmd folder, the files seem to be there... see dir list below. Also if I cat boot.img.lz4-zImage I will get a typical binary output. One more thing to note in the dir list is that boot.img.lz4-dt is 0 in size

04/17/2021 10:19 AM <DIR> .

04/17/2021 10:19 AM <DIR> ..

04/17/2021 10:19 AM 11 boot.img.lz4-base

04/17/2021 10:19 AM 15 boot.img.lz4-board

04/17/2021 10:19 AM 7 boot.img.lz4-cmdline

04/17/2021 10:19 AM 0 boot.img.lz4-dt

04/17/2021 10:19 AM 6 boot.img.lz4-dttype

04/17/2021 10:19 AM 7 boot.img.lz4-hashtype

04/17/2021 10:19 AM 6 boot.img.lz4-imgtype

04/17/2021 10:19 AM 11 boot.img.lz4-kernel_offset

04/17/2021 10:19 AM 10 boot.img.lz4-origsize

04/17/2021 10:19 AM 8 boot.img.lz4-os_patch_level

04/17/2021 10:19 AM 9 boot.img.lz4-os_version

04/17/2021 10:19 AM 11 boot.img.lz4-pagesize

04/17/2021 10:19 AM 369,099,091 boot.img.lz4-ramdisk.cpio.tar

04/17/2021 10:19 AM 4 boot.img.lz4-ramdiskcomp

04/17/2021 10:19 AM 11 boot.img.lz4-ramdisk_offset

04/17/2021 10:19 AM 51,641,600 boot.img.lz4-second

04/17/2021 10:19 AM 11 boot.img.lz4-second_offset

04/17/2021 10:19 AM 11 boot.img.lz4-tags_offset

04/17/2021 10:19 AM 28,807,680 boot.img.lz4-zImage

19 File(s) 449,548,509 bytes

2 Dir(s) 1,517,954,637,824 bytes free

Also if I copy tar.exe (i dont think this is kosher after studying unpacking.sh on the linux side) from the win10 system32 into the AIK android tools bin folder and rerun "unpacking.bat boot.img.lz4" I get the following output

Android Image Kitchen - UnpackImg Script

by osm0sis @ xda-developers

Supplied image: boot.img.lz4

Setting up work folders . . .

Image type: AOSP

Signature with "AVBv2" type detected.

Splitting image to "split_img/" . . .

Android magic found at: 21

BOARD_KERNEL_CMDLINE ☻□¶☺☺,

BOARD_KERNEL_BASE 0x000a2356

BOARD_NAME ux=permissive3

BOARD_PAGE_SIZE 1868719209

BOARD_HASH_TYPE sha256

BOARD_KERNEL_OFFSET 0x00008000

BOARD_RAMDISK_OFFSET 0x00f5e2d6

BOARD_SECOND_OFFSET 0x60f5dcaa

BOARD_TAGS_OFFSET 0x6f684118

BOARD_OS_VERSION 55.26.45

BOARD_OS_PATCH_LEVEL 2070-05

BOARD_DT_SIZE 1932424303

Unpacking ramdisk to "ramdisk/" . . .

Compression used: tar

Usage:

List: tar -tf <archive-filename>

Extract: tar -xf <archive-filename>

Create: tar -cf <archive-filename> [filenames...]

Help: tar --help

/android_win_tools/cpio: premature end of archive

Error!

Press any key to continue . . .

Now, When I try AIK in Ubuntu 2004 WSL 2 I get the following output

Android Image Kitchen - UnpackImg Script

by osm0sis @ xda-developers

Supplied image: boot.img.lz4

Setting up work folders...

Image type: AOSP

Signature with "AVBv2" type detected.

Splitting image to "split_img/"...

Android magic found at: 21

BOARD_KERNEL_CMDLINE ,

BOARD_KERNEL_BASE 0x000a2356

BOARD_NAME ux=permissive3

BOARD_PAGE_SIZE 1868719209

BOARD_HASH_TYPE sha256

BOARD_KERNEL_OFFSET 0x00008000

BOARD_RAMDISK_OFFSET 0x00f5e2d6

BOARD_SECOND_OFFSET 0x60f5dcaa

BOARD_TAGS_OFFSET 0x6f684118

BOARD_OS_VERSION 55.26.45

BOARD_OS_PATCH_LEVEL 2070-05

BOARD_DT_SIZE 1932424303

Unpacking ramdisk (as root) to "ramdisk/"...

Warning: Using cpio 2.13 may result in an unusable repack; downgrade to 2.12 to be safe!

Compression used: tar

Unsupported format.

Error!

when i check files in the split_img folder, they seem to be listing however cat of any binary just shows blank. Also boot.img.lz4-dt is approx 1.8GB

total 2.3G

drwxr-xr-x 2 user user 4.0K Apr 17 10:33 .

drwxr-xr-x 5 user user 4.0K Apr 17 10:33 ..

-rw-r--r-- 1 user user 11 Apr 17 10:33 boot.img.lz4-base

-rw-r--r-- 1 user user 15 Apr 17 10:33 boot.img.lz4-board

-rw-r--r-- 1 user user 7 Apr 17 10:33 boot.img.lz4-cmdline

-rw-r--r-- 1 user user 1.8G Apr 17 10:33 boot.img.lz4-dt

-rw-r--r-- 1 user user 5 Apr 17 10:33 boot.img.lz4-dttype

-rw-r--r-- 1 user user 7 Apr 17 10:33 boot.img.lz4-hashtype

-rw-r--r-- 1 user user 5 Apr 17 10:33 boot.img.lz4-imgtype

-rw-r--r-- 1 user user 11 Apr 17 10:33 boot.img.lz4-kernel_offset

-rw-r--r-- 1 user user 9 Apr 17 10:33 boot.img.lz4-origsize

-rw-r--r-- 1 user user 8 Apr 17 10:33 boot.img.lz4-os_patch_level

-rw-r--r-- 1 user user 9 Apr 17 10:33 boot.img.lz4-os_version

-rw-r--r-- 1 user user 11 Apr 17 10:33 boot.img.lz4-pagesize

-rw-r--r-- 1 user user 353M Apr 17 10:33 boot.img.lz4-ramdisk.cpio

-rw-r--r-- 1 user user 11 Apr 17 10:33 boot.img.lz4-ramdisk_offset

-rw-r--r-- 1 user user 4 Apr 17 10:33 boot.img.lz4-ramdiskcomp

-rw-r--r-- 1 user user 50M Apr 17 10:33 boot.img.lz4-second

-rw-r--r-- 1 user user 11 Apr 17 10:33 boot.img.lz4-second_offset

-rw-r--r-- 1 user user 11 Apr 17 10:33 boot.img.lz4-tags_offset

-rw-r--r-- 1 user user 28M Apr 17 10:33 boot.img.lz4-zImage

Can I attach the boot.img.lz4-dt "from samsung stock image" in the forum?

I am trying to replace "boot.img.lz4-zImage" with a custom kernel "Image", do I really need to unpack ramdisk for this?

Last, between the win 10 and ubuntu wsl2 unpacking the boot.img.lz4-dt is 0bytes and 1.8GB. Would this be an issue if somehow I can bypass ramdisk unpacking and only replace boot.imag.lz4-zImage in the split_img folder and repack boot.img.lz4 in win 10?

Thank you... any direction would be helpful

chronolz