[TOOL] LGExtract 0.2.1

Search This thread

navossoc

Senior Member
Jul 1, 2011
185
234
São Paulo
[TOOL] LGExtract 0.2.1 + 0.3.0 (beta)

Updated instructions will be here in post #1 or #2, stay alert ;)

Description:
Hello everyone, in the last two weeks I was developing a command line tool to extract the firmware of LG phones. (different models)

For now, this tool is able to successfully extract *.kdz and *.wdb files. The tool don't dump the firmware from the phone.

I would like to receive feedback about this tool, if it works or not with the files you have.
Please report any kind of error too.

Remember, this software aims to help the community of users of mobile phones from LG to change their roms in a fast and easy way.
I can't provide any guarantee that the extracted file is 100% correct. So stay tuned in what you are doing, don't blame me.


Basic usage:
  • Open a command prompt. (cmd.exe or powershell)
  • Browse to the directory where is located the LGExtract.
  • Run LGExtract for more information (help).

Guides: (more detailed)
  • P920 / P970
  • P990 - Thanks Keltek
  • Other phone models have different files. I don't have any idea on how you can use it! BE CAREFUL!

Automated tools: (based on LGExtract)

Other tools: (to use with files extracted by LGExtract)

Current features:
  • Extract KDZ files.
  • Extract WDB files.

Features to be implemented:
  • Merge extracted files automatically. (if file needs it)
  • Graphical User Interface.
  • Extract DZ files.
(none of these, sorry, the development is dead)


Note: You don't need install any additional software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

LGExtract.exe 0.2.1 - Hashes:
SHA-1: 2ef469162aa546ec7c1368d45bcbd0affd86e474
SHA-256: fa54a755a0aa2b15b622e44a183c491885a79ecf02d799c42c733e429dd16c3d

LGExtract.exe 0.3.0 BETA - Hashes:
SHA-1: e108c9e7d17b40d33152332d3e1775fd4aa48b92
SHA-256: ca66781f98498b80f59398a5c4538589262a1716d0788b18cea62e99c6eac5dc
 

Attachments

  • LGExtract-0.2.1.7z
    71.5 KB · Views: 106,447
  • LGExtract-0.3.0BETA.7z
    82.9 KB · Views: 1,190
Last edited:

navossoc

Senior Member
Jul 1, 2011
185
234
São Paulo
Thanks to:

Extracted KDZ/WDB from: (tested models)
KP500, KS360, LGP500, LGP920, LGP925 (confirmed by E:V:A)
LGP970, LGP990, LGP999, LU620128, SU640, SU660 (confirmed by kitty's_daddy)
Should work with any kdz/wdb file.

Changelog:
03/03/2020 - 0.3.0 BETA
* Fixed wdb password for larger dll files (up to 9.999.999 bytes).
(I was adding support for the DZ format, but I gave up, this tool seems no longer relevant.)

31/03/2012 - 0.2.1
* Improved error handling for kdz format.
* Fixed cryptographic service initialization failed.

28/03/2012 - 0.2.0
* Second release, extract wdb files.
26/03/2012 - 0.1.0
* Initial public release, extract kdz files.

Supported Operational Systems:

Windows:
Windows XP SP3 x86 (confirmed by kitty's_daddy)
Windows 7 SP1 x86/x64
Windows 8 x64 (confirmed by johnw230873)
Windows 8.1
Windows 10
Should work on other versions of Windows too.

Linux:
Red Hat Enterprise v6.2 x64 with Wine v1.4 i686 (Reported by Keltek)
Should work on other linux distributions too with Wine.
 
Last edited:

megaurs

Senior Member
Dec 13, 2010
69
10
Bucharest
Hi navossoc,

Just tried your tool - extracted V20o kdz to a cab file, containing lgp970.dll and v20o.wdb

1 suggestion / 1 question ;)

- would be nice to have a graphical interface, instead of command line

- what to do with the wdb file ?


Ok, another tiny suggestion - how about trying teamwork with the other devs and create a super flash/backup tool, that can backup a phone via PC and flash stock/custom ROMs, while providing a choice of what packages from the ROM to flash

Congrats for the software
 

Huexxx

Senior Member
Jul 21, 2009
1,711
4,865
44
Madrid
If this tool is only intended to extract .wdb file from .kdz it makes nothing new... I archieved this a lot of time ago but is useless.
 

navossoc

Senior Member
Jul 1, 2011
185
234
São Paulo
nothing happens when I try to run it, even if I put it in a same dir where a fw is.

Did you tried run something like:
LGExtract -kdz file.kdz

What is your operational system?

What if you drag and drop over the app icon?

I'm not at my PC so i can't test this.

Trolling in the deep

Yeah, it's on my plans, for now I wanna extend the support first.

Hi navossoc,

Just tried your tool - extracted V20o kdz to a cab file, containing lgp970.dll and v20o.wdb

1 suggestion / 1 question ;)

- would be nice to have a graphical interface, instead of command line

- what to do with the wdb file ?


Ok, another tiny suggestion - how about trying teamwork with the other devs and create a super flash/backup tool, that can backup a phone via PC and flash stock/custom ROMs, while providing a choice of what packages from the ROM to flash

Congrats for the software

1. I agree, I will in future.
2. If you extract wdb files you got the .bin and .cps file! Yeah!!!! You can flash it directly with smart flash tool.


If this tool is only intended to extract .wdb file from .kdz it makes nothing new... I archieved this a lot of time ago but is useless.

How can you say that? we can flash you p970 with smart flash tool as-is and root in seconds in with this tool (properly finished!)

I need go now, I will post more details later.

Who is having errors, please, more details, operational system?

[]'s
 

Huexxx

Senior Member
Jul 21, 2009
1,711
4,865
44
Madrid
If that's correct, then I retire what I've said...

Can U extract .bin and .fls from .wdb file?
 

scamex

Senior Member
Feb 8, 2011
191
42
@navossoc

Look into my Mediafire ShareFolder maybe you`ll find some source code into those programs leaked from LG india website.
 

omr911

Senior Member
Sep 20, 2011
381
1,501
Did you try LG Utils ?
It can extract wdb and kdz both.
I'm having problem while extracting .wdb bcoz it asks for FW ver. and dont know which ver I have maybe someone else knows his FW ver so he'll be able to successfully extract wdb
 

Sephirothrx7

Senior Member
Mar 10, 2009
243
96
SANTO André
Did you try LG Utils ?
It can extract wdb and kdz both.
I'm having problem while extracting .wdb bcoz it asks for FW ver. and dont know which ver I have maybe someone else knows his FW ver so he'll be able to successfully extract wdb

LG utils cant extract the new wdb, even if you pass the correct fw version. The dll that come in the new kdz files dont have the needed functions that lg utils use. And the kp500 dll obvously cant be used to extract other wdb files.

Sent from my LG-P500h using Tapatalk 2 Beta-4
 

navossoc

Senior Member
Jul 1, 2011
185
234
São Paulo
If that's correct, then I retire what I've said...

Can U extract .bin and .fls from .wdb file?

Yes, I can, but just as I said, I need a little more time to do all the error handling at the code. I don't wanna brick anyone phone.

I successful extracted the .wdb from LGP970 and got a .bin and a .fls file.
Then I used the SmartFlash Tool and flashed it at my phone. Works perfect.

The sha1 I got from the file was the exactly same as the "leaked" V10b-724-xxx bin/fls that we got available on the web.
I can extract any version, v10a, v10b, v20a, v20b, whatever ;)

You can get any kdz from here and extract it to bin/fls.
Some phones has different file structures, but 920 and 970 has the same files bin/fls.

@navossoc

Look into my Mediafire ShareFolder maybe you`ll find some source code into those programs leaked from LG india website.

I will take a look, if you tell me the name of the file, I can find it quickly :p

Yes, I have helped him to test the application and it was working properly.

Sent from my LG-P500h using Tapatalk 2 Beta-4

Yeah, he was my test subject :)

You guys need to use command line. Open cmd and type: LGExtract -kdz "path to kdz file"

He is right, you can't run it with double click.
You need to open a console first (cmd.exe or power shell for ex.)

Did you try LG Utils ?
It can extract wdb and kdz both.
I'm having problem while extracting .wdb bcoz it asks for FW ver. and dont know which ver I have maybe someone else knows his FW ver so he'll be able to successfully extract wdb

Yes, I already see LG Utils, I got the idea from there.
But, LG Utils can extract only KP500 and KS360.

I spent some time studing how they do that and I get it...
Now I can use the same idea in all .wdb files :)

For now it's useful for P920 and 970, because bin/fls can be flashed with SmartFlash Tool.

Others phones has different file structures, for example: LU620128 (I think P930) got a "firmware" file .tot with almost 1,3gb!

[]'s
 
Last edited:
  • Like
Reactions: N00BY0815

omr911

Senior Member
Sep 20, 2011
381
1,501
I tried to extract using cmd but it only gives .cab (.wdb and .dll) :(
How to get bin/fls :confused:
Any tutorial ??
 
Last edited:

re4lsk

Senior Member
Dec 16, 2011
870
447
Hermosillo
www.twitter.com
what about adding a tutorial on how to use this tool? i already extracted the cab, but now i guess i can extract *.wdb from the cab then use the tool again to extract the bin/fls using: LGExtract -wdb *.wdbpath? is that correct?

nope it doesnt work that way
 
Last edited:

Sephirothrx7

Senior Member
Mar 10, 2009
243
96
SANTO André
navossoc have already said that the tool is only extracting kdz for now, the wdb functionality is being revised so he can release a stable tool.
Today, I'm releasing version 0.1.0 of the software that extracts only files *.kdz
I will try release the WDB support as soon as possible, but first, I have to review the code. (I don't wanna brick anyones phone :p)
 

Top Liked Posts

  • There are no posts matching your filters.
  • 82
    [TOOL] LGExtract 0.2.1 + 0.3.0 (beta)

    Updated instructions will be here in post #1 or #2, stay alert ;)

    Description:
    Hello everyone, in the last two weeks I was developing a command line tool to extract the firmware of LG phones. (different models)

    For now, this tool is able to successfully extract *.kdz and *.wdb files. The tool don't dump the firmware from the phone.

    I would like to receive feedback about this tool, if it works or not with the files you have.
    Please report any kind of error too.

    Remember, this software aims to help the community of users of mobile phones from LG to change their roms in a fast and easy way.
    I can't provide any guarantee that the extracted file is 100% correct. So stay tuned in what you are doing, don't blame me.


    Basic usage:
    • Open a command prompt. (cmd.exe or powershell)
    • Browse to the directory where is located the LGExtract.
    • Run LGExtract for more information (help).

    Guides: (more detailed)
    • P920 / P970
    • P990 - Thanks Keltek
    • Other phone models have different files. I don't have any idea on how you can use it! BE CAREFUL!

    Automated tools: (based on LGExtract)

    Other tools: (to use with files extracted by LGExtract)

    Current features:
    • Extract KDZ files.
    • Extract WDB files.

    Features to be implemented:
    • Merge extracted files automatically. (if file needs it)
    • Graphical User Interface.
    • Extract DZ files.
    (none of these, sorry, the development is dead)


    Note: You don't need install any additional software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

    LGExtract.exe 0.2.1 - Hashes:
    SHA-1: 2ef469162aa546ec7c1368d45bcbd0affd86e474
    SHA-256: fa54a755a0aa2b15b622e44a183c491885a79ecf02d799c42c733e429dd16c3d

    LGExtract.exe 0.3.0 BETA - Hashes:
    SHA-1: e108c9e7d17b40d33152332d3e1775fd4aa48b92
    SHA-256: ca66781f98498b80f59398a5c4538589262a1716d0788b18cea62e99c6eac5dc
    22
    We can't convert, we're gonna have to extract fls/bin because its LG's stupid archive I guess :D

    Now you can, check the new release 0.2.0.

    so this is a cmd line tool. it's not mentionned :E

    I tought it had an UI but understood quickly.

    I edited the first post and second post, I made it clear now that is a command line tool.

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

    Instructions for P920 / P970 (bin/fls)

    Now you can use the bin/fls with SmartFlash Tool.

    Example:
    1. Download a KDZ file for your device (you can get it here).
    2. Run LGExtract -kdz V20C_00.kdz (I have downloaded the BRA 970H V20C)
    3. Manually extract V20C_00.cab file at the same dir. (7-zip or WinRAR)
    4. Run LGExtract -wdb V20C.wdb LGP970.dll
    5. Now you got about 7 files, a few numbered .bin files and one .fls. (older firmwares has less files/ newer has more)
    6. You need to browse to BIN folder to manually merge the bin files (I will made this automatic in new releases)
    7. Run copy /b "LGP970_AP[*].bin" "LGP970_AP.bin"
    Should output something like this: (THE NUMBER ORDER MUST BE ASCENDING)
    Code:
    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.
    8. Now you can use the SmartFlash Tool to flash the new bin file and the fls as you always do.

    If someone with more time want write a guide or something like that, feel free to do.
    My english is bad xD

    []'s
    17
    Thanks to:

    Extracted KDZ/WDB from: (tested models)
    KP500, KS360, LGP500, LGP920, LGP925 (confirmed by E:V:A)
    LGP970, LGP990, LGP999, LU620128, SU640, SU660 (confirmed by kitty's_daddy)
    Should work with any kdz/wdb file.

    Changelog:
    03/03/2020 - 0.3.0 BETA
    * Fixed wdb password for larger dll files (up to 9.999.999 bytes).
    (I was adding support for the DZ format, but I gave up, this tool seems no longer relevant.)

    31/03/2012 - 0.2.1
    * Improved error handling for kdz format.
    * Fixed cryptographic service initialization failed.

    28/03/2012 - 0.2.0
    * Second release, extract wdb files.
    26/03/2012 - 0.1.0
    * Initial public release, extract kdz files.

    Supported Operational Systems:

    Windows:
    Windows XP SP3 x86 (confirmed by kitty's_daddy)
    Windows 7 SP1 x86/x64
    Windows 8 x64 (confirmed by johnw230873)
    Windows 8.1
    Windows 10
    Should work on other versions of Windows too.

    Linux:
    Red Hat Enterprise v6.2 x64 with Wine v1.4 i686 (Reported by Keltek)
    Should work on other linux distributions too with Wine.
    12
    I mentioned in other thread (in LGP990 section) so I little "cross-post it here".
    I make a testing under my virtual Windows XP so I try to describe it for Linux and also for Windows - the testing ROM is V20Q for LGP990.
    1) Linux
    - you must have a Wine installed (don't know which concrete version but I think the latest one is the best choice)
    - you must have a cabextract utility installed - it is in all major Linux distribution or you can compile it by hand
    • extract the KDZ file
      Code:
      wine LGExtract.exe -kdz V20Q_00.kdz
    • extract the CAB file
      Code:
      cabextract V20Q_00.cab
    • extract WDB file
      Code:
      wine LGExtract.exe -wdb V20Q.wdb Star_Model.dll
    • combine the filesystem
      - in this point the name of files can differ from ROM to ROM, so take this only as a point (see the different number of redirections)
      Code:
      cat 0_Split_Data.img > system.img 
      cat 1_Split_Data.img >> system.img 
      cat 2_Split_Data.img >> system.img 
      cat 3_Split_Data.img >> system.img
    • mount the filesystem
      - now you have to use a root account coz the mounting a loop device is restricted
      Code:
      [I]{as roooooot}[/I]
      cd <where you have a extracted files>
      mkdir android_system
      mount system.img android_system -oloop
      - now you have the Android system mounted and can be accessed in android_system directory - you can access it as normal user
    • end of work - unmount
      Code:
      [I]{as roooooot}[/I]
      cd <where you have a extracted files>
      umount android_system
    2) Windows (XP)
    - to extract CAB file I use the 7zip file compressor, you can use it or use different tool which make the same work (WinRAR for example do the same)
    - for commands use a command line - cmd.exe
    • extract the KDZ file
      Code:
      LGExtract.exe -kdz V20Q_00.kdz
    • extract the CAB file
      - open the V20Q_00.cab in 7zip tool and extract it
    • extract WDB file
      Code:
      LGExtract.exe -wdb V20Q.wdb Star_Model.dll
    • combine the filesystem
      Code:
      copy /b *_Split_Data.img system.img
    • access the Linux filesystem
      - I try the free tool DiskInternals Linux Reader for my best satisfaction - http://www.diskinternals.com/linux-reader/
      - install, run and select "Mount image" in left upper window, select the system.img and so on, you can access the file now :)
      - I think there are many other tools to access the Linux ext2/3/4 image files so try to find one which is best for you (use your favorite Internet search engine ;) )
    I hope this helps you in further ROM extraction. But as first instance - thanks to navossoc for the EXCELLENT GREAT LGExtract tool!
    3
    In CMD type...

    1. LGExtract -kdz V20N_00.kdz (Extract V20N_00.cab w/WinRAR)
    2. LGExtract -wdb V20N_00.wdb LGP970.dll
    3. cd bin
    4. copy /b "LGP970_AP[*].bin" "LGP970_AP.bin"
    OR
    4. 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_new.bin

    Note:
    You can have different .kdz so just type your .kdz name (I have V20N_00.kdz).

    Happy flashing...:p