[Extract|Build] LG DZ Tools (updated 03/06/11) - Windows Phone 7 Development and Hacking

Hello.
WP7DZExtract extracts every partition from DZ file and converts flash.bin to nb (opens by htcRIE).
My second tool WP7DZBuild builds DZ from partitions and their table (mb it will be not required, please pm me LG device owners).
By the way, files from that topic were extract using this tool.
Usage:
WP7DZExtract.exe input.dz output_dir, there input.dz is DZ ROM file, output_dir is directory.
In output directory will be created many files, one of them, flash.bin, is nb file, just rename it to flash.nb and open it using htcRIE or any tool.
WP7DZBuild.exe input_dir output.dz, there input_dir is directory constains flash.bin, output.dz is out file.
Note: This tools requires .Net Framework 4.0 (at least Client Profile). You can download it form Microsoft web site.
I hope it works (althrough my device is LG, but there is no way to dump or flash it's ROM). Any bugreports here.
Thanks!
I've used standart GZIPStream (works well for unpacking), but it's output doesn't equals original, i've tried to use SharpZip, DotNetZip and even gzip, but uselessly... LG Flasher doesn't work on my computer (why?), so i can't check my work, i fully hope on you, LG owners! Sorry for my english, i dislike online translators and write as i know, though my english skill is pour (too).

Very nice. Hope to get using this very soon.

Yes support for lg devices i am loving it :3 Thanks.
I will tested out.

thx for sharing

Build tool is ready!

Great work!

I'm getting a "#46 Cannot load. Invalid file format" when opening flash.nb with HTCRIE

Please post the link to your ROM, mb i broked down something while developed build tool.

Telus_LG_E900

airwa1kin7 said:
Telus_LG_E900
Click to expand...
Click to collapse
Everything works well. Mb you are using old version of htcRIE? Try to donwload most fresh. At least WP7DZExtract checks hash after unpacking and compares it with dz included, so if hash matchs file is successfully unpacked.
Screenshot

Your correct. I was using "0.5.0.12" Upgraded to "0.7.0.19" and it works.

I was able to get the LG Quantum dz and use these tools to have a look inside the rom and the registry. It makes me wish we could rebuild these roms to unbrand them.

fb401 said:
I was able to get the LG Quantum dz and use these tools to have a look inside the rom and the registry. It makes me wish we could rebuild these roms to unbrand them.
Click to expand...
Click to collapse
That's right, i wanted to build my own rom, but as i wrote above there is no rom for my device. Please test it LG owners, i want to check my gz.

WP7DZBuild
I have been working on my own encrypt/decrypt program. The decrypting is fine, however the trick is encrypting the extracted files back into a flashable image. Using GZip or Zip on linux produces a ROM that is 200 KB smaller than the original LG C900AT ROM. The LG flasher program gives the error "ErrNum 501 Load Image."
So I tried using your WP7DZBuild tool to create a ROM and it's size is 214 MB, the original ROM is ~191.8 MB. The LG flasher program does not give an error when using the ROM built with your tool, but the ROM will not flash to the phone (LG Quantum C900). The LG flasher program just sits waiting. It seems as if the recompression of the files is the key to making the build process work. The original ROM from LG contains files that are decompressable with GZip, but using GZip to recompress results in an invalid file.
I have looked at the binary file produced when using both GZip and Zip, both contain the filename which is not included in the Original ROM . Also, looking at the GZIP file format, some of the Data headers are empty in the original ROM, but both GZip and ZIP fill these fields in.
Do you guys have any ideas as to a ZIP program/library that can output a valid Zip file for inclusion in a flashable ROM that does not include the name of the file that was compressed to make the file? Maybe the original LG encryption program deletes/zeros certain fields in the Zip file header?
Also, just taking the decrypted original ROM's files while still compressed by whatever method LG used, I can create a flashable ROM (it's actually what my phone is running right now!). I'm thinking of GZipping the files and then going back and zeroing out the fields so that the data headers match the original. Maybe that will work.
Has anybody else tried to rebuild a ROM and flash it to the phone?

Everyone test on kdz g5 ?

Related

LG Expo ROM Decompiled

I was asked to help get a file working today. and So I did.
Download the Official LG Expo ROM.
That will extract the files to C:/Users/All Users/LGMobileAX/Phone
you will then have a *.dz file
Copy that file somewhere it wont matter where, just so that DZDecrypt is in the same directory.
Once you have that, just either drag and drop the .dz file to DZDecrypt or load it up from CMD window.
You should get something like
C:\Users\Conflipper\Desktop\[LG] kitchen_2.0\TOOLS>DZDecrypt ROM.dz
DZ-Decryptor v0.5 *final* by BIGB0SS from COPS.
[■] Opening file "ROM.dz".
[■] Unpacking informations:
- Unpacking "amss.mbn" (Packed:0070CFF2 - Unpacked:00E4A000).
- Unpacking "partition.mbn" (Packed:000000B4 - Unpacked:000001D0).
- Unpacking "appsboot.mbn" (Packed:00032015 - Unpacked:000B3028).
- Unpacking "FLASH.bin" (Packed:0B7EFF74 - Unpacked:0DB5FA0B).
- Unpacking "apps.mbn" (Packed:00000014 - Unpacked:00000000).
- Unpacking "dbl.mbn" (Packed:00003141 - Unpacked:00008270).
- Unpacking "fsbl.mbn" (Packed:00013AE4 - Unpacked:00028E98).
- Unpacking "osbl.mbn" (Packed:000297C1 - Unpacked:00054E74).
- Unpacking "dsp1.mbn" (Packed:002BDB58 - Unpacked:00749D64).
- Unpacking "fwua.mbn" (Packed:00006E36 - Unpacked:0000A43C).
[■] Closing file "ROM.dz".
This will give you all of the files that you need.
Please note that you need to use the file I have attached. This file has been edit so that it will allow for the larger Expo ROM, it was designed to be used with LG Incite and so here it is for the Expo.
Thank Copsfrance for the SRC and orginal tool.
Here is the .dz file broken down to its indivdual parts.
LG EXPO .DZ file Broken Down
250MB DZDecypt
Awesome stuff Conflipper thx
jug6ernaut said:
Awesome stuff Conflipper thx
Click to expand...
Click to collapse
Very cool now how about dumping flash.bin thats one heck of a ***** there too

Contents.xml

SystemFS\User\MultiStage\Contents.xml
You could extract this file from *.FFS or grab from handset.
Maybe some tweaking possible...
S5PC110_EVT1_UM10.pdf
2D Graphic Engine
− BitBLT
− Supports maximum 8000x8000 image size
Click to expand...
Click to collapse
<FileFormat>
<JPG>
<MaxFileSize value="4096000"/>
<MaxWidth value="5000"/>
<MaxHeight value="5000"/>
<ThumbNail>
<MaxWidth value="1280"/>
<MaxHeight value="1024"/>
</ThumbNail>
</JPG>
There are more infos in this file...
<MaxInstallCount>
<NativeApp value="100"/>
<NativeWidget value="50"/>
<JavaApp value="-1"/>
</MaxInstallCount>
</AStore>
</Contents>
</SDP>
Check out, maybe interesting or helpfull.
Best Regards
I already tryed to increase the max. resolution to 8000x8000px for jpg a week ago but it didnt worked
This file exists 2 times and I flashed them correctly to the wave (tested with sTunes after flash), the limits seems to be set somewhere else...
The image sizelimit is also higher than 4096000 byte (or what it is) - about 10 mb.
I would have liked to tweak this setting to 200 or more and see but unfortunately there are not that many good apps to install.
<MaxInstallCount>
<NativeApp value="300"/>
<NativeWidget value="50"/>
<JavaApp value="-1"/>
</MaxInstallCount>
Btw, what does this Java value mean ? Could it be that it controls whether to show icon in Menu or not ?
SystemFS\User\MultiStage
User\MultiStage
@ st0rmi
Thanks.
Yes, via sTune this file is twice.
It seems writeprotected files are most in folder SystemFS... as Backup.
If you check via TriX Firmware files. Then Contents.xml is in *.FFS... maybe edit before flashing. Then changes in both files on handset.
Not tested yet...
@ rex4u
At the moment I have nothing changed in this file, so no idea what happens.
Maybe soon few tests...
Best Regards
@adfree: Yeah thats what I have done
I just used sTunes to copy the contents.xml back to my pc and view if the edited xlm are really on my phone because it didnt worked...
@adfree
No bro' I was offering my own suggestions to this configuration file.
It might allow us to install more than 100 apps in phone and show in Menu.
Second it might show Java apps icons in Menu.
My 2 cents
xml parser
please help me
a want to parser punker xml data base.
rex4u said:
I would have liked to tweak this setting to 200 or more and see but unfortunately there are not that many good apps to install.
<MaxInstallCount>
<NativeApp value="300"/>
<NativeWidget value="50"/>
<JavaApp value="-1"/>
</MaxInstallCount>
Btw, what does this Java value mean ? Could it be that it controls whether to show icon in Menu or not ?
Click to expand...
Click to collapse
it's into the 'app counter' field, '-1' may be means 'unlimited' number of java apps installable, but I haven't read yet the whole xml... anyway if it is editable it's an interesting thing..
I saw that file a while ago while looking for something inside my phone (very special thing that made me to copy the whole phone)
there is a lot of interesting things but i never tried tweaking it
Maybe if someone have enough knowledge to add few new extensions and test them
Also removing some stupid limits would be awsome
Sorry i've no time to test that with you guys but would appreciate results
Best Regards
You dont need modif ffs or other just use pfs file to modif what you want and in real time direct phone flash pfs file and not have write protect problem
Just says Thank
Example file : dont give attention of boot img cause i dont take time to do it in 800x480 but its 400x240 then its make bug but with pfs file you can upload anything you want to change !!!
Good hack !!!
Maybe with this you can create dual boot or i dont know what a pro smoker can do, you can also try to put her rc2 or rc1 directory i dont try it !!!
Download example, in this one you can see SystemFS and Registry directory, off course you can put her all directory you want to flash pfs, using trix to modified or wave remaker more faster :
https://rapidshare.com/files/809973956/Circle.pfs
An idea its like you can make your one firmware with personal Widget installed and other idea welcome....Just take file registry and Widget folder on phone and put it on PFS
i can not open new thread
i went to parser an xml file with structure like this.
<?xml version="1.0"?>
<node1>
<node2>
<node3>
<node4>
<node5>
text
</node5>
</node4>
</node3>
</node2>
</node1>
Click to expand...
Click to collapse

[TOOL] rkDumpSlicer (RockChip firmware dump slicer)

rkDumpSlicer
RockChip firmware dump slicer to obtain flashable backup
Version 0.97 Windows
1. Slices dump of NAND into partitions (according "parameter" information)
2. Creates config,cfg for RKAndroidTool (1.xx, 2.xx)
Brief instruction
1) Download and unpack AndroidTool v.2.1 + rkDumpSlicer
2) Run AndroidTool 2.1
3) Get the "parameter" file (put a 0 in the "start" box and a 2 in the "count" at "advance functions" tab and press the "export image" button).
4) Open file ExportImage.img in any text editor (except MS Word).
5) Find line "CMDLINE:....bla-bla-bla"
6) Find last data in "mtdparts=rk29xxnand:" parameter (something like "[email protected](user)")
Value "0x005AE000" is count of blocks
7) Put a 0 in the "start" box and value from previous point in the "count".
8) Press the "export image" button.
9) Run "rkDumpSlicer.exe ExportImage.img"
The project is closed
Use rkDumper​Old versions:
View attachment rkDumpSlicer_095.zip
View attachment rkDumpSlicer_096.zip
I don't know anybody needs this tool
Tell me please
RedScorpioXDA said:
I don't know anybody needs this tool
Tell me please
Click to expand...
Click to collapse
Hi Redscorpio
Have you seen this tool, I think it's similar to yours.
http://www.freaktab.com/showthread.php?12404-RockchipDumpSplit-Simplifies-the-creation-of-backups-from-rockchip-devices
dewettie said:
Have you seen this tool, I think it's similar to yours.
http://www.freaktab.com/showthread.php?12404-RockchipDumpSplit-Simplifies-the-creation-of-backups-from-rockchip-devices
Click to expand...
Click to collapse
I don't think so. Maybe even better , but I did this tool for myself. If anyone is not interesting I will not publish
RedScorpioXDA said:
rkDumpSlicer
RockChip firmware dump slicer to obtain flashable backup
Version 0.95 Windows
...
Click to expand...
Click to collapse
Just to know before I use your tool (or the other one in freaktab)
Some device makers post their firmware in one file, normally titled "update.img", in this are included all is needed.
Are flashed back using RKBatchTool ... your app will generate such file?
TIA
DaremoS said:
Some device makers post their firmware in one file, normally titled "update.img", in this are included all is needed.
Are flashed back using RKBatchTool ... your app will generate such file?TIA
Click to expand...
Click to collapse
Some files in "update.img" (RKAF) don't contained in devises partitions. For example: bootloader (like RK3188Loader(L)_V1.24.bin for RK3188), recover-script, update-script. You can add files and make own flashable fw (imgRePackerRK with option /rkaf)
rkDumpSlicer
RockChip firmware dump slicer to obtain flashable backup
New version 0.96 ready
+ RKAndroidTool's configuration files creating have added
- config_8.cfg for version 1.xx;
- config_16.cfg for version 2.xx;
thanks.
is this tools able to bacup rk2926
mithun roy said:
is this tools able to bacup rk2926
Click to expand...
Click to collapse
I haven't possibility to check
rkDumpSlicer
RockChip firmware dump slicer to obtain flashable backup
New version 0.97 ready
~minor bugs fixed
The project is closed
Use rkDumper​
Excellent and reliable tool, thanks a lot!
Works much better for me than the other image splitting program which, for some reason, keeps aborting, telling me that I have 0.00MB or free disk space although I have hundreds of gigs free.
RkDumper is nice too, but I prefer doing a full NAND dump using RK Android Tool and use this one to split it.
Yet another one of your very, very useful tools, RedScorpio.
спасибо !

unpackimg Compression used: data Error!

Hello Comunity
I want to play around with my own build of Cyanogenmod. I have an not yet supported (Mediatek) device and want to give it a try... (It probably will not work and I will hardbrick my device but thats better than just throw it away and buy a new smartphone because mine is quite old).
I have the stock ROM already with the boot.img and recovery.img and a Windows version of Android Kitchen which contains unpackimg.
Now I tried to unpack an image (I tried both boot.img and recovery.img) but it gives an error:
Code:
Android Image Kitchen - UnpackImg Script
by osm0sis @ xda-developers
Supplied image: boot-sign.img
Removing old work folders and files . . .
Setting up work folders . . .
Splitting image to "/split_img/" . . .
BOARD_KERNEL_CMDLINE
BOARD_KERNEL_BASE 10000000
BOARD_NAME 1392980983
BOARD_PAGE_SIZE 2048
BOARD_KERNEL_OFFSET 00008000
BOARD_RAMDISK_OFFSET 01000000
BOARD_TAGS_OFFSET 00000100
Unpacking ramdisk to "/ramdisk/" . . .
Compression used: data
Error!
Then I read about "lokied" images, which seem to be protected somehow. Because of that I downloaded the Loki-Addon and tried unlokimg. That gives me a new image which results in the same error as above.
Sorry, but for some reason I am not allowed to add links to this post, maybe because I am a new user...
But the program I used could be found in [DEV][TOOL] Android Image Kitchen - Unpack/Repack Kernel Ramdisk [Win/Android/Linux] by osm0sis.
Is this a common error and is there any way to use those images for building my own Cyanogenmod?
+++ I just found a solution:
The Problem was that I have a Mediatek device. Mediatek SoCs seem to use an different type of packing their ramdisk files.
But you are able to process such files with this tool: https://github.com/bgcngm/mtk-tools

Does someone have file_contexts file for OP3 on 7.X (Nougat) ?

Trying to make some very minor changes to the ROM, and I just need the original "file_contexts" (NON-BIN VERSION) file for OP3 on 7.X (Nougat). Does anyone have a copy of it?
Summary: 7.X+ now uses .bin files ("file_contexts.bin"). I can't use this file with the make_ext4fs utility. I need to use the original format "file_contexts" file. If anyone could convert the attached .bin file (I don't know how, and professor Google doesn't yield any salient results), or if they have a file they know will work, please let me know.
Thank you!!!

Categories

Resources