kdztools
kdztools copied to clipboard
Warning: Data between headers and payload! (offsets 826 to 83768)
Hi, small question. Could you fix this problem with LG V30 Images??
root@kdev:~/lg/kdztools# ./unkdz -f H93011m_00_OPEN_EU_OP_1229.kdz -l [!] Warning: Data between headers and payload! (offsets 826 to 83768) [+] KDZ Partition List (format v2)
0 : H93011m_00.dz (3563995785 bytes) 1 : LGUP_c.dll (3079120 bytes) 2 : LGUP_c.dylib (1229456 bytes)
An this is the second error: Error: Value supposed to be zero in field "reserved5" is non-zero (0x5900)
Big thanks
Same with G6 images
Managed to solve this (https://github.com/ehem/kdztools/issues/16)
[+] Extracting dtbo_a_94294.bin to E.dtbo_a_94294.bin.chunk
[+] Extracting storsec_a_96342.bin to E.storsec_a_96342.bin.chunk
[+] Extracting raw_resources_a_96374.bin to E.raw_resources_a_96374.bin.chunk
[+] Extracting sid_a_98422.bin to E.sid_a_98422.bin.chunk
[+] Extracting aop_b_98550.bin to E.aop_b_98550.bin.chunk
[+] Extracting akmu_b_163702.bin to E.akmu_b_163702.bin.chunk
[+] Extracting boot_b_163830.bin to E.boot_b_163830.bin.chunk
[+] Extracting devcfg_b_180470.bin to E.devcfg_b_180470.bin.chunk
[+] Extracting qupfw_b_180502.bin to E.qupfw_b_180502.bin.chunk
[+] Extracting laf_b_180534.bin to E.laf_b_180534.bin.chunk
[+] Extracting 0_vbmeta_LGU_KR.img to E.0_vbmeta_LGU_KR.img.chunk
[+] Extracting dtbo_b_192838.bin to E.dtbo_b_192838.bin.chunk
[+] Extracting storsec_b_194886.bin to E.storsec_b_194886.bin.chunk
[+] Extracting raw_resources_b_194918.bin to E.raw_resources_b_194918.bin.chunk
[+] Extracting sid_b_196966.bin to E.sid_b_196966.bin.chunk
[+] Extracting sec_197094.bin to E.sec_197094.bin.chunk
[+] Extracting apdp_197478.bin to E.apdp_197478.bin.chunk
[+] Extracting msadp_197606.bin to E.msadp_197606.bin.chunk
[+] Extracting logfs_200039.bin to E.logfs_200039.bin.chunk
[+] Extracting BackupGPT_221179.bin to E.BackupGPT_221179.bin.chunk
The idea is to skip the problematic chunks, although they will remain useless after unpacking. At least you can extract some other partitions to do your work.
Toggle the logic in: https://github.com/ehem/kdztools/blob/master/libexec/dz.py#L175
('reserved5', ('I', False)), # currently always zero
Managed to unpack small partitions. Apparently, LG changed the compression algorithm from zlib to zstd on LG V40 kdzs.
The firmware used is the latest LG V40 ThinQ Korean version:
wget -c http://pkg02.lime.gdms.lge.com/dn/downloader.dev?fileKey=FW97NX72A2JCA1I61965CIN/V409N10l_00_LGU_KR_OP_1015.kdz
However, system
and vendor
are only decompressed in chunks but the order of merging is unclear or confused yet. Any idea @ehem?
Further info at https://forum.xda-developers.com/showpost.php?p=78044579&postcount=8
BINGO!
[20:10 edu@c00l dzextracted] > sudo mount -t ext4 vendor_a.image /media/edu/ext4_tmp
[sudo] password for edu:
[20:10 edu@c00l dzextracted] > cd /media/edu/ext4_tmp
[20:10 edu@c00l ext4_tmp] > ll
total 220K
drwxr-xr-x. 10 root 2000 4.0K Dec 31 2008 app
drwxr-xr-x. 6 root 2000 8.0K Dec 31 2008 bin
drwxr-xr-x. 2 root 2000 4.0K Dec 31 2008 carrier
drwxr-xr-x. 2 root 2000 4.0K Dec 31 2008 dsp
drwxr-xr-x. 2 root 2000 4.0K Dec 31 2008 els
drwxr-xr-x. 2 root 2000 4.0K Dec 31 2008 eri
drwxr-xr-x. 23 root 2000 4.0K Dec 31 2008 etc
drwxr-xr-x. 2 root 2000 4.0K Dec 31 2008 ffu
drwxr-xr-x. 3 root 2000 4.0K Dec 31 2008 firmware
drwxr-xr-x. 2 root 2000 4.0K Dec 31 2008 fota
drwxr-xr-x. 2 root 2000 4.0K Dec 31 2008 framework
drwxr-xr-x. 11 root 2000 16K Dec 31 2008 lib
drwxr-xr-x. 9 root 2000 16K Dec 31 2008 lib64
drwx------. 2 root root 16K Dec 31 2008 lost+found
drwxr-xr-x. 2 root 2000 4.0K Dec 31 2008 media
drwxr-xr-x. 2 root 2000 4.0K Dec 31 2008 mpt
drwxr-xr-x. 83 root 2000 4.0K Dec 31 2008 overlay
drwxr-xr-x. 3 root 2000 4.0K Dec 31 2008 package
drwxr-xr-x. 3 root 2000 4.0K Dec 31 2008 persdata
drwxr-xr-x. 2 root 2000 4.0K Dec 31 2008 persist-lg
drwxr-xr-x. 2 root 2000 4.0K Dec 31 2008 power
drwxr-xr-x. 3 root 2000 4.0K Dec 31 2008 priv-app
drwxr-xr-x. 3 root 2000 4.0K Dec 31 2008 radio
drwxr-xr-x. 5 root 2000 4.0K Dec 31 2008 rfs
drwxr-xr-x. 2 root 2000 4.0K Dec 31 2008 sns
drwxr-xr-x. 2 root 2000 4.0K Dec 31 2008 srtc
drwxr-xr-x. 3 root 2000 4.0K Dec 31 2008 vzw
-rw-------. 1 root root 8.8K Dec 31 2008 build.prop
-rw-r--r--. 1 root root 1.9K Dec 31 2008 compatibility_matrix.xml
-rw-------. 1 root root 684 Dec 31 2008 default.prop
lrw-r--r--. 1 root root 12 Dec 31 2008 factory_data -> /system/data
lrw-r--r--. 1 root root 19 Dec 31 2008 factory_etc -> /system/factory_etc
lrw-r--r--. 1 root root 19 Dec 31 2008 factory_lib -> /system/factory_lib
lrw-r--r--. 1 root root 21 Dec 31 2008 factory_lib64 -> /system/factory_lib64
-rw-r--r--. 1 root root 36K Dec 31 2008 manifest.xml
-rw-r--r--. 1 root root 16K Dec 31 2008 ueventd.rc