[Q] (Q) How to collect smart flash flashable file from kdz? - LG Optimus 2x

Hi guys, i searched lot, but did not find any proper solution for getting flashable files of smart flash from kdz..
Plz help guys..

Obviously you haven`t searched enough .
I think that you are looking for LGExtract 0.2.1
Tool is in it`s beginning, but from reading I think that it can extract smartflash files from kdz and it is tested on p990 (I haven`t tested it).

k, i tried that, now i got 13 files.
some are img, some fls etc.
but we need only 2 files for flashing with smartflash tool. bin and fls.
how to get them ?

As I said, I haven`t tried to do this, hence I can`t help you. You will must to read and ask for support in original thread, where the author of the tool is present.
If you are trying to flash kdz and since LG have changed their politics, try to read this thread too... http://forum.xda-developers.com/showthread.php?t=1473781

Hi all,
first, thank you Memhis, the tool is excellent. It works under Linux too in Wine environment.
But I have some observations and some questions
- first decrypt/decompile KDZ file only extract a CAB file - this CAB file can be extracted by cabextract utility
- after CAB file extraction, there is WDB file and machine specific DLL - this DLL file must be used for extraction of WDB, I try the newer one without success
- after performing extraction of WDB using DLL there are number of files which can be useful
AENEAS_FW.fls, psi.fls, R375_SIC.fls, slb.fls - these files are the baseband and can be flashed using smart flash tool - it must be flashed all, not only some
#_Split_Data.img - after joining this file to one, it contains Linux filesystem (now EXT3) with all data of /system partition and you can get lge-ril.so from this
The remaining files I don't identify and only speculate what is it
ext3_flashboot.img - this filesystem is used to boot for flashing???
fastboot.bin - ???
recovery.img - recovery partition - this images is used to replace ClockWorkMod I think
Once again, many thanks. I was searching for this similar tool about six moths ago.

can you tel me,how do you extract the split_data.img??
at this point i have no idea what i must do and find nothing about it.

cojo11 said:
can you tel me,how do you extract the split_data.img??
at this point i have no idea what i must do and find nothing about it.
Click to expand...
Click to collapse
+1
........

There is nothing to "extract" from split_data.img. It is a true EXT3 Linux filesystem. You have to use a Linux box or something to allow mount an Linux image to Windows environment. I can only point you to http://www.ext2fsd.com/ site which is free good ext2/3/4 filesystem driver, but I don't know, if it is usable - it can mount a Linux partition under Windows but don't know it can mount a image file as disk. Hope so.

Thanks for the information, but I can't extract Split_Data.img (it's the joined file of 4 .img files).
How can I extract this .img in Linux (virtual machine)?

Flix123 said:
Thanks for the information, but I can't extract Split_Data.img (it's the joined file of 4 .img files).
How can I extract this .img in Linux (virtual machine)?
Click to expand...
Click to collapse
You have to mount it, like it is a whole filesystem. Google it to find out how to mount img file. Once done, you'll open it like a hard drive.

Edit: Forget my question, it works now!
My last question: Is the file "ext3_flashboot" the same as the boot.img files in CWM roms?

OK, I managed to extract the kdz file and I made a rebuild of V20c without flashing the kdz, just with extracting!
I'll upload it in a few minutes!

For those who wants to extract KDZ I prepare a little manual...

Keltek said:
For those who wants to extract KDZ I prepare a little manual...
Click to expand...
Click to collapse
Hi Keltek, thanks for the manual. but i am getting some error, any ideas? I'm using Win 7 32-Bit. This is the error:
C:\>LGExtract -kdz V20F_00.kdz
Extracting:
KDZ: V20F_00.kdz
Failed to create cab file.
Error code: 00000005
Message: Access is denied.
Failed to extract file.
Please report this error with this file.
thanks
NEVER MIND: cmd.exe should "Run as Administrator", it works now.

The last question I have is how to join the 4 extracted baseband files to one file?
Does that work with copy /b command?

What i got from flashing basebands is that youre supposed to flash them one by one from largest to smallest file. so basically what you should be doing to "compress" the procedure is you unpack those 4 files, put the largest one in place and copy the others onto it, replacing duplicates. Then repackage what you merged, and try that, cant think of anything more logical than that.

That sounds logical, but I don't know how to extract the files.
But it's not very important, because it isn't a problem to flash 4 files instead of one.

Please extract Bb from v20h rohan
Sent from my LG-P990 using Tapatalk

If you give me the link to the kdz, I will extract the baseband for you.

spica1234 said:
Please extract Bb from v20h rohan
Click to expand...
Click to collapse
You should specify from which ROM file, coz there are many version with same identification but different content - I don't understand why LG do this - the V20q for Czech Republic is not the same as V20q for Italy...
I take a look at V20h and it contain 1035.21_20110725 BaseBand.

Related

Extracting files from KDZ

HI,
I am trying to get an apk from a KDZ file. I can open up the KDZ but then there are many other files inside. I guess the apks are in one of these other files. Does anyone know how to get the apk from within .img files etc?
Thanks
ballandbiscuit said:
HI,
I am trying to get an apk from a KDZ file. I can open up the KDZ but then there are many other files inside. I guess the apks are in one of these other files. Does anyone know how to get the apk from within .img files etc?
Thanks
Click to expand...
Click to collapse
How you extracted KDZ?
Why don't you get it from the sapps module zip on void's rom?
I need a particular app from the Orange UK ROM - the app is called Signal Boost and it is for UMA calling.
Is that app in the ROM you mention?
What you need is this: http://forum.xda-developers.com/showpost.php?p=6303911&postcount=827
It allows you to decompress system.mbn (where all the files are).
Compile it under linux, or use cygwin.
Remember that official ROMs are odexed. If you want to deodex apks, you can use dsixda's excelent kitchen. It is used to make lots of ROMs you see around here.
For that, take a look here (you can also use it under cygwin):
http://forum.xda-developers.com/showthread.php?t=633246
If you understand portuguese, or use a translator, check these:
http://www.androidpt.com/index.php?option=com_kunena&func=view&catid=97&id=91547&Itemid=30
http://www.androidpt.com/index.php?option=com_kunena&func=view&catid=97&id=97416&Itemid=30
Most info was gathered from xda forums, only translated and organized to portuguese folks.
Many thanks, I will see if I can get anywhere with this.
You just need to compile unyaffsmbn (gcc unyaffsmbn.c -o unyaffsmbn).
Then copy system.mbn to unyaffsmbn folder. Then do:
./unyaffsmbn system.mbn
You'll have all files extracted in few seconds.
Then if you want to use those files in kitchen, do this:
First install kitchen, as explained in link i posted above.
Delete all symlinks in bin/ (i think there are 52)
Then you must create a zip file with this structure:
/boot.img
/system/ (here you put all the files you extracted. You should have 10 folders and 1 file)
Now just copy this zip to PATH_TO_KITCHEN/original_update/
Then run it with:
cd PATH_TO_KITCHEN
./menu
Right I have three system.mbn files named:
system.mbn_0
system.mbn_1
system.mbn_2
I have tried a few tools (under Windows) to extract them. Firstly a windows compiled version of unyaffs which falls over with : Exception: STATUS_ACCESS_VIOLATION at eip=61100F73
I then tried another version which didn't error but also didn't do anything!
A different tool errored with "the header states that its binary is longer than the whole file" which makes me think perhaps these three files need combining into one?
I have tried combining them into one file using the copy /b command in Windows which creates a single large file but I still have the same issues trying to unpack it.
Any more ideas? Thanks
Right have now installed Cygwin and managed to extract the files using unyaffsmbn! Thanks for all your help, learnt a lot today!
Right I have three system.mbn files named:
system.mbn_0
system.mbn_1
system.mbn_2
Click to expand...
Click to collapse
How did you decompress kdz? I use LG Utils to extract to dz, then dzdecryptor to decompress dz to individual files. Then i use the tools i named to do the rest of it.
Also i can see that lg utils finds those system*, but puts them together before it ends. Maybe you used different software.
Anyway, i'm glad you managed to work it out
I have tried a few tools (under Windows) to extract them. Firstly a windows compiled version of unyaffs which falls over with : Exception: STATUS_ACCESS_VIOLATION at eip=61100F73
Click to expand...
Click to collapse
There is unyaffs, and unyaffsmbn. unyaffs also never worked with me.
I've read somewhere that with lg roms we must use unyaffsmbn. Don't remember were i saw it, neither why...
I used LG utils to extract the KDZ, then used DZExtract to expand the .dz file. Then I combined the system.mbn_0,1,2 files using copy /b.
I then used Cygwin and gcc to make unyaffsmbn.exe which then worked on the combined system.mbn file. Managed to get the apk I needed too.
PLease upload unyaffsmbn.exe for me please as i seriously need it.
Here you go...

[TOOL] LGExtract 0.2.1

[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)
LG-P970 ROM CONVERTER - Thanks jes0411 (if you are noob, this if for you )
Other tools: (to use with files extracted by LGExtract)
replace recovery
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.
Click to expand...
Click to collapse
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
Thanks to:
miniz - zlib compression
SimpleOpt - cmd line parser
Sephirothrx7 - for beta testing
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.
nothing happens when I try to run it, even if I put it in a same dir where a fw is.
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
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
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.
Ilko said:
nothing happens when I try to run it, even if I put it in a same dir where a fw is.
Click to expand...
Click to collapse
Did you tried run something like:
LGExtract -kdz file.kdz
What is your operational system?
re4lsk said:
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
Click to expand...
Click to collapse
Yeah, it's on my plans, for now I wanna extend the support first.
megaurs said:
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
Click to expand...
Click to collapse
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.
Huexxx said:
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.
Click to expand...
Click to collapse
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
If that's correct, then I retire what I've said...
Can U extract .bin and .fls from .wdb file?
@navossoc
Look into my Mediafire ShareFolder maybe you`ll find some source code into those programs leaked from LG india website.
Huexxx said:
If that's correct, then I retire what I've said...
Can U extract .bin and .fls from .wdb file?
Click to expand...
Click to collapse
Yes, I have helped him to test the application and it was working properly.
Sent from my LG-P500h using Tapatalk 2 Beta-4
Ilko said:
nothing happens when I try to run it, even if I put it in a same dir where a fw is.
Click to expand...
Click to collapse
Not working on me eighter. When i want to open, it opens for just half a second and after that it dissapear.
You guys need to use command line. Open cmd and type: LGExtract -kdz "path to kdz file"
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
omr911 said:
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
Click to expand...
Click to collapse
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
Huexxx said:
If that's correct, then I retire what I've said...
Can U extract .bin and .fls from .wdb file?
Click to expand...
Click to collapse
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.
scamex said:
@navossoc
Look into my Mediafire ShareFolder maybe you`ll find some source code into those programs leaked from LG india website.
Click to expand...
Click to collapse
I will take a look, if you tell me the name of the file, I can find it quickly
Sephirothrx7 said:
Yes, I have helped him to test the application and it was working properly.
Sent from my LG-P500h using Tapatalk 2 Beta-4
Click to expand...
Click to collapse
Yeah, he was my test subject
Sephirothrx7 said:
You guys need to use command line. Open cmd and type: LGExtract -kdz "path to kdz file"
Click to expand...
Click to collapse
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.)
omr911 said:
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
Click to expand...
Click to collapse
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
I tried to extract using cmd but it only gives .cab (.wdb and .dll)
How to get bin/fls
Any tutorial ??
omr911 said:
I tried to extract using cmd but it only gives .cab (.wdb and .dll)
How to get bin/fls
Any tutorial ??
Click to expand...
Click to collapse
+1
how convert .wdb in .bin
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
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 )
Click to expand...
Click to collapse
Sephirothrx7 said:
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.
Click to expand...
Click to collapse
well extracting WDB works...

[firmware] v10a lgp880 europe open

Here the first firmware of the lg p880, in my file there are the .kdz and the .dz with its .dll that I extracted from the .kdz. Only problem, I do not manage to extract the .dz, if somebody could advance the thing.
A thanks takes 2s and I hope that one will be able to use that for our optimus 2x.
the link : http://bayfiles.com/file/bRZx/AZaxbu/.kdz_et_.dz_.dll_LGP880.v10A.rar
Call to kdz superman flix
Sent from my LG-P990 using Tapatalk
Flix the KDZ Superman is busy with the new Kernels....FLIX are u hearing the calls of the O2X community?
Fly in FLIX.....we are waiting mate
Hey,
welcome back, spica. Now you can see I can make my own kernels.
I already tried to extract this firmware (it's on the server for a week now), but I don't get managed to extract it... It's not like in our O2X.
After extracting .kdz, you get a .dz file. I tried dz extractors I found, but I can't extract the dz file.
Maybe there's someone having more knowledge about these things?
Flix123 said:
Hey,
welcome back, spica. Now you can see I can make my own kernels.
I already tried to extract this firmware (it's on the server for a week now), but I don't get managed to extract it... It's not like in our O2X.
After extracting .kdz, you get a .dz file. I tried dz extractors I found, but I can't extract the dz file.
Maybe there's someone having more knowledge about these things?
Click to expand...
Click to collapse
that is really sad news....the superman says...cant extract...
Flix123 said:
Hey,
welcome back, spica. Now you can see I can make my own kernels.
I already tried to extract this firmware (it's on the server for a week now), but I don't get managed to extract it... It's not like in our O2X.
After extracting .kdz, you get a .dz file. I tried dz extractors I found, but I can't extract the dz file.
Maybe there's someone having more knowledge about these things?
Click to expand...
Click to collapse
Yes I saw it now and eaget to flash ur kernel
Does it need other tool fot dz:/
Sent from my LG-P990 using Tapatalk
I'd appreciate a feedback from you for my latest v1.2 Kernel. It's with my flix toolchain. The link is in my signature.
B2T: I don't know very much about blocks, converting, extracting etc. Extracting O2X firmwares is easy, just .img files.
I hope for a big community for the O4X because of this.
It may sound really stupid and I don't know **** about this subject but just want to think with you guys and maybe help a little. Maybe you can rename the .dz file to .img and then do the normal thing. Don't know if it works and you probably tried it already so...
I don't think renaming can convert a .dz to .img.
YEEAA ! spica's back gone for a few days only but seemed like a month xD.
and now its time for a silly question, what is the use of a optimus 4x hd firmware to us ? (besides some wallpapers ringtones and apps i guess)
edit: flix you can still try it, since it may be exatcly like that, maybe its the same container only renamed to .dz cant hurt to try after renaming the program might be able to access it
I tried to mount the file, it doesn't work.
But here's the system dump of the Optimus L7 (not by me, I was too late ):
http://jumbofiles.com/j6bnobsck4se
It should do the same good things to us. I already extracted the ringtones, wallpapers and icons of it:
http://forum.xda-developers.com/showthread.php?t=1635301
It is not terrible if one does not manage to extract the .dz.
An extraction would make it possible to see optimizations of the o4x and thus to use that in the o2x.
Only the total interface of the o4x for Rom stock o2x.
I wasn't able to extract anything either. The usual tools just won't work and even some strange Korean exe files from Google didn't help.
@flix: I hear you're called extraction superman... do you have any idea how to extract a p990 Baseband from a kdz file into a SINGLE fls file? I can extract them into 4 fls files, Paul OB had a way of getting a single fls file but I couldn't find any method for that :-(
Sent from my LG-P990 using XDA
tonyp said:
@flix: I hear you're called extraction superman... do you have any idea how to extract a p990 Baseband from a kdz file into a SINGLE fls file? I can extract them into 4 fls files, Paul OB had a way of getting a single fls file but I couldn't find any method for that :-(
Click to expand...
Click to collapse
I tried that, too. Obviously, it works with the "copy \b" command like the .img files but I didn't try such a copied baseband yet. But you could try it at your own risk.
The new LG PC SUITE for LGP880 thus I also think compatible for O2X also :
http://csmg.lgmobile.com:9002/swdat.../RST-1204-00311_LCsetup_5.1.15.20120413_4.zip
The .dll for flash the P880 :
http://csmg.lgmobile.com:9002/swdat...8/[LGFlashTool1377]LGP880_120518_Download.zip
For finish, the name of firmware .bin : LGP880AT-000-V10a-TMO-XXX-MAY-18-2012+0.zip
Please help to recover .
I cannot in which section thus put that if my post is badly placed thank you to move it to me in the good section.

[TOOL]LG Bin Firmware Extractor

LG BIN/TOT Extractor
This is a tool for extracting LG Bin/Tot Firmware files.
I update the git a lot more than what I update the thread so check there for latest news.
Features
Split Bin file into relevant partitions
Split Tot file into relevant blocks and merge blocks into partitions
Display AP Header
Display GPT Header
Extract Header from Bin/Tot File
Features I like to implement (and probably won't get around to)
Extracting boot img (The tools currently available don't work in all cases and it's very easy to read the header since it's open source.)
Extracting ext4 partitions. So that it's easy to access the file. Theres already other tools that can do this so this isn't essential.
Mergeing tot partitions based on data from partitions itself and not GPT
Inject Alternate Data into partitions. I'll block access to X-loader,U-boot and GPT so that You can't kill your phone.
Source
https://github.com/Xonar/LGBinExtractor
Confirmed to work with
Quite a few phones.
I lost track of which ones work.
To check just run with -daph. You'll get file information if it works and either garbled data or an error message if it doesn't.
If your phones not supported follow the steps on git readme.
Thanks
SnowLeopardJB - for lots and lots of testing
navossoc - his tool that extracts kdz and wdb files
vim1 - D821 support
scotty755 - LGL22 support
tkawajir - L-04E and LG G Flex F340K support
If you feel I forgot to thank you, msg me and I'll add you.
If it can extract BIN files then yes. We believe the nandroid V30* of KU5900 that was supplied was incomplete. So If KDZ is converted to BIN and FLS (which we can), then extract contents of BIN, then you can have complete files without looking for Koreans and Chinese to relay that the nandroid was incomplete and can have untampered files.
xonar_ said:
Question to other Devs
Will you use a tool like this or am I wasting my time?
Is a tool like this allowed or would it be considered reverse engineering? (If its not allowed I'm going to stop IMMEDIATELY)
Click to expand...
Click to collapse
Yes I will. If I myself can build a program to extract this EFI partition..
It is reverse engineering, but I don't know if it's legal or not (in this case), but for me it's legal as I'm considered this to educational purpose
Many others tool was created to have purpose like this, for example http://psas.revskills.de/?q=node/5
-CMIIW-
I've attached an image of the system partition of the V20E_00 for you guys to see.
I am going to download the v30H_00.kdz today. So I'll keep you posted about how the extracting goes. I probably won't have time to check it out until the weekend so please don't hold your breath.
I've only recently managed to find the necessary information about the ext4 file system to integrate the functionality into my tool. For now Ext2Read can extract the ext4 file system just fine. I'll add that somewhere over the weekend (Provided something doesn't come up).
Could you as soon, as you are able to unpack it fully maybe upload a complete backup of the system partition and also system2, cause we think, that in the nandroid there are some files missing and we need those, to probably be able to boot that system. Great job btw
Thanks for the positive feedback.
I am getting the v30h_00.kdz in a few hours (I got a friend to download it for me, I don't have that much cap ).
There is no way I will be able to upload the file since it will be big but if it works I'll post the tool and how to do it.
GitHub is giving me an error : "Page did not respond in a timely fashion". I am going to try again tonight to post the source.
I already tried to extract the bin files, but I didn't see any pattern to know where start or ends a partition.
Some partitions you can identify by it's header and try to extract the file size from there (i did that with recovery.exe).
If you know for sure the partition name and the address, I can improve the recovery.exe to patch always the right partition.
So, what is the trick?
[]'s
navossoc said:
I already tried to extract the bin files, but I didn't see any pattern to know where start or ends a partition.
Some partitions you can identify by it's header and try to extract the file size from there (i did that with recovery.exe).
If you know for sure the partition name and the address, I can improve the recovery.exe to patch always the right partition.
So, what is the trick?
[]'s
Click to expand...
Click to collapse
The first meg of the file contains the names of the data blocks size on file,size on disk and where they start on file. I'll post exactly how it is set out later.
The data blocks aren't only partitions though for example the first one is the GPT header with it's corresponding entries and also some blocks are empty.
I recognized the start the two partitions from your tool.
Sent from my LG Optimus Black
xonar_ said:
The first meg of the file contains the names of the data blocks size on file,size on disk and where they start on file. I'll post exactly how it is set out later.
The data blocks aren't only partitions though for example the first one is the GPT header with it's corresponding entries and also some blocks are empty.
I recognized the start the two partitions from your tool.
Sent from my LG Optimus Black
Click to expand...
Click to collapse
You are talking about the first 1MB from BIN? right?
They are using little endian or big endian to represent the numbers?
The name of the sections I already knew, but never found the initial offset.
I will try to take a look later.
[]'s
navossoc said:
You are talking about the first 1MB from BIN? right?
They are using little endian or big endian to represent the numbers?
The name of the sections I already knew, but never found the initial offset.
I will try to take a look later.
[]'s
Click to expand...
Click to collapse
Yes the BIN. They are using little endian. All the offsets and sizes are in LBA's (512 bytes in this case) with LBA 0 starting at 0x100000.
Sent from my LG Optimus Black
Source of Bin Fls Extractor (So far)
GitHub isn't working out as planned. The client stopped downloading in the middle and I don't want to waste more cap so here is the source as an attachment.
This is still a work in progress and is only confirmed to work with v20E_00 South Africa.
Linux users can just mount the *.img file of system to access it. Windows users have to use a tool like Ext2Read. Mac users I'm not sure : Google it.
EDIT : I wont be able to get the v30 kdz for another day unfortunately. Feel free to try and change my tool to work with it.
EDIT2: These sources are old. I'll upload my fixed ones later. Reads in chunks and works on P970 and KU5900 ( I don't have any other files to test it with but it should work with almost all BIN files extracted from kdz files )
xonar_ said:
GitHub isn't working out as planned. The client stopped downloading in the middle and I don't want to waste more cap so here is the source as an attachment.
This is still a work in progress and is only confirmed to work with v20E_00 South Africa.
Linux users can just mount the *.img file of system to access it. Windows users have to use a tool like Ext2Read. Mac users I'm not sure : Google it.
EDIT : I wont be able to get the v30 kdz for another day unfortunately. Feel free to try and change my tool to work with it.
Click to expand...
Click to collapse
Nah! The damn trick was the 512 bytes + 0x100000 base.
I never thinked about it...
I take a look at your code, I understand the whole concept now.
I have successfully extracted the system.img and system2.img from the V30H_00.kdz
Nice, maybe later I can do some modifications on recovery.exe, so they can find always the correct partition for recovery.img. (without the user choose one)
[]'s
navossoc said:
Nah! The damn trick was the 512 bytes + 0x100000 base.
I never thinked about it...
I take a look at your code, I understand the whole concept now.
I have successfully extracted the system.img and system2.img from the V30H_00.kdz
Nice, maybe later I can do some modifications on recovery.exe, so they can find always the correct partition for recovery.img. (without the user choose one)
[]'s
Click to expand...
Click to collapse
Nice! Great job you guys. :good:
navossoc said:
Nah! The damn trick was the 512 bytes + 0x100000 base.
I never thinked about it...
I take a look at your code, I understand the whole concept now.
I have successfully extracted the system.img and system2.img from the V30H_00.kdz
Nice, maybe later I can do some modifications on recovery.exe, so they can find always the correct partition for recovery.img. (without the user choose one)
[]'s
Click to expand...
Click to collapse
can you upload system files asap?
George Jetson said:
can you upload system files asap?
Click to expand...
Click to collapse
http://forum.xda-developers.com/showpost.php?p=31443301&postcount=270
Thanks to navossoc there
navossoc said:
Nah! The damn trick was the 512 bytes + 0x100000 base.
I never thinked about it...
I take a look at your code, I understand the whole concept now.
I have successfully extracted the system.img and system2.img from the V30H_00.kdz
Nice, maybe later I can do some modifications on recovery.exe, so they can find always the correct partition for recovery.img. (without the user choose one)
[]'s
Click to expand...
Click to collapse
That's good news.
I won't be able to work on the program during the rest of this week. With the system files extracted there's nothing that needs to be urgently done.
Next Step is to to try and build the BIN from other files. I think I can improve on your recovery.exe to add su binary and apk aswel (Might take a bit longer since I need to extract the ext4 partition, add su then put it back together )
Well, it's just a beta, because it use too much ram to write the files.
I need to read the file in chunks, but, for now it's a good prototype, we can using it.
extract.7z
Code:
CRC32: 2199d10f
MD5: 5b8d8031ff5d66ec2832d182e98505be
SHA-1: b6d729a20d4370e25ebc4eddfc27e25673b1d2f2
To use the tool is just run...
Code:
extract.exe filename_AP.bin
It should work on any bin file, tested on P920, P970 and KU5900.
Please report any error.
[]'s
Thanks navossoc its working well on ginger p970 bin file.
Great stuff thanks alot! You to make a great team.
Sent from my LG-P920 using xda app-developers app
Now how can we make a new bin file with that img files?

[Q] How to get a .dz file to a .wdb file

Hey,
After a lot searching i have extract my .kdz file to 2 different files. a .dll and a .dz file. I am searching how can i get those files working in the Smartflashtool. Sow i need a app bin and a CP bin, On this moment i need to know how can i get those files?
- Can i extract a .kdz to a .wdb and .dll sow after that i can extract those to app bin and cp bin?
- Can i extract a .dz file after that compile it to .wdb and do the first step again?
- Is it possible to get from the .dz file also the app bin and the cp bin?
Wrong section sorry
Johrans said:
Hey,
After a lot searching i have extract my .kdz file to 2 different files. a .dll and a .dz file. I am searching how can i get those files working in the Smartflashtool. Sow i need a app bin and a CP bin, On this moment i need to know how can i get those files?
- Can i extract a .kdz to a .wdb and .dll sow after that i can extract those to app bin and cp bin?
- Can i extract a .dz file after that compile it to .wdb and do the first step again?
- Is it possible to get from the .dz file also the app bin and the cp bin?
Wrong section sorry
Click to expand...
Click to collapse
1)
kdz is a archive format, you can't choose what you get out of it. (It's like saying I want a image out of that random zip file)
Click to expand...
Click to collapse
2)
Ask novassoc He said some time ago he's working on dz files.
It should already be possible to extract dz file though, Check on the Optimus G forum.
I don't know to what it extracts possible bin/fls.
Click to expand...
Click to collapse
3)
Again I don't know to what it extracts and if or if not it's possible to revert to dz format. Should be possible.
Click to expand...
Click to collapse
I can give you lot more info about bin files if your interested, but you'd have to ask novassoc about kdz and wdb.
If dz decompiles to bin/fls then you should be able to create the dz file again, but after extracting the bin/fls file you should not create a bin/fls file again. It's possible, but it could kill your phone since emergency recovery usually relies on first or second stage bootloader and the bin/fls files overwrites it when flashing it on your phone and if something goes wrong.
xonar_ said:
1)
2)
3)
I can give you lot more info about bin files if your interested, but you'd have to ask novassoc about kdz and wdb.
If dz decompiles to bin/fls then you should be able to create the dz file again, but after extracting the bin/fls file you should not create a bin/fls file again. It's possible, but it could kill your phone since emergency recovery usually relies on first or second stage bootloader and the bin/fls files overwrites it when flashing it on your phone and if something goes wrong.
Click to expand...
Click to collapse
Thanks, Let we say we have the next files from different phones like the lg L5 e610 it has as firmware files a .dz and a .dll i know the .kdz files haves those files from those firmware. and also when it isnt a .kdz file its possible to encrypt it to .kdz
You know a lot about bin files. What contains a App.bin and a CP.bin when you use it for the SmartFlashTool. Because i wanne try to get from the Firmware files like ( .kdz or .dll or .dz) a app.bin and cp.bin,
Johrans said:
Thanks, Let we say we have the next files from different phones like the lg L5 e610 it has as firmware files a .dz and a .dll i know the .kdz files haves those files from those firmware. and also when it isnt a .kdz file its possible to encrypt it to .kdz
You know a lot about bin files. What contains a App.bin and a CP.bin when you use it for the SmartFlashTool. Because i wanne try to get from the Firmware files like ( .kdz or .dll or .dz) a app.bin and cp.bin,
Click to expand...
Click to collapse
Yes. There is already a tool somewhere to create kdz archive (One of LG's ones, you just have to use WindowsEnabler to get the option)
The bin file (AP) is basically a collection of data blocks and each data blocks usually correspond to partitions on the device.
The first meg is the header which contains the info about all the data blocks
like size on file,offset on file,size on device,offset on disk etc.
The layout of the header seems to be different for each phone. You can identify what type of bin file it is from it's magic number.
Then after the header the data blocks are just appended to the file. Doesn't have to be since the header allows there to be gaps and overlapping data blocks, but thats not practical so it will probably never be any other way.
You can check my tool for extracting bin files here. You can get alot more info on exactly how it's set out in my git by reading the sources.
I don't know to much about the fls file (CP) besides that it does a raw write of everything after what appears to be the header to somewhere in my phones nv partition and contains baseband information.
xonar_ said:
Yes. There is already a tool somewhere to create kdz archive (One of LG's ones, you just have to use WindowsEnabler to get the option)
The bin file (AP) is basically a collection of data blocks and each data blocks usually correspond to partitions on the device.
The first meg is the header which contains the info about all the data blocks
like size on file,offset on file,size on device,offset on disk etc.
The layout of the header seems to be different for each phone. You can identify what type of bin file it is from it's magic number.
Then after the header the data blocks are just appended to the file. Doesn't have to be since the header allows there to be gaps and overlapping data blocks, but thats not practical so it will probably never be any other way.
You can check my tool for extracting bin files here. You can get alot more info on exactly how it's set out in my git by reading the sources.
I don't know to much about the fls file (CP) besides that it does a raw write of everything after what appears to be the header to somewhere in my phones nv partition and contains baseband information.
Click to expand...
Click to collapse
Thanks, but still i am thinking why are there extractors for the kdz-> to cab -> to.wdb and .dll -> to App bin and CP bin but not from the kdz-> to cab -> .dz and .dll -> to App bin and CP bin.
is there sow big difference between the .dz and .wdb
I don't know much about what your talking here. I know that the complete firmware from LG comes in a v....kdz package. I know that ...cab containers are Microsoft's preferred format (something like ...zip or ...rar). I know ...bin stands for a lot BINary data files. I know that ...dll stands for Dynamic Data Library. That APPlications are often called app ...
... and I have the feeling that a lot different things are mixed together here. Sure xonar knows what he is talking about but the rest sounds like not much clue and the rest filled up with things you heard somewhere.
Sent from my LG-P970 using xda app-developers app
SaschaKH said:
I don't know much about what your talking here. I know that the complete firmware from LG comes in a v....kdz package. I know that ...cab containers are Microsoft's preferred format (something like ...zip or ...rar). I know ...bin stands for a lot BINary data files. I know that ...dll stands for Dynamic Data Library. That APPlications are often called app ...
... and I have the feeling that a lot different things are mixed together here. Sure xonar knows what he is talking about but the rest sounds like not much clue and the rest filled up with things you heard somewhere.
Sent from my LG-P970 using xda app-developers app
Click to expand...
Click to collapse
Let me try to explain a litle for y.
You know that a kdz file contains a cab file. Every cab file contains a .dll file.
But not every cab file contains a wdb.
Sow what i need is a wdb file from a cab what doesnt have a wdb file. Or i need a extractor what makes from a .dz file and a .dll file a cp Bin and Ap bin. ( .dz file is the other file what could be in the cab without a .wdb,)
For some more information: When you use the SmartFlashTool. You need 2 files the CP Bin and AP bin.
You can use a extractor to get from a KDZ file a wdb and .dll file. ( From those its possible to create the CP Bin and AP bin)
But when you dont have de WDB file but you have a .DZ file then i cant create a CP bin and AP bin.
thats the problem. Sow now how can i fix that
Johrans said:
Let me try to explain a litle for y.
You know that a kdz file contains a cab file. Every cab file contains a .dll file.
But not every cab file contains a wdb.
Sow what i need is a wdb file from a cab what doesnt have a wdb file. Or i need a extractor what makes from a .dz file and a .dll file a cp Bin and Ap bin. ( .dz file is the other file what could be in the cab without a .wdb,)
For some more information: When you use the SmartFlashTool. You need 2 files the CP Bin and AP bin.
You can use a extractor to get from a KDZ file a wdb and .dll file. ( From those its possible to create the CP Bin and AP bin)
But when you dont have de WDB file but you have a .DZ file then i cant create a CP bin and AP bin.
thats the problem. Sow now how can i fix that
Click to expand...
Click to collapse
Have you tried
DZ-Creator / DZ-Decrypter
or
DZTools
If that fails then you have to reverse engineer your dz file yourself.
The DZ file can't be converted to bin/fls from the looks of it. That is if your dz file is similar to the dz file in the KS20.
That dz file is a collection of data blocks much like the bin file, but they aren't interchangable and I don't think SFT will work with them.
xonar_ said:
Have you tried
DZ-Creator / DZ-Decrypter
or
DZTools
If that fails then you have to reverse engineer your dz file yourself.
The DZ file can't be converted to bin/fls from the looks of it. That is if your dz file is similar to the dz file in the KS20.
That dz file is a collection of data blocks much like the bin file, but they aren't interchangable and I don't think SFT will work with them.
Click to expand...
Click to collapse
OKey sow if i understand this correctly is the .dz a kind of like the bin file. If i read correctly on this forum the wdb is also a collection off files like a zip file.
I think your are right it isnt possible to replace the .dz for a .wdb sow i can flash it in the SFT
Johrans said:
OKey sow if i understand this correctly is the .dz a kind of like the bin file. If i read correctly on this forum the wdb is also a collection off files like a zip file.
I think your are right it isnt possible to replace the .dz for a .wdb sow i can flash it in the SFT
Click to expand...
Click to collapse
Yes.
I don't think it's possible to flash dz file to your phone with SFT.
xonar_ said:
Yes.
I don't think it's possible to flash dz file to your phone with SFT.
Click to expand...
Click to collapse
Thanks for the answers, i know its possible with the kdz flasher but that tool isnt real stable and doesnt do a factory reset after the flash. it must be manual then.

Categories

Resources