yashsingh1/xdaforums huggingface dataset:
[G2 Android Development] DannyBoy99:
Hello, I am attempting to use this tool together with the instructions in the recovery guide in the post below to restore my bricked LG G3 D855 UK Vodafone.

https://xdaforums.com/sprint-lg-g3/general/guide-fix-hard-brick-recovery-guide-t3132359

Unfortunatley I am not able to locate a *.tot file for my particular phone, only a *.kdz, hence using this tool to try and extract the image and skip step 6 in the instructions in the recovery guide.

I have done the following:

1. Followed instructions in the recovery guide steps 1-5

2. Installed and run the firmware extractor from this post

3. Opened *.kdz file, ticked the *.dz and *.dll files and clicked "Extract KDZ"

2. Open *.dz file, ticked all the *.bin files and clicked "Extract DZ"

4. I now have lots of *.bin files in a folder, including multiple cust_xxxxx.bin and system_xxxx.bin files. I wasn't sure whether I needed to merge any of these or not, so left them as they were:

aboot_167936.bin

BackupGPT_30776320.bin

boot_196608.bin

cust_6193152.bin

cust_6455296.bin

cust_6459544.bin

dbi_165888.bin

factory_655360.bin

laf_393216.bin

modem_32768.bin

persist_229376.bin

PrimaryGPT_0.bin

rct_350224.bin

recovery_294912.bin

rpm_172032.bin

sbl1_163840.bin

system_1249088.bin

system_1508424.bin

system_1512328.bin

system_1773376.bin

system_2032712.bin

system_2036616.bin

system_2297664.bin

system_2557000.bin

system_2560904.bin

system_2821952.bin

system_3081288.bin

system_3085192.bin

system_3346240.bin

system_3608384.bin

system_3870528.bin

system_4132672.bin

system_4390912.bin

system_4653056.bin

system_4915200.bin

system_720896.bin

system_984136.bin

tz_174080.bin

Then I tried jumping to step 7 in the recovery guide, using the folder full of *.bin files as the Target Dir, but I get the following error: "partition.txt does not exist. Please extract the file from the total binary image"

Can anyone advise whether I have done this correctly so far, and how I get the partition.txt file necessary to procede with the recovery?
[G2 Android Development] aagcnet:
<--- https://tvclip.biz/video/BmAuzbG9re4/how-to-make-a-firmware-lg-for-qpstqfil-tool.html follow this guy for the partition0.xml you will find the information needed to make a partition.txt there. the attached file may help you as it will be able to convert from a editable txt to the encripted txt of partition.txt. I dont remember the guide where i got this file!
[G2 Android Development] aagcnet:
Anyone knows a Way to MERGE the OP files inside the KDZ?
[G2 Android Development] DannyBoy99:
Thanks for this. I followed all the instructions in the YouTube video in your link, but this only shows me how to get the partition.xml, not the partition.txt. Was there a section that I missed?
[G2 Android Development] sizzle05:
Its Working............

Thanks Man!! :svetius:
[G2 Android Development] normanx:
All I need is a TOT file to be able to un-brick my ms631 g stylo that is in 9008 qualcomm mode, I have tried to get this app to extract the KDZ I have and it says its not a valid KDZ or TOT file. any help would be appreciated.
[G2 Android Development] Denversmartphone:
hello i try to extract kdz but when i do i get multiple PrimaryGPT file and multiple Backup file...why?
[G2 Android Development] Mesba1247:
"US998" firmware can be unpacked using this software
[G2 Android Development] dvgb173:
When I try to merge the system files, it does not output anything.

Any help?

Thanks.
[G2 Android Development] odicamillo:
Tried the last version (1.2.6.1) with a LG G7 kdz file and it is able to extract the .dz file.

Unfortunately you cannot extract anything from the .dz file because it says " Exception on extract partition file Ionic.Zlib.ZlibException: Bad state (incorrect header check) ..."

Ant chance to get the tool updated?

Thank you in advance ;);).
[G2 Android Development] Android-World-home:
How to convert .TOT file to .KDZ file?

How to convert .TOT file to .KDZ file?

if any one know please help:)

---------- Post added at 08:04 PM ---------- Previous post was at 07:57 PM ----------

simple :

How to convert .TOT file to .KDZ file
[G2 Android Development] weakNPCdotCom:
has anyone tested this on the G6? also, is it possible to repack a kdz for use in LGUP?
[G2 Android Development] odicamillo:
After further tests I can say that the tool is working on the G6 KDZs but also on some of the G7 KDZs. In other words it does not work systematically on every firmware file. So, as I asked before, the developer might improve it to make it reliable also for the new devices.

Do not understand why you want to repack the extracted modules considering that you extract to modify in some way the module and you can write it directly to your device without using lgup (at least this is my limited experience) ;).
[G2 Android Development] weakNPCdotCom:
Basically I want to create a KDZ for the h872 that has the H918 laf partition instead which can be flashed in LGUP to enable rooting without having to do several other dangerous steps.
[G2 Android Development] HueyT:
Can't seem to merge system.bin files together for KDZ 21b on US997 (LG G6). It can extract but can't merge. I need to merge system.bin files into system.img file to build a TWRP flashable zip for easier flashing. It acted like it merges but then the file is only 875 mb when it should be 5-6 gigabyte size. It worked on KDZ 20b but not 21b. This is using 1.2.6.1 LGfirmwareextract software

EDIT: Turns out it'll merge correctly IF I only extract the system.bin files (54 of them) and not extract the other files yet. Then I got the 6.2 gigabyte system.img file after merging all the system.bin files. Only then should I extract all the other-non-system files.
[G2 Android Development] zorack:
same here - the primaryGPT and PrimaryGPTbak is spilt in multiple parts, like PrimaryGPT_0.bin, PrimaryGPT_1.bin, PrimaryGPT_3.bin...

I need the complete PrimaryGPT_0.bin for loading in Qualcomnm tool.

KDZ is LG G5 (H830) 20a.

Is there a solution for getting only one PrimaryGPT_0.bin?

Thank You
[G2 Android Development] sandking707:
me too :) v30 brick
[G2 Android Development] BoxaS:
Is the program able to unpack the lgk format ??? It's in car android in kia. Maybe then you tell me how to unpack such a lgk format ???
[G2 Android Development] BiG_FooT:
Extraction of KDZ files worked on my LG G6 H870 until the August security patch release. For example I extracted the DZ file from the KDZ. From the DZ file I extracted the Boot.img to patch it with Magisk and obtain Root.

Sadly enough the latest KDZ format (for LG G6 H870) changed a bit. I can extract the DZ file but the DZ file cannot be handled. Just like the guy above this message I get an error message that the file cannot be read.
[G2 Android Development] weakNPCdotCom:
Do a search for Windows LG Firmware Extract. I have been using it to extract KDZs for the G6 and V30 for 6 months now, including the latest KDZs from November. It even merges the system sparse chunks into a system image. works great
[G2 Android Development] BiG_FooT:
@bullghost First thanks for this tool, really handy to extract the boot.img from the DZ file inside the KDZ. My device is a LG G6 H870 international.

Question; LG changed the DZ files as I could extract the Boot.img files from the KDZ with August security patch. Latest KDZ with Nov. security patch is giving the following error in Firmware Extractor v1.2.6.1 release.

Do you think you could update the tool to support latest KDZ files format? Thanks!

Error message:

Exception on read DZ file System.FormatException: Input string was not in a correct format.

at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)

at System.Number.ParseUInt32(String value, NumberStyles options, NumberFormatInfo numfmt)

at WindowsLGFramwareExtract.Form1.DZContentInfo.mappingPropertyG5(Byte[] bytes, Int32 idx) in L:\Working_PROJECT\WindowsLGFramwareExtract\WindowsLGFirmwareExtract\Form1.cs:line 2132

at WindowsLGFramwareExtract.Form1.byteArrayToDZContent(Byte[] bytes, Int32 idx) in L:\Working_PROJECT\WindowsLGFramwareExtract\WindowsLGFirmwareExtract\Form1.cs:line 2453

at WindowsLGFramwareExtract.Form1.readDZFile() in L:\Working_PROJECT\WindowsLGFramwareExtract\WindowsLGFirmwareExtract\Form1.cs:line 2634

byte read position 4

header 32-96-18-74

byte read position 0

DZ file D:\ANDROID\LG G6 H870\WindowsLGFirmwareExtract-1.2.6.1-Release\H87020g00.dz

---------- Post added at 08:04 PM ---------- Previous post was at 07:51 PM ----------

Thanks for your quick reply. I use Firmware Extractor v1.2.6.1 release. With lastest November KDZ I can extract the DZ file. But extracting files from the DZ files force closes the tool. See error message below:

Error message:

Exception on read DZ file System.FormatException: Input string was not in a correct format.

at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)

at System.Number.ParseUInt32(String value, NumberStyles options, NumberFormatInfo numfmt)

at WindowsLGFramwareExtract.Form1.DZContentInfo.mappi ngPropertyG5(Byte[] bytes, Int32 idx) in L:\Working_PROJECT\WindowsLGFramwareExtract\Window sLGFirmwareExtract\Form1.cs:line 2132

at WindowsLGFramwareExtract.Form1.byteArrayToDZConten t(Byte[] bytes, Int32 idx) in L:\Working_PROJECT\WindowsLGFramwareExtract\Window sLGFirmwareExtract\Form1.cs:line 2453

at WindowsLGFramwareExtract.Form1.readDZFile() in L:\Working_PROJECT\WindowsLGFramwareExtract\Window sLGFirmwareExtract\Form1.cs:line 2634

byte read position 4

header 32-96-18-74

byte read position 0

DZ file D:\ANDROID\LG G6 H870\WindowsLGFirmwareExtract-1.2.6.1-Release\H87020g00.dz

Anny suggestions?
[G2 Android Development] weakNPCdotCom:
Hang tight, ill zip up the app i use and post a link for you

---------- Post added at 07:24 PM ---------- Previous post was at 07:15 PM ----------

@BiG_FooT Here is the version I have been using. I have only worked with T-Mobile KDZ files, so I guess there is a chance other vendors have made some structural changes to the DZ files... but I literally used this on Friday for the latest V30 H932 KDZ.

*edit: I also have a copy of 1.2.6.1 and it works fine for the KDZ's ive been working with...

Have you tried downloading the KDZ again? I'm wondering if yours might be a corrupted/incomplete download
[G2 Android Development] BiG_FooT:
Thanks for sharing this link!:good:
[G2 Android Development] love edition:
How to extract file KDZ LG G7 and V35 ?:confused:
[G2 Android Development] cancunia:
Hi, what version of Windows does this need? I tried it on WinXP but the program doesn't do anything. Maybe there are dependencies?

I saw a post about Python earlier, is there a Python version? I normally use Ubuntu so Python would be better.

Thanks
[G2 Android Development] cancunia:
I tried W7 and the extract tool works, am still not sure what's up with WinXP.

I've merged the system files & mounted them but the /cust folder is missing so I'm guessing it's in one of the other .bin files. Is there a way to view the .bin files? I tried renaming to .img but but no luck.

Thanks
[G2 Android Development] WANTEDJAAT:
ROOT TOT

have a tot file of LG V10 ,

Could we root the tot file after splitting or by any other method?

Please suggest any idea..!!

Thanks
[G2 Android Development] Yagami10:
Help LG L3

Hello, I have a LG L3 (E400f) that the PC detects as Qualcomm HS-USB QDLoader 9008, I read some methods to revive it but I do not extract the. KDZ, use LG Firmware Extract 1.2.6.1 But I get the error: "Not a KDZ or a TOT File

BYTE read GPT position 1052680

Found in TOT Header POS FF-78-A1-B5-AC-D0-12-71

BYTE read position 1052672

BYTE read GPT position 1049096

Found in TOT Header Pos 9e-E6-61-2b-0B-1a-8b-05

BYTE read position 1049088

Not a KDZ file found in KDZ Header POS D8-17-ba-ba-6b-C6-D7-59

BYTE read position 0 ".. Any help?
[G2 Android Development] Miustone:
Facing the same here with the latest LG V50 Firmware. I can extract the KDZ to a DZ File, but the DZ File will not extract correctly. I tried extracting File by File but that doesn't helped. Well, the thread got the last Update around 2016 and is lastly supporting the G5. But i wonder if there is something i can do now to get the Firmware extracted.

It's much more easy on other Devices...
[G2 Android Development] SpikeyPsyche:
From what I understand it has to do with a new compression scheme that is being used for the KDZ files by LG. It's also the reason why LG UP 1.14 is failing with certain KDZ's, it's too old to understand the new compression.
[G2 Android Development] pcwizzy37:
I only see a Wintrash version, is there a Linux version available, or source code?
[G2 Android Development] Wolf_Link115:
LG G6 Multiple PrimaryGPT.bin and BackupGPT.bin files?

I have 7 PrimaryGPT.bin files and 7 BackupGPT.bin files. is there a way to combine them?

if so, please help.. the windows 10 copy /b command doesn't work for me.
[G2 Android Development] Tần Quảng:
V20 with Android 9 when using version 1.2.6.1, extracted from .dz file, I get the file system.img_XXXX instead of system_XXXX.bin as before. Is LG changed or is it a problem tool?
[G2 Android Development] Parasol_Monsters:
An update for this and generally for people trying to use this on newer kdz files.

I was unable to correctly merge G710N20f_00_LGU_KR_OP_0308.kdz, a file that I could at some time in the past.

I was probably a Windows 10 update, after configuring WindowsLGFirmwareExtract.exe to run in Windows 7 compatibility mode it worked again.

I will test some newer files to see if they work too.

Be advised that before using the Merge System-bin you need to manually rename (you should use a file rename tool for this) all system_*.* files to the correct format.

so:

system_1.img_593670 should become system_593670.bin

system_2.img_594464 should become system_594464.bin

and so on.
[G2 Android Development] Phantom Thief:
This worked flawlessly for me. Thanks!
[G2 Android Development] Tom_usborne:
Thanks
[G2 Android Development] Tigerevo:
Hi Im new to flashing LG and MTK . Im trying to root LG Stylo 6 and downloaded this program and it extracted a downloaded unlocked firmare flawlessy. Was hoping to flash some magisk patched boot images since bootloader is locked . So how do you write it directly to your device without LGUP ? SP Flash tool says I need a DA file for my device since secure boot . LG UP says the Laf protocol doesnt match device . Any help would be great . Oh how to extract my current rom incase I need to flash in case of boot loop or something ?
[G2 Android Development] Remdale:
Hi. I'm trying to extract PrimaryGPT_0.bin from LGV31 (Japanese version of LG G3), but the file is taking up all free space. I have even used an empty 6TB hard drive, but the whole space got occupied and I got an error in the tool at the end saying there's not enough space.

bullghost, do you have any idea as to why this could be happening?
[G2 Android Development] Vipersla:
Hi peeps I am getting this when using LG Extractor

Exception on extract partition file Ionic.Zlib.ZlibException: Bad state (incorrect header check)

at Ionic.Zlib.InflateManager.Inflate(FlushType flush)

at Ionic.Zlib.ZlibCodec.Inflate(FlushType flush)

at Ionic.Zlib.ZlibBaseStream.finish()

at Ionic.Zlib.ZlibBaseStream.Close()

at Ionic.Zlib.ZlibStream.Dispose(Boolean disposing)

at System.IO.Stream.Close()

at WindowsLGFramwareExtract.Form1.DZExtractBackprocess.extractDZFlle(ArrayList contents) in L:\Working_PROJECT\WindowsLGFramwareExtract\WindowsLGFirmwareExtract\Form1.cs:line 464

does anyone know how i can fix this.
[G2 Android Development] 01000010:
Same error on the latest LG V510N firmware
[G2 Android Development] lehmancurtis:
Look into lk2nd. Not sure it will help but you are going to need an unlocked bootloader.
[G2 Android Development] don'tbrickit:
Did you ever figure this error out?
[G2 Android Development] CXZa:
This tool is a bit outdated nowadays. Instead there is a bunch of python scripts that can or cannot work depending the kdz type. + some tools for really old ones... + there is some kdz files that are either really exotic ones or just somewhat errours... and those one just can try extracting them "by hand"...
[G2 Android Development] don'tbrickit:
okay. Hovatek seemed to extract correctly but now my phone not responding to EDL. May have to open it up since the battery is dead now
[G2 Android Development] farhanito:
I see.

I was thinking possibilities of using LG backup to transfer/sync data across devices [non-LG].

Would be great for non-rooted users.

Thanks again
[G2 Android Development] bullghost:
no it was different, but i found hshen was able to extract the system image, as his previous post he said he success join and mount the system image here,

iam was asking him just awhile ago hope he have a clue.
[G2 Android Development] somboons:
can you make tot file?
[G2 Android Development] vandieutot:
D802 not extract all system V10E
[G2 Android Development] orbitman000:
has this been tested with Sprint ZVA update? in other words, can a ZVA .tot be extracted with this?
[G2 Android Development] BaCkkk:
guyz i need tot of lg vu3 f300l..can i do with this>>>????
[G2 Android Development] isimobile:
How do I extract any other file other than system, say the boot_xxxxx.bin file?

Meaning I have the boot_xxxx.bin file, now I want to extract the bin file. I tried to mount as a ext2 but it is not working.
[G2 Android Development] mistermidas:
I was about to ask this same question.
[G2 Android Development] slackwaresupport:
where is the download for the kdz file for D800???? all i can find is tot files.
[G2 Android Development] riccardoro:
I've tried many .kdz to extract .dz and .dll, but lg flashtool gives me the error failed previousload ().

How can I do?
[G2 Android Development] honentan:
i got same error.

vs980 12b
[G2 Android Development] Masoud.ebi:
For me extracted D802 10E DZ files got error failed previousload (). why ???
[G2 Android Development] Gobigob:
I cannot thank you enough for this. It is the only thing that worked!!
[G2 Android Development] mor_1228:
how to extract modem from my rom or kdz file ? i already extracted dz file also but its .bin file then extracted with 7z but there no img file
[G2 Android Development] bender_007:
Rename modem.bin to modem.img
[G2 Android Development] mor_1228:
I have a zip file of modem should I just replace in that zip file and flash?
[G2 Android Development] bender_007:
If you refer to a flashable zip file with modem.img inside, then yes.
[G2 Android Development] mlm1102003:
is there anyway to make tot files ?
[G2 Android Development] mor_1228:
should i simply rename this ?
[G2 Android Development] bender_007:
Yap.
[G2 Android Development] casanovg:
Hi folks, can I extract, for instance, modem.bin or recovery.bin from a stock .tot with this tool and make a flashable zip for cwm to restore stock versions of them individually? If it is possible, how do I make a flashable .zip starting from the .bin files? Thanks!
[G2 Android Development] mor_1228:
yes u can just download my files and replace with ur files simple

this for modem

http://xdaforums.com/showpost.php?p=52406090&postcount=391
[G2 Android Development] casanovg:
I'll try it, thank you!
[G2 Android Development] casanovg:
One more question, what tool/s do you use to produce the flashable zips, what do you suggest me? thanks!
[G2 Android Development] p.valenta:
Take a look at this thread: How to make your own KitKat ROM with Root+TWRP from KDZ

This will give you nice guide and idea how to do it. ;)
[G2 Android Development] casanovg:
Thank you!
[G2 Android Development] gamal001:
can any body explain me how I can open system.img and convert to odex ?
[G2 Android Development] bender_007:
-Diskinternals linux reader, etc..

-VTS
[G2 Android Development] cooudys:
help please

Hello, please how can I find the file. TOT phone? Everything I do as instructed, but I do not know where to take tot file. I looked where I could and still nothing, can you please advise me to be mobile again? The first three points go to me, but then I've wasted I finished it. Thank you very much, it is quite important: (
[G2 Android Development] bender_007:
For what variant ?
[G2 Android Development] cooudys:
I'm sorry, this is the mobile phone LG G D955 Flex version 10a Europe (t-mobile)
[G2 Android Development] bender_007:
THIS thread might be more helpy.

+

http://csmg.lgmobile.com:9002/csmg/b2c/client/auth_model_check2.jsp?esn=your_imei

put your imei instead of "your_imei" and paste into browser ..

It should show you the download link.
[G2 Android Development] 2nd Sky:
can u support Optimus G (e975/f180K/S/L)? Thanks

Great tool!
[G2 Android Development] gamal001:
Thank you too much .

I extract system.img and modified some files but any way to explain how repack files to system.img . please ?
[G2 Android Development] gamal001:
any developer can give me suggestions...
[G2 Android Development] spdwiz18:
Not 100% sure. But, and ill look into it after work today, You should be able to to use an ISO maker (ultraiso, the only one that is coming to mind at 5 am) to remake the IMG file. Or if you are using linux , there is a command, but again getting ready for work and cant think yet at 5 am. Sorry. I'll be back after work.
[G2 Android Development] feuillearouler:
Hi,

Don't work on G Pro F240L .kdz file...got this message at the beginning :

An idea ?

Ty
[G2 Android Development] feuillearouler:
Have someone a link to TOT file for F240L ? (I didn't find it on the internet)...

Ty
[G2 Android Development] asialove2013:
hello

Use a winhex to open the kdz file, check the header information
[G2 Android Development] feuillearouler:
Thank you for answer...

But I don't find neither byte "read position 1049096" nor "header 20-20-20-20-7C-20-44-65".

The position does not exit in kdz file....
[G2 Android Development] asialove2013:
show me the screnn shot of winhex

When you open the kdz file with WinHex, show me the screen sshoot..

(

The bytes start from offset 000000000 , for example, You should see the dz file name. 28 05 00 24 38 22 25
[G2 Android Development] feuillearouler:
I have to screenshot all the hexa or just the beginning (from 00000000 to 00000360) ? All the hex take more than one hour to export to rtf file...:confused:

Edit I add screenshots
[G2 Android Development] asialove2013:
00000000 to 00000360

00000000 to 00000360
[G2 Android Development] feuillearouler:
Done on previous post :)
[G2 Android Development] asialove2013:
wait

saev this 28 05 00 00 24 38 22 25

go http://xdaforums.com/showthread.php?t=2483250 dowload the orgianl extract tool (python)

edit the KDZFileTools.py change the header info string to 28 05 00 00 24 38 22 25

run the KDZFileTools.py to extract your kdz.. If you can extract only to dz and DLL and then use the tool in this thread to extract dz file

---------- Post added at 01:04 PM ---------- Previous post was at 01:01 PM ----------

You need to download and install Python27 on your PC too.
[G2 Android Development] feuillearouler:
Thank you.

I have edited KDZFileTools.py with winhex...

But when you say "run KDZFileTools.py to extract kdz" what do you mean ? I tried with cmd as admin or with the exctractor tools..but nothing..

Could you explain please ?
[G2 Android Development] asialove2013:
do you have py 2.7 installed?

do you have py 2.7 installed?
[G2 Android Development] asialove2013:
see attached

I have attached the tool,
[G2 Android Development] asialove2013:
see attached

See attached file.

Also you need to install py2.7 on your PC to run this file
[G2 Android Development] feuillearouler:
Well....I have to say...oups ;)...

Now python 2.7 is installed (on win 7) ....It looks hard, doesn't it ?

Itry something...but nothing run :silly:
[G2 Android Development] asialove2013:
do this

go dos command prompt

go the folder where your kdz file is located in, copy the tools i send you to that folder

then run KDZFileTools.py -f your-kdz-file-name -x