Extract KDZ file Guide - G3 Android Development

Hello,
I was searching the web to get a solution to extract KDZ LG G3 firmware and finally I got a way to achieve it properly and easily and am sahring with the community.
1st of all thks and credits for @thecubed and @bullghost
all credits to @thecubed for the KDZ Tools here : http://forum.xda-developers.com/showthread.php?p=46458839
WHAT YOU NEED
- Python 2.7 : https://www.python.org/download/releases/2.7/
- Modified PY tool scripts (KDZ Tools) : http://downloads.codefi.re/thecubed/androidtools/Compressed_KDZUtils.zip
HOW TO DO IT
Extract the downloaded file (G3_KDZ_Extractor.rar)
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
1- Install Python27 (run python-2.7.msi)
2- Copy both PY files (scripts) to "C:\Python27"
Copy your KDZ file to "C:\Python27"
3- Open Command prompt (cmd) and run the following commands
cd C:\Python27
python.exe KDZFileTools.py -f D85510L_00.kdz -s 0
Click to expand...
Click to collapse
After running the command you should see somthing like this
Wait for a moment and it is done.
Now, go to "C:\Python27" a new folder named "kdzextracted" is created : the DZ and the DLL file are extracted there.
4- Use the LG G2 tool by bullghost to extract the DZ file normally : http://forum.xda-developers.com/showthread.php?t=2600575

Great work man. Thanks

Ha! G8!

Thank you so much! I tried following the guides in the various threads but for someone with 0 Python knowledge I couldn't seem to get anywhere useful. This is a great step by step guide, will be trying it tonight with my v10L KDZ.
Thanks again!

S3V3N said:
Ha! G8!
Click to expand...
Click to collapse
CHeck PM plz

to avoid getting that error you have in your image just need to add -s 0 and it will on extract the .dz file
after that you can use the dztool.py to extract the partitions.
I.E
:~$ python KDZFileTools.py -f D85510L_00.kdz -s 0
[+] Extracting single partition!
[+] Extracting D85510l_00.dz to kdzextracted/D85510l_00.dz
[email protected]:~$
~/kdzextracted$ python ../DZFileTools.py -f D85510l_00.dz -x
[+] Extracting all partitions!
[+] Extracting PrimaryGPT_0.bin to dzextracted/PrimaryGPT_0.bin
[+] Extracting modem_32768.bin to dzextracted/modem_32768.bin
[+] Extracting sbl1_163840.bin to dzextracted/sbl1_163840.bin
[+] Extracting dbi_165888.bin to dzextracted/dbi_165888.bin
[+] Extracting aboot_167936.bin to dzextracted/aboot_167936.bin
[+] Extracting rpm_172032.bin to dzextracted/rpm_172032.bin
[+] Extracting tz_174080.bin to dzextracted/tz_174080.bin
[+] Extracting boot_196608.bin to dzextracted/boot_196608.bin
[+] Extracting persist_229376.bin to dzextracted/persist_229376.bin
[+] Extracting recovery_294912.bin to dzextracted/recovery_294912.bin
[+] Extracting rct_350224.bin to dzextracted/rct_350224.bin
[+] Extracting laf_393216.bin to dzextracted/laf_393216.bin
[+] Extracting factory_655360.bin to dzextracted/factory_655360.bin
[+] Extracting system_720896.bin to dzextracted/system_720896.bin
[+] Extracting system_984136.bin to dzextracted/system_984136.bin
[+] Extracting system_1249088.bin to dzextracted/system_1249088.bin
[+] Extracting system_1508424.bin to dzextracted/system_1508424.bin
[+] Extracting system_1512328.bin to dzextracted/system_1512328.bin
[+] Extracting system_1773376.bin to dzextracted/system_1773376.bin
[+] Extracting system_2032712.bin to dzextracted/system_2032712.bin
[+] Extracting system_2036616.bin to dzextracted/system_2036616.bin
[+] Extracting system_2297664.bin to dzextracted/system_2297664.bin
[+] Extracting system_2557000.bin to dzextracted/system_2557000.bin
[+] Extracting system_2560904.bin to dzextracted/system_2560904.bin
u[+] Extracting system_2821952.bin to dzextracted/system_2821952.bin
[+] Extracting system_3081288.bin to dzextracted/system_3081288.bin
[+] Extracting system_3085192.bin to dzextracted/system_3085192.bin
[+] Extracting system_3346240.bin to dzextracted/system_3346240.bin
[+] Extracting system_3608384.bin to dzextracted/system_3608384.bin
[+] Extracting system_3870528.bin to dzextracted/system_3870528.bin
[+] Extracting system_4132672.bin to dzextracted/system_4132672.bin
[+] Extracting system_4390912.bin to dzextracted/system_4390912.bin
[+] Extracting system_4653056.bin to dzextracted/system_4653056.bin
[+] Extracting system_4915200.bin to dzextracted/system_4915200.bin
[+] Extracting cust_6193152.bin to dzextracted/cust_6193152.bin
[+] Extracting cust_6455296.bin to dzextracted/cust_6455296.bin
[+] Extracting cust_6459544.bin to dzextracted/cust_6459544.bin
[+] Extracting BackupGPT_30776320.bin to dzextracted/BackupGPT_30776320.bin
and voila! u got your partitions

roniez said:
to avoid getting that error you have in your image just need to add -s 0 and it will on extract the .dz file
after that you can use the dztool.py to extract the partitions.
I.E
:~$ python KDZFileTools.py -f D85510L_00.kdz -s 0
[+] Extracting single partition!
[+] Extracting D85510l_00.dz to kdzextracted/D85510l_00.dz
[email protected]:~$
~/kdzextracted$ python ../DZFileTools.py -f D85510l_00.dz -x
[+] Extracting all partitions!
[+] Extracting PrimaryGPT_0.bin to dzextracted/PrimaryGPT_0.bin
[+] Extracting modem_32768.bin to dzextracted/modem_32768.bin
[+] Extracting sbl1_163840.bin to dzextracted/sbl1_163840.bin
[+] Extracting dbi_165888.bin to dzextracted/dbi_165888.bin
[+] Extracting aboot_167936.bin to dzextracted/aboot_167936.bin
[+] Extracting rpm_172032.bin to dzextracted/rpm_172032.bin
[+] Extracting tz_174080.bin to dzextracted/tz_174080.bin
[+] Extracting boot_196608.bin to dzextracted/boot_196608.bin
[+] Extracting persist_229376.bin to dzextracted/persist_229376.bin
[+] Extracting recovery_294912.bin to dzextracted/recovery_294912.bin
[+] Extracting rct_350224.bin to dzextracted/rct_350224.bin
[+] Extracting laf_393216.bin to dzextracted/laf_393216.bin
[+] Extracting factory_655360.bin to dzextracted/factory_655360.bin
[+] Extracting system_720896.bin to dzextracted/system_720896.bin
[+] Extracting system_984136.bin to dzextracted/system_984136.bin
[+] Extracting system_1249088.bin to dzextracted/system_1249088.bin
[+] Extracting system_1508424.bin to dzextracted/system_1508424.bin
[+] Extracting system_1512328.bin to dzextracted/system_1512328.bin
[+] Extracting system_1773376.bin to dzextracted/system_1773376.bin
[+] Extracting system_2032712.bin to dzextracted/system_2032712.bin
[+] Extracting system_2036616.bin to dzextracted/system_2036616.bin
[+] Extracting system_2297664.bin to dzextracted/system_2297664.bin
[+] Extracting system_2557000.bin to dzextracted/system_2557000.bin
[+] Extracting system_2560904.bin to dzextracted/system_2560904.bin
u[+] Extracting system_2821952.bin to dzextracted/system_2821952.bin
[+] Extracting system_3081288.bin to dzextracted/system_3081288.bin
[+] Extracting system_3085192.bin to dzextracted/system_3085192.bin
[+] Extracting system_3346240.bin to dzextracted/system_3346240.bin
[+] Extracting system_3608384.bin to dzextracted/system_3608384.bin
[+] Extracting system_3870528.bin to dzextracted/system_3870528.bin
[+] Extracting system_4132672.bin to dzextracted/system_4132672.bin
[+] Extracting system_4390912.bin to dzextracted/system_4390912.bin
[+] Extracting system_4653056.bin to dzextracted/system_4653056.bin
[+] Extracting system_4915200.bin to dzextracted/system_4915200.bin
[+] Extracting cust_6193152.bin to dzextracted/cust_6193152.bin
[+] Extracting cust_6455296.bin to dzextracted/cust_6455296.bin
[+] Extracting cust_6459544.bin to dzextracted/cust_6459544.bin
[+] Extracting BackupGPT_30776320.bin to dzextracted/BackupGPT_30776320.bin
and voila! u got your partitions
Click to expand...
Click to collapse
thks for this mate

why don't you use
WindowsLGFirmwareExtract
to extract kdz ?
and more important thing is
when we try to flash dz it wont flash
is there any themplate to create flashable zip ?

mlm1102003 said:
why don't you use
WindowsLGFirmwareExtract
to extract kdz ?
and more important thing is
when we try to flash dz it wont flash
is there any themplate to create flashable zip ?
Click to expand...
Click to collapse
why you need to flash DZ file when u have the KDZ :s
LGFirmwareExtract dont work with G3 KDZ files but it works fine with G2 KDZ files

ahmed534 said:
why you need to flash DZ file when u have the KDZ :s
LGFirmwareExtract dont work with G3 KDZ files but it works fine with G2 KDZ files
Click to expand...
Click to collapse
so after all
whats the point of the extracting ?
when we cannt flash dz (and there is not any themplate for making flashable zip ?)

mlm1102003 said:
so after all
whats the point of the extracting ?
when we cannt flash dz (and there is not any themplate for making flashable zip ?)
Click to expand...
Click to collapse
it is for extracting the partitions mate !

mlm1102003 said:
so after all
whats the point of the extracting ?
when we cannt flash dz (and there is not any themplate for making flashable zip ?)
Click to expand...
Click to collapse
ahmed534 said:
it is for extracting the partitions mate !
Click to expand...
Click to collapse
We can actually make flashable zips out of the extracted files using flash2 posted by Autoprime, which actually includes all this tools to extract kdz...
The G2 extraction tool with ui will work after extracting the dz and we can get system.img out of it... =)
Edit: There was actually another guide on the general section, but it's on the middle page closer to last page maybe, was posted long ago... =)

mlm1102003 said:
so after all
whats the point of the extracting ?
when we cannt flash dz (and there is not any themplate for making flashable zip ?)
Click to expand...
Click to collapse
http://forum.xda-developers.com/lg-g3/development/psa-stop-taking-ota-updates-update-t2909412
Manual OTA updates, in a word.
Split KDZ, split partitions of DZ, merge system partitions to make system.img/boot/.img/modem.img, then flash using FLASH2 files (from codefire) via TWRP (via Bump)

Ok, so I've done all of this. I'm getting only system.img after using WindowsLGFirmwareExtract. How do I get modem.img, is it simply a matter of renaming the modem*.bin to img?
Furthermore, is the generated system.img supposed to be approx. 2,5Gb in size?

thanks
i hope its work for other lg's kdz files

ahmed534 said:
Hello,
I was searching the web to get a solution to extract KDZ LG G3 firmware and finally I got a way to achieve it properly and easily and am sahring with the community.
1st of all thks and credits for @thecubed and @bullghost
Click to expand...
Click to collapse
Hi, please link to the Compressed KDZ File Tools thread where this came from.
As found in the header of the KDZ tools:
"""
KDZ File tools
by IOMonster (thecubed on XDA)
Please do not distribute without permission from the author of this software.
"""
Please do not redistribute the KDZ tools in your own package. They are already linked on Codefire please direct people there or to the original thread to download those.
Also, please fix screenshot/directions to use proper KDZFileTools.py command:
python KDZFileTools.py -f D85510L_00.kdz -s 0 (on OSX/Linux) or.. python.exe KDZFileTools.py -f D85510L_00.kdz -s 0 (on Windows)
-x is not used with the KDZFileTools.py .. it is used in the DZFileTools.py script when extracting the DZ into individual partitions:
python.exe DZFileTools.py -f kdzextracted/D85510l_00.dz -x for example.
All of these directions.. along with directions for merging the system files can be found in my manual update thread here.
Tolukolvi said:
Ok, so I've done all of this. I'm getting only system.img after using WindowsLGFirmwareExtract. How do I get modem.img, is it simply a matter of renaming the modem*.bin to img?
Furthermore, is the generated system.img supposed to be approx. 2,5Gb in size?
Click to expand...
Click to collapse
Yes, you can just rename *.bin to *.img. And yes, 2.5GB or so is about right for System partitions. Full size of System on your phone is about 3GB.
mlm1102003 said:
so after all
whats the point of the extracting ?
when we cannot flash dz (and there is not any template for making flashable zip ?)
Click to expand...
Click to collapse
no need to make any flashable zips! I have made zip files that easily flash untouched system.img, boot.img(kernel), and modem.img files... simply place my pre-made flash2 zip files on your sdcard along with the .img files and flash away. No need to repack zip files or create a flashable zip each time. My flash2 zips will work with any system, boot, or modem.img file you place on your /sdcard.
Check out my thread here - http://forum.xda-developers.com/lg-g3/development/psa-stop-taking-ota-updates-update-t2909412
The reason for promoting updating manually is to preserve root and Bump ability... in case LG tries to patch something in the future. New root methods are not likely to be made after Stump and PurpleDrake are patched... and depending on what LG does in the future with the bootloader updates... Bump could possibly be blocked forever.

Yes! This does indeed work. Took about 6-7 minutes to flash the system, but worked out just as the doctor ordered.

@autoprime thks mate for clarifying this. didnt knew it was codefire team scripts, I got them from a MEGA link I found on the net ! anyway I updated OP with new links and credits.
thks

ahmed534 said:
@autoprime thks mate for clarifying this. didnt knew it was codefire team scripts, I got them from a MEGA link I found on the net ! anyway I updated OP with new links and credits.
thks
Click to expand...
Click to collapse
All of which in his manual update thread as I mentioned in previous post... =)

Okay, so I've got my boot.img, modem.img and system.img, safe to flash all 3 using the FLASH2 stuff from Codefire? I've got a TWRP backup - will I loose anything/data/settings by flashing system.img or does it just update it?

Related

[TUTO] As unpacking a KDZ and a DZ [LG L7/5/3]

Tutorial in Spanish [TUTO] Como desempaquetar un KDZ y un DZ [LG E610 L5]
Click to expand...
Click to collapse
In LG phones L7/5/3 to opted for DZ format, if we unpack one ROM KDZ we find a CAB, and if you unzipped the CAB seems the DZ.
DZ files are tablets that can be flashed directly, and as always, you can unpack to extract the ROM in BIN format.
NECESSARY TOOLS
Unpack KDZ = LGExtract.exe by navossoc.
Unpack CAB = any decompressor, on Windows, eg. WinRAR.
Unpack DZ = DZDecrypt.exe DZ_Creator.exe by copsfrance
And of course a ROM format KDZ or DZ.
PROCEDURE
The first thing to do is to unpack the KDZ, so copy the file LGExtract.exe on the route where we have the ROM format KDZ and from the console (which previously must be located on the route of the ROM) type:
WINDOWS
Code:
LGExtract.exe -kdz V10X_xx.kdz
LINUX
Code:
wine LGExtract.exe -kdz V10X_xx.kdz
Click to expand...
Click to collapse
and you press Enter
NOTE
Where it saysV10X_xx.kdz must be the name of the ROM, for exampleV10A_00.kdz
When the process is complete will see a file with the same name as the ROM, but with the extension .cab, for example, V10A_00.cab
Unzip it and will the DZ and a DLL file
To unpack the DZ type this:
WINDOWS
Code:
DZDecrypt.exe LGE610AT-xx-VxxX-XX-XXX-xx-xx-20xx+x.dz
LINUX
Code:
wine DZDecrypt.exe LGE610AT-xx-VxxX-XX-XXX-xx-xx-20xx+x.dz
Click to expand...
Click to collapse
And you press Enter
NOTE
Where it saysLGE610AT-xx-VxxX-XX-XXX-xx-xx-20xx+x.dz should be the name of the DZ, for example:LGE610AT-00-V10b-EUR-XXX-MAY-23-2012+0.dz
We already have the ROM in BIN format, now you have to concatenate the files SYSTEM, so we use the console and...:
WINODWS
Code:
copy /b "system.img.ext4_
[*]" "system.img"
LINUX
Code:
cat system.img.ext4_* > system.img.ext4
Click to expand...
Click to collapse
And you press Enter and you can delete the files system.img.ext4_0, system.img.ext4_1,..., system.img.ext4_6 (version DZDecrypt.exe v1.0c+ does this job automatically)
Now we'll have a list like this:
Code:
amss.bin
boot.img
boot_logo.bin
emmc_appsboot.bin
oemsbl.bin
partition.bin
persist.img.ext4
qcsbl.mbn
qcsblhd_cfgdata.mbn
recovery.img
system.img.ext4
Click to expand...
Click to collapse
Files .ext4 are you can rename to .img and mount as one drive in Linux or WIndows with Winimage manipulate its contents
LINUX:
Code:
mkdir system
sudo mount system.img.ext4 system -oloop
To disassemble
Code:
sudo umount system
Click to expand...
Click to collapse
With this I believe that we have done, if something is missing or you have any questions to ask without fear.
very useful for stock rom modding... I was looking for this a month ago, so thanks man!
I cant open with WinImage my system.img extract from L3 e400 V10O_00.kdz
Ygreck said:
I cant open with WinImage my system.img extract from L3 e400 V10O_00.kdz
Click to expand...
Click to collapse
for .img (from .kdz) u have to use ext2explorer
google it or try this link
http://d-h.st/nRw
i've tried to add it as attachment but failed for unknown reasons.
All this procedure will not work for E435.
i've got 1gb .dz file but unable to extract it.
any ideas?
Sudeep Duhoon said:
... All this procedure will not work for E435.
i've got 1gb .dz file but unable to extract it.
any ideas?
Click to expand...
Click to collapse
Try this http://forum.xda-developers.com/showpost.php?p=38748031&postcount=43
Homero2 said:
Try this http://forum.xda-developers.com/showpost.php?p=38748031&postcount=43
Click to expand...
Click to collapse
i tried this, no change
Homero2 said:
In LG phones L7/5/3 to opted for DZ format, if we desempaquetamos one ROM KDZ we find a CAB, and if you unzipped the CAB seems the DZ.
DZ files are tablets that can be flashed directly, and as always, you can unpack to extract the ROM in BIN format.
NECESARY TOOLS
Unpack KDZ = LGExtract.exe by navossoc.
Unpack CAB = any decompressor, on Windows, eg. WinRAR.
Unpack DZ = DZDecrypt.exe DZ_Creator.exe by copsfrance
And of course a ROM format KDZ or DZ.
PROCEDURE
The first thing to do is to unpack the KDZ, so copy the file LGExtract.exe on the route where we have the ROM format KDZ and from the console (which previously must be located on the route of the ROM) type:
and you press Enter
NOTE
Where it saysV10X_xx.kdz must be the name of the ROM, for exampleV10A_00.kdz
When the process is complete will see a file with the same name as the ROM, but with the extension .cab, for example, V10A_00.cab
Unzip it and will the DZ and a DLL file
To unpack the DZ type this:
And you press Enter
NOTE
Where it saysLGE610AT-xx-VxxX-XX-XXX-xx-xx-20xx+x.dz should be the name of the DZ, for example:LGE610AT-00-V10b-EUR-XXX-MAY-23-2012+0.dz
We already have the ROM in BIN format, now you have to concatenate the files SYSTEM, so we use the console and...:
And you press Enter and you can delete the files system.img.ext4_0, system.img.ext4_1,..., system.img.ext4_6 (version DZDecrypt.exe v1.0c+ does this job automatically)
Now we'll have a list like this:
Files .ext4 are you can rename to .img and mount as one drive in Linux or WIndows with Winimage manipulate its contents
With this I believe that we have done, if something is missing or you have any questions to ask without fear.
Click to expand...
Click to collapse
yes
slarkpro said:
hi pro i have added root file into dz file now i join dz file and dll file via uptest marwin but have an error i don't undestand pls help me!!
Click to expand...
Click to collapse
Bạn bên tinhte.vn à:thumbup:
Gửi từ LG-Optimus L7 của tôi bằng cách sử dụng Tapatalk2
is there a kdz extractor for linux???
ensarman said:
is there a kdz extractor for linux???
Click to expand...
Click to collapse
afaik no
but as the thread explain you should use wine
I used it but my cellphone is a LG L3 II
and I cannot extract the DZ file. I cannot find how to extract my kdz : (
But the kdz updater software can do it but I don't know where that software extract the kdz
Homero2 said:
In LG phones L7/5/3 to opted for DZ format, if we unpack one ROM KDZ we find a CAB, and if you unzipped the CAB seems the DZ.
DZ files are tablets that can be flashed directly, and as always, you can unpack to extract the ROM in BIN format.
NECESSARY TOOLS
Unpack KDZ = LGExtract.exe by navossoc.
Unpack CAB = any decompressor, on Windows, eg. WinRAR.
Unpack DZ = DZDecrypt.exe DZ_Creator.exe by copsfrance
And of course a ROM format KDZ or DZ.
PROCEDURE
The first thing to do is to unpack the KDZ, so copy the file LGExtract.exe on the route where we have the ROM format KDZ and from the console (which previously must be located on the route of the ROM) type:
and you press Enter
NOTE
Where it saysV10X_xx.kdz must be the name of the ROM, for exampleV10A_00.kdz
When the process is complete will see a file with the same name as the ROM, but with the extension .cab, for example, V10A_00.cab
Unzip it and will the DZ and a DLL file
To unpack the DZ type this:
And you press Enter
NOTE
Where it saysLGE610AT-xx-VxxX-XX-XXX-xx-xx-20xx+x.dz should be the name of the DZ, for example:LGE610AT-00-V10b-EUR-XXX-MAY-23-2012+0.dz
We already have the ROM in BIN format, now you have to concatenate the files SYSTEM, so we use the console and...:
And you press Enter and you can delete the files system.img.ext4_0, system.img.ext4_1,..., system.img.ext4_6 (version DZDecrypt.exe v1.0c+ does this job automatically)
Now we'll have a list like this:
Files .ext4 are you can rename to .img and mount as one drive in Linux or WIndows with Winimage manipulate its contents
With this I believe that we have done, if something is missing or you have any questions to ask without fear.
Click to expand...
Click to collapse
Is there a way to get to the totc.cfg file and edit it?

[DUMP]F320k 20A 4.4 KDZ extract bin files

https://drive.google.com/file/d/0B0fHJKReV8fnN01ZMEN3bEtEa2s/edit?usp=sharing
Extracting tool:
KDZFileTools.py and DZFileTools.py
$ python DZFileTools.py -f F320K20a_00.dz -x
[+] Extracting all partitions!
[+] Extracting PrimaryGPT_0.bin to dzextracted/PrimaryGPT_0.bin
[+] Extracting modem_32768.bin to dzextracted/modem_32768.bin
[+] Extracting sbl1_163840.bin to dzextracted/sbl1_163840.bin
[+] Extracting dbi_165888.bin to dzextracted/dbi_165888.bin
[+] Extracting aboot_229376.bin to dzextracted/aboot_229376.bin
[+] Extracting rpm_231424.bin to dzextracted/rpm_231424.bin
[+] Extracting boot_262144.bin to dzextracted/boot_262144.bin
[+] Extracting tz_294912.bin to dzextracted/tz_294912.bin
[+] Extracting persist_393216.bin to dzextracted/persist_393216.bin
[+] Extracting recovery_458752.bin to dzextracted/recovery_458752.bin
[+] Extracting laf_622592.bin to dzextracted/laf_622592.bin
[+] Extracting system_917504.bin to dzextracted/system_917504.bin
[+] Extracting system_1181320.bin to dzextracted/system_1181320.bin
[+] Extracting system_1185432.bin to dzextracted/system_1185432.bin
[+] Extracting system_1445904.bin to dzextracted/system_1445904.bin
[+] Extracting system_1705608.bin to dzextracted/system_1705608.bin
[+] Extracting system_1709720.bin to dzextracted/system_1709720.bin
[+] Extracting system_1970192.bin to dzextracted/system_1970192.bin
[+] Extracting system_2229896.bin to dzextracted/system_2229896.bin
[+] Extracting system_2234008.bin to dzextracted/system_2234008.bin
[+] Extracting system_2494480.bin to dzextracted/system_2494480.bin
[+] Extracting system_2754184.bin to dzextracted/system_2754184.bin
[+] Extracting system_2758296.bin to dzextracted/system_2758296.bin
[+] Extracting system_3018768.bin to dzextracted/system_3018768.bin
[+] Extracting system_3278472.bin to dzextracted/system_3278472.bin
[+] Extracting system_3282584.bin to dzextracted/system_3282584.bin
[+] Extracting system_3543056.bin to dzextracted/system_3543056.bin
[+] Extracting system_3805200.bin to dzextracted/system_3805200.bin
[+] Extracting system_4067344.bin to dzextracted/system_4067344.bin
[+] Extracting system_4329488.bin to dzextracted/system_4329488.bin
[+] Extracting system_4591632.bin to dzextracted/system_4591632.bin
[+] Extracting system_4853776.bin to dzextracted/system_4853776.bin
[+] Extracting system_5115920.bin to dzextracted/system_5115920.bin
[+] Extracting system_5378064.bin to dzextracted/system_5378064.bin
[+] Extracting system_5640208.bin to dzextracted/system_5640208.bin
[+] Extracting system_5898240.bin to dzextracted/system_5898240.bin
[+] Extracting system_6160384.bin to dzextracted/system_6160384.bin
[+] Extracting system_6422528.bin to dzextracted/system_6422528.bin
[+] Extracting system_6684672.bin to dzextracted/system_6684672.bin
[+] Extracting system_6946816.bin to dzextracted/system_6946816.bin
[+] Extracting system_7208960.bin to dzextracted/system_7208960.bin
[+] Extracting system_7471104.bin to dzextracted/system_7471104.bin
[+] Extracting system_7472776.bin to dzextracted/system_7472776.bin
[+] Extracting BackupGPT_61070336.bin to dzextracted/BackupGPT_61070336.bin
Purpose?
Almost done.. Now extract the primary bin file for the system.img.
Sent from my GT-N7000 using xda app-developers app
bigfau said:
Purpose?
Click to expand...
Click to collapse
modem V20A zip CWM recovery install.....
https://drive.google.com/file/d/0B0fHJKReV8fndkN2SkhScm9XZGc/edit?usp=sharing
k25c2yf said:
modem V20A zip CWM recovery install.....
https://drive.google.com/file/d/0B0fHJKReV8fndkN2SkhScm9XZGc/edit?usp=sharing
Click to expand...
Click to collapse
What does it bring us?

[TOOL][SHARE] Boot.img tools (unpack,repack,ramdisk)

Note: I'm just sharing the work of the XDA Member CNexus.Here's a little introduction by him :
CNexus said:
I have not seen this posted anywhere, so I thought I would post it here. This is NOT purely my work, and I do not take credit for it as such.
Included in the attached ZIP are the following files:
boot_info - prints information about the boot.img passed to it, including the base address and ramdisk address. This tool prints out everything needed to repack the boot.img correctly.
split_boot - More commonly known as split_bootimg.pl, this rips apart the boot.img to extract the ramdisk and zImage. It has been modified by me to split the boot.img into a separate folder (specified by the file name of the boot.img passed to it) and to extract the ramdisk into a sub-folder as well (extracts the cpio from the gz and then extracts the actual files from the cpio archive)
unpack_ramdisk - unpacks the given ramdisk file.
Code:
Usage: unpack_ramdisk
repack_ramdisk - repacks the ramdisk from the given directory (found online and modified slightly to take a directory)
Code:
Usage: repack_ramdisk [outputFile]
mkbootimg - mkbootimg binary that creates a boot.img file from the given ramdisk and zImage. Updated to a version compiled by me to support the --ramdiskaddr option (ramdisk address) so that even nonstandard boot.img's can be repacked correctly (Use with boot_info for best results).
umkbootimg - included for convenience. Not made by me. Original thread here.
unpack - wrapper script made by me for the umkbootimg binary^ to unpack the boot.img into a separate directory and then unpack the ramdisk into a sub-directory.
Note: These tools were made for Linux. They may also work on Cygwin, but I have not personally tested them.
ANYONE is free to use / modify / kang these files as they see fit. No need to ever ask or do anything more than download.
Enjoy.
Click to expand...
Click to collapse
Download the required files from the original thread.
Original Thread : http://forum.xda-developers.com/showthread.php?t=2319018
1+
Sent from my GT-S5360 using Tapatalk 2

[Q]

hello
i want to create custom boot image.i am using cygwin bash shell and android kitchen.
i extract boot.img with Android Kitchen 0.194 Tools for boot images <unpack/re-pack/etc.>
it show like this
Working folder found
Kernal found at offset 2048 in boot.img
Making folder BOOT-EXTRACTED ....
Extracting kernal ...
Extracting ramdisk ...
Error : NO ramdisk folder found!
Press Enter to counting
How i solve Error:NO ramdisk folder found.
Are you have trouble extracting from the phone or extracting the .img file into something editable? I see at the top of the first page here that there is an update to the Kitchen. Maybe the newer version supports your phone better?

How to Unpack and Recompile system.img.ext4.lz4?

As the title suggests, is it possible to unpack and recompile the System.img.ext4.lz4 found within the stock system image? I'd like to poke around with stuff and see what happens. I know it probably won't accomplish anything but let a boy dream I can't fine any guides out there that work for this but hopefully a dev will bless me with his magic.
If you go to android software and hacking forum here on xda you might see what you're looking for. It's a devs section.
Nathamio said:
As the title suggests, is it possible to unpack and recompile the System.img.ext4.lz4 found within the stock system image? I'd like to poke around with stuff and see what happens. I know it probably won't accomplish anything but let a boy dream I can't fine any guides out there that work for this but hopefully a dev will bless me with his magic.
Click to expand...
Click to collapse
Use 7zip lz4 to extract img then mount img in Linux and then you can access raw system. I can extract and upload it for you if you want to give me the file name for the firmware.
VICosPhi said:
Use 7zip lz4 to extract img then mount img in Linux and then you can access raw system. I can extract and upload it for you if you want to give me the file name for the firmware.
Click to expand...
Click to collapse
If I mount it in linux can I modify it without having to write it to a new img? I tried mounting it and it won't work. Is there some special tool I need to install?
You extracted the xxx.ext4.lz4 to xxx.ext4 then again extracted xxx.ext4 to xxx.img using 7zip LZ4 before mounting to Linux, correct?
VICosPhi said:
You extracted the xxx.ext4.lz4 to xxx.ext4 then again extracted xxx.ext4 to xxx.img using 7zip LZ4 before mounting to Linux, correct?
Click to expand...
Click to collapse
I am also having an issue repacking the image as odin says invalid lz4.
I'm trying to but I get this error:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
I haven't tried modifying and repacking the file yet, but what I did was extracted the lz4 to ext4 and then ext4 to img using 7zip LZ4. Then I mounted the img in CentOS and copied the /system folder over to get it Deodexed. Someone posted the other day that you can repack an IMG file and just flash it as IMG without having to convert to EXT4 or LZ4 on an S8 with v2 bootloader. I don't think this has been tested on a newer or v3 bootloader like S9.
Micro-instruction for unpack lz4 formats
-Download lz4 programm in attach. Extract in any folder.
-Put in lz4 folder system.img.ext4.lz4
-Open CMD line for lz4 folder and write:
lz4.exe -d system.img.ext4.lz4 system.img.ext4
-wait
-Done. We have system.img.ext4.
Now we can unpack this with SVAImgUnpack or any tool
mahotlov said:
Micro-instruction for unpack lz4 formats
-Download lz4 programm in attach. Extract in any folder.
-Put in lz4 folder system.img.ext4.lz4
-Open CMD line for lz4 folder and write:
lz4.exe -d system.img.ext4.lz4 system.img.ext4
-wait
-Done. We have system.img.ext4.
Now we can unpack this with SVAImgUnpack or any tool
Click to expand...
Click to collapse
nope decoded but linux reader not work, svaimg not work is oreo
bleros said:
nope decoded but linux reader not work, svaimg not work is oreo
Click to expand...
Click to collapse
I just converted the S7 Oreo Image (BTU-G930FXXU2ERD5) on my debian linux machine. To convert the android sparse file to the raw ext4 image, both worked simg2img and SVAImgUnpack.exe.
Which step does not work? The lz4 decompression? Or the conversion of the android sparse file to an raw ext4 image? Or the reading of the raw ext4 image?
By the way, I'm wondering if the S9 image is using ext4 or f2fs. Maybe that is the problem.
wernerwa said:
I just converted the S7 Oreo Image (BTU-G930FXXU2ERD5) on my debian linux machine. To convert the android sparse file to the raw ext4 image, both worked simg2img and SVAImgUnpack.exe.
Which step does not work? The lz4 decompression? Or the conversion of the android sparse file to an raw ext4 image? Or the reading of the raw ext4 image?
By the way, I'm wondering if the S9 image is using ext4 or f2fs. Maybe that is the problem.
Click to expand...
Click to collapse
i treid on windows , s7 oreo , no worry i have tried on vmware machine with debian and superr kitchen work fine
End of day you will find out that once you modify the stock image, it's no longer "stock" and probably fail when you try to flash it. Integrity verification wont let you. Unless you OEM unlock and flash a custom recovery, which WILL certainly trip your knox. There is no way back. For now. (I hope.)
wernerwa said:
I just converted the S7 Oreo Image (BTU-G930FXXU2ERD5) on my debian linux machine. To convert the android sparse file to the raw ext4 image, both worked simg2img and SVAImgUnpack.exe.
Which step does not work? The lz4 decompression? Or the conversion of the android sparse file to an raw ext4 image? Or the reading of the raw ext4 image?
By the way, I'm wondering if the S9 image is using ext4 or f2fs. Maybe that is the problem.
Click to expand...
Click to collapse
i tried again work fine was my mistake first lz4 used then droped into svaimgunpack then ext4explorer :highfive:
mahotlov said:
Micro-instruction for unpack lz4 formats
-Download lz4 programm in attach. Extract in any folder.
-Put in lz4 folder system.img.ext4.lz4
-Open CMD line for lz4 folder and write:
lz4.exe -d system.img.ext4.lz4 system.img.ext4
-wait
-Done. We have system.img.ext4.
Now we can unpack this with SVAImgUnpack or any tool
Click to expand...
Click to collapse
Hi,
I used 7zip to decompress firmware downloaded from sammobile (s7 edge). But the boot and recovery img I got were boot.img.lz4 and recovery.img.lz4.
I used your tool to get the .img directly without going into .ext4. Did I miss something in the steps I took? Thanks
dknight178
Hi. This instruction I wrote for s8/s9 (+)
Their images in firmware have ext4 extension.
You're doing everything right.
dknight178 said:
Hi,
I used 7zip to decompress firmware downloaded from sammobile (s7 edge). But the boot and recovery img I got were boot.img.lz4 and recovery.img.lz4.
I used your tool to get the .img directly without going into .ext4. Did I miss something in the steps I took? Thanks
Click to expand...
Click to collapse
Only certain partitions , like system and userdata, will have images that include the ext4 extension. Possibly cache, as well. Basically just the main partitions that are always mounted and regularly interacted with when the system is booted up and running.
Nathamio said:
I am also having an issue repacking the image as odin says invalid lz4.
I'm trying to but I get this error:
Click to expand...
Click to collapse
The tar archives used by odin aren't the basic version that 7zip is capable of making,. You need to use an actual tar excutable, and include certain argument. On windows, your tar command should look something like this:
Code:
tar.exe --create --format=gnu -b20 --quoting-style=escape --owner=0 --group=0 --totals --mode=644 -f yourFW.tar boot.img.lz4 recovery.img.lz4 system.img.ext4.lz4 userdata.img.ext4.lz4
That would make a basic AP odin-ready tar package. Then just use md5sum to finish it off, though I don't believe its necessary Something like this:
Code:
md5sum.exe -t yourFW.tar >> yourFW.tar
move yourFW.tar yourFW.tar.md5
I attached d a zip with windows version of tar, md5sum, mv, and ls.
I f I want to make a flashable zip, what steps would I take to extract stock firmware to do so?
up
mahotlov said:
Micro-instruction for unpack lz4 formats
-Download lz4 programm in attach. Extract in any folder.
-Put in lz4 folder system.img.ext4.lz4
-Open CMD line for lz4 folder and write:
lz4.exe -d system.img.ext4.lz4 system.img.ext4
-wait
-Done. We have system.img.ext4.
Now we can unpack this with SVAImgUnpack or any tool
Click to expand...
Click to collapse
i had error
lz4.exe : The term 'lz4.exe' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ lz4.exe
+ ~~~~~~~
+ CategoryInfo : ObjectNotFound: (lz4.exe:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
hochocnua said:
i had error
lz4.exe : The term 'lz4.exe' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ lz4.exe
+ ~~~~~~~
+ CategoryInfo : ObjectNotFound: (lz4.exe:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Click to expand...
Click to collapse
wrong path and dont use powershell use cmd as admin

Categories

Resources