yashsingh1/xdaforums huggingface dataset:
[LG Optimus Black] pandaball:
Hi, just a quick note to say that .kdz extracting works for the .kdz for the P500, but the cab file contains a .dz file rather than a .wdb file so LGExtract crashes when it tries to extract this file. Changing the extension does not work. Using LGExtract 0.2.1.
[LG Optimus Black] SnegovikRZN:
For you:

http://xdaforums.com/showthread.php?t=453469
[LG Optimus Black] navossoc:
DZ file format isn't supported yet.

I'm with little time available these days, but I have plans to add it.

[]'s
[LG Optimus Black] Craptorman:
This is what I got extracted for LGAS855 (Ignite)

C:\LG_Extract>LGExtract -wdb AS855ZV2_27.S2_27.wdb AS855_WD_1_0_3_0.dll

Extracting:

WDB: AS855ZV2_27.S2_27.wdb

DLL: AS855_WD_1_0_3_0.dll

File: BIN\AS855ZV2_27.bin

File: CAL\LGAS855_NV_005.ini

File: NVMeta\AS855_NVMetaData_v006.csv

File: SCR\AS855ZV2_27.scr

File(s) successfully extracted!
[LG Optimus Black] E:V:A:
Excellent work! However, I am interested to know whether you can use this tool to extract the P925g modem firmware as well? Since I don't have access to such a phone here, I'd like to preferably have a (non-encrypted) firmware .bin file(s) or simply a memory dump from the modem "device". Usually this can be done with something like:

dd if=/dev/block/mmcblk0p8 of=/mnt/sdcard/part8.img bs=4096
[B]OR[/B]
# busybox cat /dev/block/stl3 > /sdcard/efs-stl3-backup.img
[B]NOTE[/B]: I don't know the proper devices to use for the P925G...

Why all this?

The reason is that I'm trying to improve the baseband modem documentation for the XMM6260. We need a memory map of the x-gold 626 processors and thus we need to compare several modem firmwares to better understand these undocumented features. This will also help the development community to solve some bugs and problems present in the LG/Samsung baseband.

For more info on what is going on see:

"[XMM6260][X-GOLD 626] Modem Specification / Documentation / Hack-Pack"

http://xdaforums.com/showthread.php?t=1483053

"[A][SGS2][Serial] How to talk to the Modem with AT commands"

http://xdaforums.com/showthread.php?t=1471241

---------------------------------------------------------------------------------

UPDATE: This tool worked great with the LG-P925G *.kdz files!
[LG Optimus Black] navossoc:
Sorry, but I can't help. I don't own this phone. I own a P970.

Maybe you can try find a KDZ file for P925 at the web and take a look.

Just to made clear, the tool doesn't extract the firmware from the phone, it extract from the kdz -> wdb files which are used for flash with the official LGMobile tool.

[]'s
[LG Optimus Black] juniorxdb:
Many, many, many thanks!!! My Optimus is now unbranded, no more TIM!!!! And Ginger 2.3.4 (20C)...
[LG Optimus Black] Ilko:
hey, following your method I wrote my own script to automatically clean files which are useless after extractions.

@echo off
title LGExtract

echo Extracting cab file
echo -------------------
echo.
lgextract.exe -kdz v20o_00.kdz
echo.
echo.
echo Extracting WDB/dll files
echo ------------------------
echo.
7za.exe e -y v20o_00.cab
echo.
echo.
echo Extracting binary files
echo -----------------------
echo.
lgextract.exe -wdb v20o.wdb lgp970.dll
echo.
echo.
echo Merging and cleaning
echo --------------------
echo.
del lgp970.dll, v20o.wdb, v20o_00.cab
ren "BIN" "V20O"
cd v20o
ren "LGP970_CP.fls" "0_LGP970_CP_.FLS"
copy /b "LGP970_AP[*].bin" "1_LGP970_AP.BIN"
del "LGP970_AP[*].bin"

echo.
echo.
echo -[ Firmware is now ready to be flashed via SmartFlash ]-
echo.
echo.
timeout 10

7za.exe is required (7zip standalone console)

> create new text, paste this code

> search/replace v20o by your desired version

> save file as AnyName.cmd

> put it in the same dir where the kdz file is located, as well as 7za.exe.

> run the script, enjoy.
[LG Optimus Black] adxgrave:
Do you have all the code for this program? Any plan to port it to linux?

Edit: sorry, forgot that it must use .dll file to function.
[LG Optimus Black] navossoc:
Another user ask me the same question.

I'd like to port the program, however, he uses the Microsoft Cryptographic Service Provider.

I don't know very well linux architecture, but I think it's functions exclusives from Microsoft, but I can be wrong, maybe exist something similar.

If you know something about programming in Linux, send me a PM.

[]'s
[LG Optimus Black] adxgrave:
I've some experience programming in linux but not an expert and I don't think this is possible too unless maybe if you program it in mono, just maybe but I'm not familiar with mono and some ppl in linux community try to stay away from it as far as they can. Another point is, it's like of low use in linux anyway because in windows this program can works with another LG tools which most of it (all?) run in windows. Example, you can run it together with official LGMobileUpdater and automatically generate the bin and fls file because if I remember correctly, the updater keep the .kdz file somewhere in AppData during the upgrade.
[LG Optimus Black] Keltek:
I think the Cryptographic Service Provider (CSP) is nothing more than interface for encrypt/decrypt using specified cypher. It can be replaced by Java Cryptography Architectur (JCA). It is the same with different name :) Also Linux offer similar cryptography interfaces.

There can be a limitations depends on used crypto algorithm but I should see the sources how can this be achieved.

For now, the Wine can do perfect job for us - Linux positive users :) so the native Linux binary is not too important now. Only if navossoc add some hypermegatotalultra feature which not work under Wine.
[LG Optimus Black] adxgrave:
Send him a pm. Maybe he can share the source. Having native binary won't hurt but I agreed it's a low priority.
[LG Optimus Black] navossoc:
You seems to be right, its just a interface for well know cypher algorithms and digests.

We can achieve the same effect with openssl (command line) from linux, that can be, converted into source code using their own files.

But, first I need to understand how to properly work with openssl, if anyone has experience at least with the command line, will be useful.

As you said, I don't have any plans to insert any non-complaint feature.

The code is pretty simple and straightforward, the only exception is the MSCP that I will try to replace later, including miniz by zlib.

I still have plans for this tool, but, this month I got exams in college, so I need to review some materials. :P

[]'s
[LG Optimus Black] Keltek:
navossoc :) don't worry about it and keep focus on your exams. I think it is way important than LGExtract tool.

As I said, now the native Linux binary is too much comfort for us.
[LG Optimus Black] _AngeL_:
Extractor KDZ

Hi everybody!

This is my first serious contribution to the Forum!!

Thanks to navossoc for make the LGExtract.exe and and thanks to Gunnme for the easiest explanation.

I have seen this afternoon's post Gunnme and I wanted to make an application for windows that automatize whole process and I did it, lol.

I hope you find it useful!

Requirements: Framework. Net 3.5 installed on your PC

http : // ul.to / o8nex9qu

Tell me your opinions!

PD: Sometimes it seems to be hang, but it is working. To see it in action keep open the folder where are you KDZ file and see what happend.

Greetings to all
[LG Optimus Black] Whammamoosha:
Works like a charm!

Really deserved a thanksmeter increase.

Cara, você é DUCARALHO! :cool:
[LG Optimus Black] nurulmac11:
successful with europa v20o lg ob.

I thinked it will be rooted. I was wrong.
[LG Optimus Black] no3id:
it works SU950, SU880, KU9500, LU6500, LU2300 's WDB.. thanks!!!

can you make decompressed bin to wdb tool?

that models does not exist 'model.dll' for smartflash..

kdz tool is only way to upgrade.
[LG Optimus Black] navossoc:
You wanna convert bin to wdb again?

I don't know how to do that, because some values in WDB files are unknown yet.

So I can't repack the file again with 100% certainty that will work or it will be valid.

[]'s
[LG Optimus Black] balabe87:
Hi navossoc, hope you are doing fine. First of all thanks to ur wonderful work to our community. Could you pls let us know the status of injecting custom recovery while extracting kdz. We are eagerly waiting for that feature. Take your own time. We are looking towards ur great work.
[LG Optimus Black] navossoc:
I got it done already, in a beta stage for P970.

I will try release it later.

[]'s
[LG Optimus Black] BigBoyPL:
Hi there. I have one question.

Does KP500 and KS360 .wdb's are totally diffrent than LGPXXX series .wdb's ??

I think that cause we have software called LGUtils in which you can extract .wdb for KP500, KS360 and other Infineon LG devices but it doesn't work with LGPXXX series. For DZ you can read this : http://www.frenchcoder.com/content/dzextract-lg-dz-file-format-and-extract-tool-lg-ks20

I've 1 more function for you. KP500, KS360 and other infineon series : If you unpack .wdb all files from wdb have a special infineon header in wchich there are Partition name, when start, when end etc. This header have always same size. In LGUtils it is function Cust.dfat to Cust.fat.

If you are interested I can send you some file.
[LG Optimus Black] jes0411:
I have developed a tool based in your LGExtract 0.2.1 that do the job automatically in a double click.

Explanation and download:

xdaforums.com/showthread.php?t=1692191
[LG Optimus Black] tonyp:
Does anyone know how to extract a single *.fls file from the KDZ for P990?

With this tool we'll get 4 different fls files which we have to flash one after another.

Paul from Modaco used to extract a single fls file - it has to be possible somehow..
[LG Optimus Black] PhoneM96:
Hi guys. I little modified a method of use this programme in Windows.

Instruction for P920 / P970 - bin/fls (Thanks to navossoc)

1. Move your KDZ file into the LGExtract folder.

2. Rename a KDZ to "soft.kdz".

3. Double-click on "extract_kdz.bat"

4. In this moment you have a *.cab file. Extract it with 7Zip or WinRAR or other programme in this type.

5. There you got a *.wdb file, *.dll file and other. You will need just this two files.

6. Rename a *.wdb file to "file.wdb", and *.dll file to "model.dll"

7. Double-click on "extract_wdb.bat"

8. You have extracted firmware.

9. To combine the bin file double-click on "combine_bin.bat". I dont know if it STEP works or not, I dont have a LG PXXX phone amd firmware for them.

Instruction for LG P990 (thanks to Keltek)

1. Do the same steps like in the P920 / P970 instruction to 7 point.

2. To combine file system double-click on "combine_filesystem.bat". I dont know if it STEP works or not, I dont have a LG PXXX phone amd firmware for them.

3. Enjoy!

;) Thanks to navossoc for the great tool! :) Btw. sorry for my english, it isnt good ;)
[LG Optimus Black] Pacos1:
Good Work!!!

2 posts over yours is a tool that make the same job for the P970 and P920 a little bit more comfortable.

For the P990 is your tool the joice!

Thank you for share!

And of course the biggest thanks to novassoc for giving us the possibility to extend the use of SmartFlashTool and of the making of this comfort tools. I’m curious of your new creations like the CWM-injector :-)
[LG Optimus Black] navossoc:
If you need something more friendly to use, try this:

http://xdaforums.com/showthread.php?t=1692191

This guys are doing a great job simplifying the use of the tool for those who are having difficulties.

About the CWM injector, I was taking a look at the code I had written.

Probably day 12 or 13 I can post a beta.

I think it will work with P920 too.

I am making additional security checks to avoid overwriting another partition.

[]'s
[LG Optimus Black] bliizzz:
For the P990 it extracts properly,combines to single system.img but there are 3 fls files which one to select for flashing using smartflash
[LG Optimus Black] tonyp:
Usually it are 4.

You need to flash all of them, from the largest to the smallest. Still trying to find a way to combine the fls files to a single one..
[LG Optimus Black] Keltek:
nevermind
[LG Optimus Black] Orcusen:
Hello, I have a problem when flashing files with SmartFlash, I do not complete and it gives me ERROR: "Magic Number does not concide"

This is the LOG of the flash:

00:00.0 Sec ownload Start...

00:02.0 Sec :RomBinary Download start

00:03.6 Sec :PSI RAM writing start

00:03.6 Sec :Trying to communicate with IFX modem

00:08.6 Sec :Confirm IFX communication

00:08.6 Sec :PSI RAM writing end

00:08.6 Sec :Start PSI RAM

00:08.6 Sec :EBL writing start

00:24.9 Sec :Start EBL

00:24.9 Sec :Set capabilities to be used

00:25.9 Sec :Baudrate Change: 115200bps ===> 3000000bps

00:25.9 Sec :Set flash ID complete

00:25.9 Sec :Set Infineon CFI Information 1

00:25.9 Sec :Set Infineon CFI Information 2

00:25.9 Sec :PSI Download start

00:26.0 Sec :Set FLASH address

00:26.2 Sec :PSI Download success

00:26.2 Sec :SLB Download start

00:26.3 Sec :Set FLASH address

00:27.8 Sec :SLB Download success

00:27.8 Sec :Aeneas Download start

00:28.4 Sec :Erase was executed rightly!

00:28.8 Sec :Set FLASH address

00:31.8 Sec :Aeneas Download success

00:31.8 Sec :Code Download start

00:32.2 Sec :Erase was executed rightly!

00:32.5 Sec :Set FLASH address

01:44.7 Sec :Code Download success

The checks I've done:

- KDZ is correct file (used on another PC with window 7)

- Reinstalling drivers

- Properly flashed and bin fls versions of other users and old

When I perform the conversion apparently everything is correct, the file size and the completion of the program is true.

The PC has been formatted to avoid failures of other reasons

anyone know what happens?

thanks
[LG Optimus Black] foxkat:
Nice avatar! :D

Sent from my DROID RAZR MAXX using Xparent ICS Tapatalk 2 with Google voice to text translation. Please excuse any minor spelling, punctuation, capitalization or grammatical errors.
[LG Optimus Black] navossoc:
Can you post the kdz file?

Which phone model you are trying to flash?

[]'s
[LG Optimus Black] Orcusen:
I have OPTIMUS BLACK and the error is with all kdz.

I've proven with the following versions: V20P, V20N, and V10B. (downloaded several times with KDZ ​​UPDATE flasheadas smoothly)

If you want I can upload a conversion of mine so you can see the files.
[LG Optimus Black] BigBoyPL:
navossoc I know how to pack it back. It's easy as pie ;]

But I've another problem. For phones with doesn't have android but it's qualcomm platform (GD880,BL40 etc.) if I unpack dz or wdb (EU and Korea) I always have cefs_apps.bin file.
[LG Optimus Black] navossoc:
You are getting the kdz from where?

Here? http://lg-phone-firmware.com/index.php?id_mod=1

Which country do you choose?

Are you sure that the country's is the same of your phone? maybe this is not the problem?

I got a P970 too, I have download BRA V20C and still working fine.

Maybe they changed something in .wdb container, but, I need to know what file exactly you are downloading.

Another possibility is that you are using the smartflash (the model.dll), have you check that?

Can you be more specific?
[LG Optimus Black] Orcusen:
Thanks for responding.

I,m from spain and kdz is from germany but i think is not the problem.

I am using this particular KDZ: http://csmg.lgmobile.com:9002/swdata/WEBSW/LGP970/ADEUTL/V20p_00/V20P_00.kdz

KDZ All I use are downloaded from that page and I have flashed with KDZ ​​update and have not had any problems.

If you want I can use another KDZ.

SmartFlash tool I have used several and have had the same problems ... which I have now is the UPGRADE KIT 3.7. ( http://xdaforums.com/showthread.php?t=1111771 )

I have also used ROM COVERTER 2.0 and gives me the same error when flashing: "Magic Number does not concide"

I can spend the files I created

Any other information necessary pídamelo and give it without problems.

I tried the same procedure with the same programs in WINDOW 7 and the result has been satisfactory.
[LG Optimus Black] navossoc:
Ok, I will take a look when I get some time.

Can you try first flash another kdz? preferably from spain, see if it works.

If it works, send me the link of kdz from spain (that worked) and I will compare with this from germany, to try find that "magic number".

Ah, if you attach a screenshot of the error too will be helpful :)

[]'s
[LG Optimus Black] BigBoyPL:
Tool from LG called UpTestEX or R&D Flash test tool (or KDZ_FW_UPD but deleted pack functions, only upload)can pack files back to .kdz . You need model.dll, all unpacked files etc. Than you can merge kdz.
[LG Optimus Black] Orcusen:
Okay, I have two versions:

- V20P.KDZ changed for me, giving me the error: ....

- V20P.KDZ transformed by another colleague and I can flash correctly.

I have also tried other software and the result has been the same.

In a while I upload the two files, the created successfully and gives me error.

Here are the files:

V20P_00 ERROR BIN+FLS: https://dl.dropbox.com/u/55697531/XDA/BIN+FLS_flash_error.rar

V20P_00 TRUE BIN+FLS: https://dl.dropbox.com/u/55697531/XDA/BIN+FLS_flash_true.rar

KDZ V20P ORIGINAL: http://csmg.lgmobile.com:9002/swdata/WEBSW/LGP970/ADEUTL/V20p_00/V20P_00.kdz
[LG Optimus Black] navossoc:
Just to be clear, your friend extracted using lgextract, right?

Seems that you could extract the files correctly, however, they are being merged in the wrong order.

Can you try extract it one more time? check the SHA1 hash for every file before you merge it.

LGP970_AP[0].bin - 7b361cb9f11977c1ba7ef2ca0a4b0bd161fbe2f6
LGP970_AP[1].bin - b323a1050821a6830902fb558d439013906cea1e
LGP970_AP[2].bin - 5cbfcd398a9769467138d454979abedaf5ea2260
LGP970_AP[3].bin - 96f8cf190569feb573fdb5d152450e2dcd96e1fe
LGP970_AP[4].bin - d3ac8764ed14b7c75ca330d14733d69a898e130f
LGP970_AP[5].bin - aab9b2650b9858b851dcfd6e7ec7e2aeb001ce00
LGP970_CP.fls - 785d642a0bc55a8b02b232fc730ee0a8507b7af9

If you don't have any tool to hash files, I recommend HashTab. After you install it, just see the properties of the file and there will be a tab named "file hashes".

How you are merging the files?

copy /b "LGP970_AP[*].bin" "LGP970_AP.bin"
LGP970_AP[0].bin
LGP970_AP[1].bin
LGP970_AP[2].bin
LGP970_AP[3].bin
LGP970_AP[4].bin
LGP970_AP[5].bin
1 file(s) copied.

Pay attention to the number order, it needs to be ascending.

The file LGP970_AP.bin must have the same hash:

5c88aec27b4d6d152c7542dad78b79ffefa14d45

Then it will work :)

The file that your friend has created has the correct hash.

[]'s
[LG Optimus Black] Orcusen:
Yes, that's the problem!!

I've done simultaneously process from my XP and from Windows 7 and Windows 7 file union is ascending (0,1,2, ...) while in XP union occurs Descending (5, 4,3,2 ...)

As might fix that? ... assumes that the process is done automatically and my knowledge is somewhat limited.

Thanks for your quick response and to find the problem!
[LG Optimus Black] navossoc:
Hi, you can try this...

copy /b "LGP970_AP[0].bin"+"LGP970_AP[1].bin"+"LGP970_AP[2].bin"+"LGP970_AP[3].bin"+"LGP970_AP[4].bin"+"LGP970_AP[5].bin" "LGP970_AP.bin"
[LG Optimus Black] navossoc:
Well, as I had promised my classes and exams are over (for now), so I'm on vacation.

I finished a small tool to use with the LGExtract.

This tool allows to replace the original recovery image by custom recovery.

Work for any phone that has a bin/fls and a recovery image with ANDROID! signature.

Tested models: P970 (ROM: BRA V20C with CWM Touch)

Supported models: P720, P940 (should work)

The program is still beta, but you should have no problems.

Usage:

recovery.exe xxx_AP.bin
recovery.exe xxx_AP.bin recovery-xxx.img 12345678 (hex)

For example: (search)

recovery.exe LGP970_AP.bin

The output should be something like this:

Searching for signatures...
Search complete, found 2 occurrences.

1 - 001A0000
2 - 00680000

You have two valid address to replace with a new recovery image.

In most cases, the correct value is the second address.

The first value is the address of the boot image.

The second value is the address of the recovery image.

I can not guarantee what is the correct address

Now you got the address, you can replace the recovery.

For example: (replace)

recovery.exe LGP970_AP.bin recovery-clockwork-touch-5.8.1.3-p970.img 00680000

This will replace the image found at address 0x00680000 with the clockwork touch recovery.

Now you can flash you firmware as always you do with bin/fls files, this make easy install su (root) with a custom recovery.

This software is beta, but don't worry, I did some security checks, such as:

Check the size of the original image to avoid overwriting other regions of the firmware.

Calculate sha1 of the original image to check if it's valid and not just a string.

Fill the original recovery with zeros to prevent any bugs (different file sizes).

I'm also using some code from libmincrypt (sha1) and mkbootimg for additional checks.

recovery.exe
CRC32: 99db9a34
MD5: e0809f5603e4c6ae07a6661f94aa4248
SHA-1: ac90e37a9ee39b52af85f2eada9c7b21c6343dd9
[LG Optimus Black] BigBoyPL:
LG CDMA Qualcomm .wdb have always inside partx.bin files and .fls file. How to decrypt it to get system partition ?
[LG Optimus Black] ilovelg4ever:
to flash at smartflash, there are one file: "model.dll which work for all models? eg p990/970/P940?

should i replace it (use eg P970.dll) for what the model i flash?
[LG Optimus Black] adiif1:
i have same problem please help me i have lg prada (p940)

please help me http://csmg.lgmobile.com:9002/swdata/WEBSW/LGP940/APOLBK/V10h_00/V10H_00.kdz
[LG Optimus Black] navossoc:
Check this:

http://xdaforums.com/showpost.php?p=27541011&postcount=104

[]'s
[LG Optimus Black] adiif1:
i have 7 file bin not 5
[LG Optimus Black] ilovelg4ever:
i have tested, for P940, Descending Way:

copy /b "LGP940_AP[7].bin"+"LGP940_AP[6].bin"+"LGP940_AP[5].bin"+"LGP940_AP[4].bin"+"LGP940_AP[3].bin"+"LGP940_AP[2].bin"+"LGP940_AP[1].bin"+"LGP940_AP[0].bin" "LGP940_AP.bin"

or Ascending way:

copy /b "LGP940_AP[0].bin"+"LGP940_AP[1].bin"+"LGP940_AP[2].bin"+"LGP940_AP[3].bin"+"LGP940_AP[4].bin"+"LGP940_AP[5].bin"+"LGP940_AP[6].bin"+"LGP940_AP[7].bin" "LGP940_AP.bin"

also get warning: Magic Number doesn't concide.

i think this phone has different file structure?
[LG Optimus Black] adiif1:
have same problem please help !!
[LG Optimus Black] navossoc:
Just merge 5 then...

The whole concept is the same.

[]'s
[LG Optimus Black] adiif1:
You know how to fix this error?
[LG Optimus Black] navossoc:
You should check the forum for P940 and ask about smart flash tool, I don't know if that tool is compatible with your phone.

[]'s
[LG Optimus Black] adiif1:
Except that there is no forum for this phone ..
[LG Optimus Black] carlsanderson1986:
.KDZ

If you are going to flash anything you flash a KDZ file ... you can get it in the prada 3.0 thread on this forum ...

http://xdaforums.com/showthread.php?t=1414775&page=12

Make sure you know how to flash your way home if it ****s your phone up.
[LG Optimus Black] aya114:
It is possible to open the .KDZ file for the LG PHONE F-160L also.But i have a problem.

After i extracted the .kdz and the .wdb, i cannot got the .bin file, I got a .tot file.... and now i stop here and cannot open it deeper,

can you tell me how to open the .tot file?

KDZ HERE:

http://csmg.lgmobile.com:9002/swdata/WEBSW/LGF160L/ALGTBK/V10f_00/V10f_00.kdz
[LG Optimus Black] BigBoyPL:
.tot file is used in USA models.
[LG Optimus Black] somboons:
Hi all,

Can we patch boot.img to LG970_AP.bin with LGExtract or something tools ?
[LG Optimus Black] navossoc:
I think you can replace boot.img, what do you have in mind?
[LG Optimus Black] sekhar13515:
Unable to convert kdz to bin file, plz give me solution, here no otpion to attach images, i will send images also for understanding

(i tried afternoon to convert files as a test, at that time worked & I injected CWM and deleted them), but now i need them I tried, but they are not converting

As u r online now, plz give me solution...I am waiting
[LG Optimus Black] jonno92:
OK So I downloaded a .kdz file and tried to use LGExtract and LG-P970 ROM CONVERTER but I end up with a .bin file (550MB) and a fls file (8171kb), but Smartflash is asking me for a DLL file and a .bin file.

Is there a way of changing the fls file to a BIN file or something? If not, how do I flash the fls using Smartflash?

Any help would be much appreciated as I'm very stuck on this one!!

Cheers