[TOOL] LG-P970 ROM COVERTER Automatic converter from KDZ to BIN/FLS + ROOT

Search This thread

jes0411

Senior Member
Nov 15, 2011
757
330
OnePlus 11
I have developed a tool based in LGExtract 0.2.1 from navossoc.
http://xdaforums.com/showthread.php?t=1566532

It can convert KDZ roms to BIN/FLS automatically in a double click for flashing with SmartFlashTool.

I added LGExtract.exe, extract.exe (to extract .cab file) and a batch that do all the process, in one executable. CWM injection based on cygwin.

Only works with P970 (Optimus Black) and P920 (Optimus 3D) roms and maybe other models with same files structure (several bin files and one fls file). It doesn't work with P990 (Optimus 2x) roms.

Instructions:

Have to put the exe and kdz rom in same folder and execute the program, it shows a cmd window asking which kdz to convert. Type number and tap enter.

iDZXeR0F2yh91.jpg

iE52XPhCGQTbw.jpg


Then it does the extraction of kdz, cab and wdb, merge bin files and clean up. At the end it ask for patch bin file with CWM.

iIqO0YJ8zRd9K.jpg


If type "n" (without quotes) and tap enter conversion has end. Have to tap any key to close cmd window.

ibvvGd6bq3JVRT.jpg


After that you have a folder named as kdz with bin and fls to flash with smartflashtool.

Instructions to patch bin with CWM:

Conversion of kdz to bin/fls is the same.
At the end of conversion can choose to inject CWM or not. To inject it type "y" (without quotes) and tap enter.

iP8QZ2NegZumt.jpg


It continues CWM injection.
It shows several options and have to type latest one and tap enter (normally it shows 2 options like in this case and have to type "2").
iFoiTYUHSsUCH.jpg

iOU9sUWBIx3Gv.jpg


It ask what kind of CWM to inject; "n" for normal and "t" for touch (without quotes) and tap enter.
iy5MatsK5Xyia.jpg

ibnBJxZPbddjjh.jpg


It injects cwm and finally it shows file was succesfully converted, the folder that contains bin and fls files (in this case folder and bin file are renamed to [PATCHED]) and what type of cwm was injected. Tap any key to close cmd window.

iT5Oqj5F5J3gg.jpg


It's ready to flash with smartflashtool. Before flash it, download superuser.zip and copy to sd card. when flash ends, phone is rebooted in recovery, it's recommended to do wipe data, chiefly if install different rom version or if you flash it to solve problems to avoid bootloop or other errors (if flashed same version to root do wipe cache and dalvik, it isn't necessary to do wipe data). Next install zip from sdcard and install superuser.zip. Then reboot system now and phone is ready with the rooted rom. Can install busybox and an app to reboot in recovery like rom manager.

Tested with V20Q and V20S with cwm in my OB from Zeus, CM10 and ICS without problem.

Version 1.1:
Fix incompatibility issue in Windows XP
It has a false positive in Anivir (Avira antivirus).
Virustotal analysis:
https://www.virustotal.com/file/f6b7a459e9dc46656cbfcde437d528255cfcd9f0ffa67e5744f5064de7e3c762/analysis/

Version 1.2:
The folder and bin/fls files are renamed to kdz filename.
Now compatible with Optimus 3D P920 kdz roms and maybe with other models with the same type of bin files extracted from wbd. It doesn't compatible with Optimus Dual P990 because the extraction of wdb generates diferent files.

Version 1.3:
Works with several kdz files in the folder and can choose one of them to convert.
New compiler, fix detection of some antivirus.
New icon, thanks to Ilko.

Version 2.0
Added posibility to patch bin with CWM recovery to root the rom, only for P970, I haven't add CWM for other devices.
Can choose the type of CWM to inject (touch or normal).

Version 2.1
Replaced old method to inject CWM (based on cygwin) with recovery.exe from navossoc.
Improved script thanks to navossoc.
I'll edit the tutorial when I have more time.

Credits:

All credits to navossoc and XDA team who develop LGExtract and recovery.exe and thanks for modify the script to use recovery.exe.
To Pacos1 who realizes it doesn't work in Windows XP and false positive in Antivir.
To t0g3 for improve the script adding the posibility to choose kdz file.
To Ilko for the new compiler, his help and the new icon.

Download:

Mediafire
Box
 
Last edited:

cakebomb

Senior Member
Nov 23, 2011
259
458
Thanks, cause I hate lg kdz updater, smartflashtool is much better and easier. :D
I can make a graphic interface for this, if you want. But I don't know if it's very useful.
cakebomb.
 
  • Like
Reactions: ivangoto

jes0411

Senior Member
Nov 15, 2011
757
330
OnePlus 11
Thanks, cause I hate lg kdz updater, smartflashtool is much better and easier. :D
I can make a graphic interface for this, if you want. But I don't know if it's very useful.
cakebomb.

A graphical interface can be useful to select kdz file, the program do this automatically if there is a kdz in the same folder but it doesn't work if there are more than one and has to choose the correct bin files to merge. But I don't know how to do this, I am a noob in batch and have no idea of programming.
I think it can be possible if we can choose the output folder for LGExtract and include a variable for it in the script.
 
Last edited:

ErnuB

Senior Member
Apr 1, 2011
538
127
Moto G9 Power
Is it possible to root and modify a rom in KDZ or BIN/FLS? It would be awesome to develop new roms based on stock.
I heard spain rom V20Q has some old bugs fixed but we still have no deox version of this or any rom based on it
 
  • Like
Reactions: legrencj

t0g3

Senior Member
Aug 20, 2011
681
307
A graphical interface can be useful to select kdz file, the program do this automatically if there is a kdz in the same folder but it doesn't work if there are more than one and has to choose the correct bin files to merge. But I don't know how to do this, I am a noob in batch and have no idea of programming.
I think it can be possible if we can choose the output folder for LGExtract and include a variable for it in the script.

IMO, I think it would be great if folder name that created is same as kdz file name, instead just "BIN" :)
 
Last edited:

jes0411

Senior Member
Nov 15, 2011
757
330
OnePlus 11
Is it possible to root and modify a rom in KDZ or BIN/FLS? It would be awesome to develop new roms based on stock.
I heard spain rom V20Q has some old bugs fixed but we still have no deox version of this or any rom based on it

The better way to root a v20 kdz is injecting cwm when flashing.
http://xdaforums.com/showthread.php?t=1512203

IMO, I think it would be great if folder name that created is same as kdz file name, instead just "BIN" :)

Yes, but it's LGExtract what create BIN folder, navossoc would have to modify his program to do that.
 
Last edited:

navossoc

Senior Member
Jul 1, 2011
185
234
São Paulo
The better way to root a v20 kdz is injecting cwm when flashing.
http://xdaforums.com/showthread.php?t=1512203



Yes, but it's LGExtract what create BIN folder, navossoc would have to modify his program to do that.

Who choose that name for the folder was LG.
I just use the same path and filename that are inside of the wdb container.

I made a tool for patch the bin file and overwrite the recovery with CWM, but I never released it.

I didn't merge files because I never find a pattern for it. Some models are totally different from others.
So, I just made the tool, you extract and do choose what to do with the files.

[]'s
 
  • Like
Reactions: kuma82 and jes0411

Ilko

Senior Member
May 30, 2007
989
547
Funky town
ilkos-home.blogspot.com
  1. create new texte file in the same folder of 7za, lgextract and your FW, then paste the following
  2. search/replace all occurrences of "V20O" by your FW version (case sensitive)
  3. save it as name.cmd or name.bat then open the file you've just created. you can reedit it later by opening it with a any text editor (or right clic > edit)

you'll obtain a folder named of the FW you've indicated with the required binaries to use with smartflash. Easy as can be :)

Code:
@echo off
title LGX

echo.
echo.
echo      -[ Extraction process started ]-
echo.
echo.
echo Extracting cab file
echo -------------------
echo.
lgextract.exe -kdz [COLOR="Red"][B]V20O[/B][/COLOR]_00.kdz
echo.
echo.
echo Extracting WDB/dll files
echo ------------------------
echo.
7za.exe e -y [COLOR="Red"][B]V20O[/B][/COLOR]_00.cab 
echo.
echo.
echo Extracting binary files
echo -----------------------
echo.
lgextract.exe -wdb [COLOR="Red"][B]V20O[/B][/COLOR].wdb lgp970.dll
echo.
echo.
echo Merging and cleaning
echo --------------------
echo.
del lgp970.dll, [COLOR="Red"][B]V20O[/B][/COLOR].wdb, [COLOR="Red"][B]V20O[/B][/COLOR]_00.cab
ren "BIN" "[COLOR="Red"][B]V20O[/B][/COLOR]"
cd [COLOR="Red"][B]V20O[/B][/COLOR]
ren "LGP970_CP.fls" "0_LGP970_CP_FLS.fls"
copy /b "LGP970_AP[*].bin" "1_LGP970_AP_BIN.bin"
del "LGP970_AP[*].bin"

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

if you're too lazy, browse my shares and download it
 
  • Like
Reactions: kapoloclubs

jes0411

Senior Member
Nov 15, 2011
757
330
OnePlus 11
  1. create new texte file in the same folder of 7za, lgextract and your FW, then paste the following
  2. search/replace all occurrences of "V20O" by your FW version (case sensitive)
  3. save it as name.cmd or name.bat then open the file you've just created. you can reedit it later by opening it with a any text editor (or right clic > edit)

you'll obtain a folder named of the FW you've indicated with the required binaries to use with smartflash. Easy as can be :)

Code:
@echo off
title LGX

echo.
echo.
echo      -[ Extraction process started ]-
echo.
echo.
echo Extracting cab file
echo -------------------
echo.
lgextract.exe -kdz [COLOR="Red"][B]V20O[/B][/COLOR]_00.kdz
echo.
echo.
echo Extracting WDB/dll files
echo ------------------------
echo.
7za.exe e -y [COLOR="Red"][B]V20O[/B][/COLOR]_00.cab 
echo.
echo.
echo Extracting binary files
echo -----------------------
echo.
lgextract.exe -wdb [COLOR="Red"][B]V20O[/B][/COLOR].wdb lgp970.dll
echo.
echo.
echo Merging and cleaning
echo --------------------
echo.
del lgp970.dll, [COLOR="Red"][B]V20O[/B][/COLOR].wdb, [COLOR="Red"][B]V20O[/B][/COLOR]_00.cab
ren "BIN" "[COLOR="Red"][B]V20O[/B][/COLOR]"
cd [COLOR="Red"][B]V20O[/B][/COLOR]
ren "LGP970_CP.fls" "0_LGP970_CP_FLS.fls"
copy /b "LGP970_AP[*].bin" "1_LGP970_AP_BIN.bin"
del "LGP970_AP[*].bin"

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

if you're too lazy, browse my shares and download it

My exe does the same but without any user interaction, only put kdz and LG-P970 ROM COVERTER 1.2.exe in the same folder and double click it. Don't have to change kdz name, it recognizes the kdz automatically and do all the process with any P920 and P970 rom in kdz.
 

t0g3

Senior Member
Aug 20, 2011
681
307
My exe does the same but without any user interaction, only put kdz and LG-P970 ROM COVERTER 1.2.exe in the same folder and double click it. Don't have to change kdz name, it recognizes the kdz automatically and do all the process with any P920 and P970 rom in kdz.

any chance to making it like this?
 

Attachments

  • Untitled-2.jpg
    Untitled-2.jpg
    15 KB · Views: 406

Ilko

Senior Member
May 30, 2007
989
547
Funky town
ilkos-home.blogspot.com
I know mate. but I don't need any extra tool since I'm sure I'll always use the same fw, except if a 20E is released. btw, CFP see your file as a badware. what causes that ?

and, may I suggest you to change for a better icon ?
 

Attachments

  • lg_r.zip
    9 KB · Views: 331
Last edited:

jes0411

Senior Member
Nov 15, 2011
757
330
OnePlus 11
any chance to making it like this?

I don't know how to do that. I'm a noob in batch.

I know mate. but I don't need any extra tool since I'm sure I'll always use the same fw, except if a 20E is released. btw, CFP see your file as a badware. what causes that ?

and, may I suggest you to change for a better icon ?

The cause of some antivirus live Avira Antivir see it as badware is the program I use to compile it. First I tried with quick batch file compiler and it doesn´t work in windows xp, and finally I used advanced bat to exe converter pro, it works in any windows OS but have this bug with av. I use eset smart security 5 and it does't found anything in the file and here are the results in virustotal:
https://www.virustotal.com/file/79e13b0bf5badee979b68c59ff75c25f65291bb42e1ad5541cd5475f3e434f5c/analysis/1338923022/

About the icon, yours is better but i have to recompile, reupload and change links here and in htcmania and pm others to change it in their posts. I think it does'n worth only for icon. Thanks anyway.
 
Last edited:
  • Like
Reactions: t0g3

t0g3

Senior Member
Aug 20, 2011
681
307
I don't know how to do that. I'm a noob in batch.



The cause of some antivirus live Avira Antivir see it as badware is the program I use to compile it. First I tried with quick batch file compiler and it doesn´t work in windows xp, and finally I used advanced bat to exe converter pro, it works in any windows OS but have this bug with av. I use eset smart security 5 and it does't found anything in the file and here are the results in virustotal:
https://www.virustotal.com/file/79e13b0bf5badee979b68c59ff75c25f65291bb42e1ad5541cd5475f3e434f5c/analysis/1338923022/

About the icon, yours is better but i have to recompile, reupload and change links here and in htcmania and pm others to change it in their posts. I think it does'n worth only for icon. Thanks anyway.

would you mind to share us the source code? :)
 

jes0411

Senior Member
Nov 15, 2011
757
330
OnePlus 11
yeah, I personally use nsis for all of my packages or tools. it's easy to understand, powerful and open source.

I don't know how to use it to do something like with the programs I mention. With them only have to add batch file (changing path to embed files to %myfiles%), select embed files and icon and save the exe.

would you mind to share us the source code? :)

No problem with that, here is:
http://www.mediafire.com/?br8drow2y18a104
To use the batch file have to remove %myfiles% path, is only for the compiled program.
 
  • Like
Reactions: t0g3

Top Liked Posts

  • There are no posts matching your filters.
  • 84
    I have developed a tool based in LGExtract 0.2.1 from navossoc.
    http://xdaforums.com/showthread.php?t=1566532

    It can convert KDZ roms to BIN/FLS automatically in a double click for flashing with SmartFlashTool.

    I added LGExtract.exe, extract.exe (to extract .cab file) and a batch that do all the process, in one executable. CWM injection based on cygwin.

    Only works with P970 (Optimus Black) and P920 (Optimus 3D) roms and maybe other models with same files structure (several bin files and one fls file). It doesn't work with P990 (Optimus 2x) roms.

    Instructions:

    Have to put the exe and kdz rom in same folder and execute the program, it shows a cmd window asking which kdz to convert. Type number and tap enter.

    iDZXeR0F2yh91.jpg

    iE52XPhCGQTbw.jpg


    Then it does the extraction of kdz, cab and wdb, merge bin files and clean up. At the end it ask for patch bin file with CWM.

    iIqO0YJ8zRd9K.jpg


    If type "n" (without quotes) and tap enter conversion has end. Have to tap any key to close cmd window.

    ibvvGd6bq3JVRT.jpg


    After that you have a folder named as kdz with bin and fls to flash with smartflashtool.

    Instructions to patch bin with CWM:

    Conversion of kdz to bin/fls is the same.
    At the end of conversion can choose to inject CWM or not. To inject it type "y" (without quotes) and tap enter.

    iP8QZ2NegZumt.jpg


    It continues CWM injection.
    It shows several options and have to type latest one and tap enter (normally it shows 2 options like in this case and have to type "2").
    iFoiTYUHSsUCH.jpg

    iOU9sUWBIx3Gv.jpg


    It ask what kind of CWM to inject; "n" for normal and "t" for touch (without quotes) and tap enter.
    iy5MatsK5Xyia.jpg

    ibnBJxZPbddjjh.jpg


    It injects cwm and finally it shows file was succesfully converted, the folder that contains bin and fls files (in this case folder and bin file are renamed to [PATCHED]) and what type of cwm was injected. Tap any key to close cmd window.

    iT5Oqj5F5J3gg.jpg


    It's ready to flash with smartflashtool. Before flash it, download superuser.zip and copy to sd card. when flash ends, phone is rebooted in recovery, it's recommended to do wipe data, chiefly if install different rom version or if you flash it to solve problems to avoid bootloop or other errors (if flashed same version to root do wipe cache and dalvik, it isn't necessary to do wipe data). Next install zip from sdcard and install superuser.zip. Then reboot system now and phone is ready with the rooted rom. Can install busybox and an app to reboot in recovery like rom manager.

    Tested with V20Q and V20S with cwm in my OB from Zeus, CM10 and ICS without problem.

    Version 1.1:
    Fix incompatibility issue in Windows XP
    It has a false positive in Anivir (Avira antivirus).
    Virustotal analysis:
    https://www.virustotal.com/file/f6b7a459e9dc46656cbfcde437d528255cfcd9f0ffa67e5744f5064de7e3c762/analysis/

    Version 1.2:
    The folder and bin/fls files are renamed to kdz filename.
    Now compatible with Optimus 3D P920 kdz roms and maybe with other models with the same type of bin files extracted from wbd. It doesn't compatible with Optimus Dual P990 because the extraction of wdb generates diferent files.

    Version 1.3:
    Works with several kdz files in the folder and can choose one of them to convert.
    New compiler, fix detection of some antivirus.
    New icon, thanks to Ilko.

    Version 2.0
    Added posibility to patch bin with CWM recovery to root the rom, only for P970, I haven't add CWM for other devices.
    Can choose the type of CWM to inject (touch or normal).

    Version 2.1
    Replaced old method to inject CWM (based on cygwin) with recovery.exe from navossoc.
    Improved script thanks to navossoc.
    I'll edit the tutorial when I have more time.

    Credits:

    All credits to navossoc and XDA team who develop LGExtract and recovery.exe and thanks for modify the script to use recovery.exe.
    To Pacos1 who realizes it doesn't work in Windows XP and false positive in Antivir.
    To t0g3 for improve the script adding the posibility to choose kdz file.
    To Ilko for the new compiler, his help and the new icon.

    Download:

    Mediafire
    Box
    5
    Hey, I made some changes to your script, please check.

    If you like, you can update it :)

    Modifications:
    * Changed mistyped application name and some texts.
    * Add additional checks. (file exist, valid option, already exist, etc)
    * Fixed bug with filenames containing space.
    * Reorganized and commented almost all the code.
    * Replaced dd.exe and dependencys by my recovery.exe. (faster and secure)
    * Replaced extract.exe by expand.exe (built on Windows)
    * Removed unused exe and other files.
    * Offset used in CWM will be always valid now, no more wrong numbers.

    Note:
    You still need to put the Clockwork .img's with your script.
    I don't uploaded it because of the size.

    Please double check it, many things has been changed :)
    3
    New version 2.0 with CWM recovery injection to the rom.
    3
    ---------- Post added at 02:48 PM ---------- Previous post was at 02:38 PM ----------

    [/COLOR]

    are you tried lg converter 2.1?

    because in page 1 ,tutorial for lg converter 2.0 not 2.1,... :(


    Tutorial for 2.1

    1-1.jpg


    2-2.jpg


    3-4.jpg


    44.jpg


    5-2.jpg


    You can now flash the rom using smartflash tool and don't forget the copy of superuser zip on your sd card before flashing. I choosed normal cwm recovery because i have a hard time booting using the touch version of cwm recovery. :)
    2
    The better way to root a v20 kdz is injecting cwm when flashing.
    http://xdaforums.com/showthread.php?t=1512203



    Yes, but it's LGExtract what create BIN folder, navossoc would have to modify his program to do that.

    Who choose that name for the folder was LG.
    I just use the same path and filename that are inside of the wdb container.

    I made a tool for patch the bin file and overwrite the recovery with CWM, but I never released it.

    I didn't merge files because I never find a pattern for it. Some models are totally different from others.
    So, I just made the tool, you extract and do choose what to do with the files.

    []'s