Flash.bin build tool for LG KS 20

This is a command line tool to extract content from a flash.bin file and rebuild a new one using other file parts. Click on the link below to download the tool.

Latest version : LGFlashMuncher Version 0.2

Usage :

LGFlashMuncher.exe [options] path [output]
  EXTRACT Options ---(at least one option required)-----------------------------
        -r      : extract Raw data
        -h      : extract header
        -m      : extract MBR
        -p      : extract partitions
        -t      : trim extracted partitions
        -l      : output layout informations to file 'flash.xml'
        -o      : output OS.nb compatible file
        output  : path to output directory (must exists)

  CREATE Options  ---(all options required)-------------------------------------
        -c file : create new flash.bin outputed to 'file'
                  (MBR and fat partition are taken from original flash.bin)
        -e file : use 'file' for header
        -0 file : use 'file' for partition 0 (boot)
        -1 file : use 'file' for partition 1 (rawfs)
        -2 file : use 'file' for partition 2 (imgfs)

  COMMON Option  ---------------------------------------------------------------
        path       : path to flash.bin file

Next, how to extract data from a flash.bin to a directory named output :

LGFlashMuncher.exe -htmlp FLASH.bin output

How to rebuild a new flash.bin :

LGFlashMuncher.exe -c newflash.bin -e header.bin -0 part_0_BOOT.bin -1 part_1_RAWFS.bin -2 part_2_IMGFS.bin FLASH.bin

DZExtract LG DZ file format and extract tool lg ks20

Everything is in the title, just click on the link below to download the file.

Latest version : DZ Extract Version 0.2

Some details about the various format found in the DZ file.

DZ File format
Offset length (byte) Description
0x0 0x8 Magic code “MSTXMETX”
0x8 0x2 Unknown, same value in all files (value 0x01)
0xA 0x2 Separator ? (value 0x0)
0xC 0x2 Unknown, same value in all files (value 0x0B)
0xE 0x2 Separator ? (value 0x0)
0x10 0x6 Unknow, value differs from file to file
0x16 0x2 Unknown, same value in all files (value0x01C8)
0x18 0x8 String, phone model ? (value “KS20”)
0x20 0x50 String, file title ?
0x70 0x1C Two null terminated string concatened (“[chipmodel]\\0[osname]\\0”)
0x8C 0x80 String, DZ filename
0x10C 0x20 Separator (filled with 0xFF)
0x12C 0x10 Header MD5 hash
0x13C Variable Concatened subfiles (see Subfile format)
0x78 Offset Table, unknown useage
Optionnal data, present in some DZ file (unknown)


Subfile format
Offset length (byte) Description
0x0 0x4 Magic code “SSTX”
0x4 0x2 Unknown, same value for all subheaders (value 0x01)
0x6 0x2 Separator ? (value 0x0)
0x8 0x2 File Type ?
0xA 0x6 Separator ? (filled with 0x0)
0x10 0x4 Data length
0x14 0x80 Filename, null terminated string
0x94 0x10 Separator (filled with 0xFF)
0xA4 0x10 Uncompressed data MD5 hash
0xB4 0x10 Subheader MD5 Hash
0xC4 Data length Gzip compressed data


File type
Type Filename Description
0x3 amss.mbn AMSS modem
0x8 partition.mbn Partition table
0xA qcsblhd_cfgdata.mbn QCSBL header
0xB qcsbl.mbn QCSBL
0xC oemsblhd.mbn OEM boot header
0xD oemsbl.mbn OEM boot
0xE amsshd.mbn AMSS modem header
0x13 appsboothd.mbn APPS boot loader header
0x14 appsboot.mbn APPS boot loader
0x15 FLASH.bin Windows CE flash.bin
0x16 apps.mbn APPS