[TOOL] LGExtract 0.2.1

Search This thread

navossoc

Senior Member
Jul 1, 2011
185
234
São Paulo
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
 
Last edited:

omr911

Senior Member
Sep 20, 2011
381
1,501
Now you can, check the new release 0.2.0.



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

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

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"
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

You're a legend :p
 
Last edited:
  • Like
Reactions: navossoc

navossoc

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

Thanks!
Be careful, I'm made a mistake at the post #23 (now it's ok)
The bbcode of the forum made the step 8 was written incorrectly, because of the [*]

You should get a output like this:
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.

Check it now...
 
Last edited:
  • Like
Reactions: N00BY0815

navossoc

Senior Member
Jul 1, 2011
185
234
São Paulo
It works man i extracted V10B for optimus 3d P920

Good to know :)

Take a look at a hex editor to be sure the file have some kind of meaning (if it have some strings, like build date, error messages, etc).

I have plans to inject CWM into the .bin file.
I successfully made it in my phone, but in a "manual" mode.
I need to code it, I really wanna add it to the tool :)

Maybe, something like:
LGExtract -recovery model_AP.bin recovery.img

I will check file sizes for prevent write less or more than the partition size.
I got the basic idea from here about this.

I'm running the BRA V20A with CWM touch.
For now, we can use the "dd" linux command or the injection at the memory.

Will be a piece of cake flash roms with a custom recovery :D
 
Last edited:
  • Like
Reactions: cike and N00BY0815

omr911

Senior Member
Sep 20, 2011
381
1,501
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
 
Last edited:

pjdu

Member
Nov 4, 2007
5
0
How to extract LU620128's bin/fls file? or any plans to develop the function to extract lu620128's bin/fls file? thanks
 

YkZ_1967

Senior Member
Jan 29, 2012
220
56
56
ok, thanks, i haven't test to use with smartflash tools but i have a .bin and .fls.
 

Pondera

Senior Member
Feb 8, 2012
332
92
In CMD type...

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


copy /b LGP970_AP[*].bin LGP970_AP.bin I did it in BIN folder.

---------- Post added at 01:42 PM ---------- Previous post was at 12:54 PM ----------

Now you can, check the new release 0.2.0.

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

This is great man thanks! Now the only thing left is to be able to patch it like Snegovik. to be able to install superuser.
 

YkZ_1967

Senior Member
Jan 29, 2012
220
56
56
Put 7za.exe ( standalone unzip ) in directory lgextract, copy the .kdz in same directory.

Code:
echo off
LGExtract -kdz V20O_00.kdz
echo KDZ extracted successfully !
7Za.exe x -y V20O_00.cab
echo CAB extracted successfully !
LGExtract -wdb V20O.wdb LGP970.dll
echo WDB extracted successfully !
cd bin
copy /b "LGP970_AP[*].bin" "LGP970_AP.bin"
echo BIN created successfully ! Enjoy it !!
pause

search remplace V20O with your letter rom ( V20N, V10A ) , save with notepad in .bat and put the bat in directory lgextract.
 

Attachments

  • 7za920.zip
    375.8 KB · Views: 230
Last edited:

navossoc

Senior Member
Jul 1, 2011
185
234
São Paulo
How to extract LU620128's bin/fls file? or any plans to develop the function to extract lu620128's bin/fls file? thanks

Hi, sorry, but I can't, seems that LU620 use a different file system.
You can extract the files from .wdb with my tool, but you will get a lot of .tot files.
I don't know if exist a tool able to flash .tot files, if you look that files in a hex editor you will see that are android images with linux headers, so it's correctly extracted, but you can't use it for "nothing" yet (like flash).

It works great!! thanks!
I just converted a KDZ file to .Bin & .FLS files, then flashed them in SmartFlash Tool.

Good to know :)
P970, right?

Put 7za.exe ( standalone unzip ) in directory lgextract, copy the .kdz in same directory.

Code:
echo off
LGExtract -kdz V20O_00.kdz
echo KDZ extracted successfully !
7Za.exe x -y V20O_00.cab
echo CAB extracted successfully !
LGExtract -wdb V20O.wdb LGP970.dll
echo WDB extracted successfully !
cd bin
copy /b "LGP970_AP[*].bin" "LGP970_AP.bin"
echo BIN created successfully ! Enjoy it !!
pause

search remplace V20O with your letter rom ( V20N, V10A ) , save with notepad in .bat and put the bat in directory lgextract.

You can use "expand.exe" from Windows too.
I used it a lot when I'm developing the tool :p

expand V20O_00.cab -F:* .
 
  • Like
Reactions: N00BY0815

YkZ_1967

Senior Member
Jan 29, 2012
220
56
56
yep also expand, a long time i used this command...

anyway thanks for the tools !

nextstep , injecting cmw will be great ;)
 

n3n3

Senior Member
Feb 20, 2012
68
4
Thanks, works fine.

Agora vi que é brazuca. Valeu, coloquei um link seu num post que trata de colocar cwm nos arquivos, assim no reboot depois do flash ele abre o cwm automatico e da pra mandar o superuser. Os arquivos pra isso precisam ser CP e AP, nao da pra fazer com o .kdz, seu trabalho ficou uma mão na roda.
 
Last edited:

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