[GUIDE] How to make your own flashable zip ROMS for CWM/TWRP from kdz

Search This thread

Daisuke1988

Senior Member
Sep 16, 2012
144
52
thanks for your replonse. but now another issue im having, when i zip it, the system img and boot img go inside the meta inf folder? or make a new folder containing the two img and the meta folder?
 

barqqlsky89

Member
Jul 27, 2010
49
16
Gdańsk
if lg releases new update
then you can download the kdz and make a zip which can be flashed through cwm without loosing the recovery or unlocked bootloader status.

your back up will give you only the original version you have backed up not the new released version.

It is enough to flash only system and boot when I update rom? Or I need also flash other partitions like laf, modem, factory etc.?

BTW thanks for great tut.
 

Daisuke1988

Senior Member
Sep 16, 2012
144
52
Okay, so i created a file like you stated, meta info, system.img, and boot.img. however in cwm it fails to install. im not sure what im doing wrong. I removed the cust.bin in the update script.
 

Daisuke1988

Senior Member
Sep 16, 2012
144
52
Well I've tried multiple times and it fails, the last time I tried I got a status 6 error.... So, I'm asking for a copy of their own zip please??? Pretty please?? Lol my model is the T-Mobile D415

---------- Post added at 07:18 AM ---------- Previous post was at 07:15 AM ----------

I'm also running cwr 6.0.5.0. Don't know if that makes a difference
 

betoNL

Senior Member
Hi....
thank you for this

Question:

now extract
KDZ and TOT Extractor to dzextracted folder and go to dzextracted folder.
Open WindowsLGFirmwareExtract.exe


Not clear to me ...how do I extract KDZ and TOT Extractor to dzextracted folder and open WindowsLGFirmwareExtract.exe ? Should I not open tool first, then add dzextracted folder and merge?

Sorry for the noob question, first time dealing with LG and KDZ stuff..
 

IDontKnowMang

Senior Member
Aug 19, 2013
220
65
OnePlus 10 Pro
so ive made it all the way to the end and inside dzextract folder i didnt get any cust.bin file i do have system and boot though. did this for an lg aristo 2 x210ma10d kdz file is it replaced by another file type/name?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 14
    hi friends
    As you know there is CM-11.0 development going on for our L90
    And flashing back to stock is a painful process.
    you loose bootloader unlock status/root/recovery.

    So i am putting here a guide to make your own flashable zips which can be flashed through CWM/TWRP.

    All from your stock KDZ firmware.
    Code:
    #include  
    /*  * Your warranty is now void.  
    *  * I am not responsible for bricked devices, dead SD cards,  
    * thermonuclear war, or you getting fired because the alarm app failed. Please  
    * do some research if you have any concerns about features included in this ROM  
    * before flashing it! YOU are choosing to make these modifications, and if  
    * you point the finger at me for messing up your device, I will laugh at you. Hard. A lot.  */
    GUIDE has following parts
    1.Preparation/pre-requisites

    2. Extarcting IMGs from KDZ

    3.Making a flashable zips.
    1.Preparation/pre-requisites
    you need
    a]Windows PC

    b]pyton 2.7 installed on it
    download link
    https://www.python.org/ftp/python/2.7.8/python-2.7.8.msi

    c] [Tool][python] LG Compressed KDZ Extractor

    download from following thread
    http://xdaforums.com/showthread.php?t=2483250

    d]notepad++ installed

    download link
    http://download.tuxfamily.org/notepadplus/6.6.8/npp.6.6.8.Installer.exe

    e][TOOL] KDZ and TOT Extractor

    download from following thread
    http://xdaforums.com/showthread.php?t=2600575

    always download latest WindowsLGFirmwareExtract-ver.1.2.1.0

    f]Flashable zip template
    download the attachment below.

    e]Unlocked bootloader with CWM/TWRP installed
    for unlocking follow
    http://xdaforums.com/lg-l90/general/guide-guide-to-unlocking-bootloader-l90-t2852917
    this thread

    for CWM/TWRP you can download from
    http://xdaforums.com/lg-l90/development/rom-cyanogenmod-11-lg-l90-t2831541

    f] Zip software
    i use 7zip

    2. Extarcting IMGs from KDZ
    So now lets get started with real stuff.

    extract python tool you downloaded in C:\Python27
    then copy your kdz file to C:\Python27

    go to
    C:\Python27

    open Command prompt there by pressing shift+right click

    give following command

    Code:
    C:\Python27>python KDZFileTools.py -l -f D41010c_00.kdz
    my kdz file name is D41010c_00.kdz

    it may give the error like

    Code:
    [!] Error: Unsupported KDZ file format.
    [ ] Expected: 0x28 0x5 0x0 0x0 0x34 
    0x31 0x25 0x80 ,
            but received 0x28 
    0x5 0x0 0x0 0x24 0x38 0x22 0x25
    .

    open KDZFileTools.py file with notepad++

    you will see

    Code:
    "\x28\x05\x00\x00\x34\x31\x25\x80"
    change it to

    Code:
    "\x28\x05\x00\x00\x24\x38\x22\x25"
    save the file and exit.

    now run the command again

    Code:
    C:\Python27>python KDZFileTools.py -l -f D41010c_00.kdz
    [+] KDZ Partition 
    List
    =========================================
     0 : D41010d_0.dz 
    (1027325284 bytes)
     1 : WX.dll (1303040 bytes)
     2 : ♥WX.dylib 
    (243307520 bytes)
    now it will show you the file list in kdz file

    now run following

    Code:
    C:\Python27>python KDZFileTools.py -f D41010c_00.kdz -x
    it will show the follwoing prompt

    Code:
    C:\Python27>python KDZFileTools.py -f D41010c_00.kdz -x
    [+] Extracting 
    all partitions!
    
     
    [+] Extracting D41010d_0.dz to kdzextracted\D41010d_0.dz
    [+] Extracting 
    WX.dll to kdzextracted\WX.dll
    [+] Extracting ♥WX.dylib to 
    kdzextracted\♥WX.dylib
    Traceback (most recent call last):
      File 
    "KDZFileTools.py", line 195, in <module>
        
    kdztools.main()
      File "KDZFileTools.py", line 191, in 
    main
        self.cmdExtractAll()
      File 
    "KDZFileTools.py", line 172, in cmdExtractAll
        
    self.extractPartition(part[0])
      File "KDZFileTools.py", line 112, in 
    extractPartition
        outfile = 
    open(os.path.join(self.outdir,currentPartition['name']), 'wb')
    IOError: 
    [Errno 22] invalid mode ('wb') or filename: 'kdzextracted\\\x03WX.dylib
    '
    dont worry it is fine

    now we have DZ file in kdzextracted folder

    now give following command

    Code:
    C:\Python27>python DZFileTools.py -f kdzextracted/D41010d_0.dz -x
    this will give you following prompt

    Code:
    C:\Python27>python DZFileTools.py -f kdzextracted/D41010d_0.dz -x
    [+] 
    Extracting all partitions!
    
     
    [+] Extracting PrimaryGPT_0.bin to dzextracted\PrimaryGPT_0.bin
    [+] 
    Extracting modem_16384.bin to dzextracted\modem_16384.bin
    [+] Extracting 
    sbl1_147456.bin to dzextracted\sbl1_147456.bin
    [+] Extracting rpm_149504.bin 
    to dzextracted\rpm_149504.bin
    [+] Extracting tz_150528.bin to 
    dzextracted\tz_150528.bin
    [+] Extracting sdi_151552.bin to 
    dzextracted\sdi_151552.bin
    [+] Extracting aboot_152576.bin to 
    dzextracted\aboot_152576.bin
    [+] Extracting rpmb_156672.bin to 
    dzextracted\rpmb_156672.bin
    [+] Extracting tzb_157696.bin to 
    dzextracted\tzb_157696.bin
    [+] Extracting abootb_158720.bin to dzextracted\abootb_158720.bin
    [+] Extracting persist_212992.bin to 
    dzextracted\persist_212992.bin
    [+] Extracting laf_278528.bin to 
    dzextracted\laf_278528.bin
    [+] Extracting boot_327680.bin to 
    dzextracted\boot_327680.bin
    [+] Extracting recovery_372736.bin to 
    dzextracted\recovery_372736.bin
    [+] Extracting rct_459776.bin to 
    dzextracted\rct_459776.bin
    [+] Extracting factory_507904.bin to 
    dzextracted\factory_507904.bin
    [+] Extracting sbl1b_622592.bin to 
    dzextracted\sbl1b_622592.bin
    [+] Extracting cust_704512.bin to 
    dzextracted\cust_704512.bin
    [+] Extracting system_933888.bin to 
    dzextracted\system_933888.bin
    [+] Extracting system_1197064.bin to 
    dzextracted\system_1197064.bin
    [+] Extracting system_1201176.bin to 
    dzextracted\system_1201176.bin
    [+] Extracting system_1462288.bin to 
    dzextracted\system_1462288.bin
    [+] Extracting system_1725464.bin to 
    dzextracted\system_1725464.bin
    [+] Extracting system_1986576.bin to 
    dzextracted\system_1986576.bin
    [+] Extracting system_2249752.bin to 
    dzextracted\system_2249752.bin
    [+] Extracting system_2510864.bin to 
    dzextracted\system_2510864.bin
    [+] Extracting system_2774040.bin to 
    dzextracted\system_2774040.bin
    [+] Extracting system_3035152.bin to 
    dzextracted\system_3035152.bin
    [+] Extracting system_3298328.bin to 
    dzextracted\system_3298328.bin
    [+] Extracting system_3559440.bin to 
    dzextracted\system_3559440.bin
    [+] Extracting system_3821584.bin to 
    dzextracted\system_3821584.bin
    [+] Extracting system_4079616.bin to 
    dzextracted\system_4079616.bin
    [+] Extracting system_4341760.bin to 
    dzextracted\system_4341760.bin
    [+] Extracting system_4603904.bin to 
    dzextracted\system_4603904.bin
    [+] Extracting system_4866048.bin to 
    dzextracted\system_4866048.bin
    [+] Extracting BackupGPT_15268864.bin to 
    dzextracted\BackupGPT_15268864.bin
    
     
    C:\Python27>
    now extract
    KDZ and TOT Extractor to dzextracted folder and go to dzextracted folder.
    Open WindowsLGFirmwareExtract.exe

    click on
    Code:
    merge system-bin
    it will start merging and output will be C:\Python27\dzextracted\merge_output

    you have now got your system.img

    3. Makinhg a flashable zip

    now in dzextracted folder
    Code:
     rename boot_327680.bin to boot.img
    and
    Code:
    rename cust_704512.bin  to cust.bin
    Now extract the attached zip to this post where ever you want.
    you will get META-INF folder.
    copy system.img,boot.img,cust.bin to that folder

    now you have
    Code:
    META-INF,  system.img,boot.img,cust.bin
    make a zip containing all 4 with 7zip.

    there you go..... now have your own flashable zip. :)

    CREDITS
    bullghost for kdz&tot extract tool
    thecubed for python kdz extraction tool
    Quarx for CWM/TWRP/ and CM
    LG for KDZ
    2
    if lg releases new update
    then you can download the kdz and make a zip which can be flashed through cwm without loosing the recovery or unlocked bootloader status.

    your back up will give you only the original version you have backed up not the new released version.
    2
    Alright. Sorry I'm away from computer outside is provide links

    Search XDA/Google how to extract system.IMG
    They're are guides in XDA
    Once you have it the /system extracted
    you can make mods to it.
    You'll have to modify the update-script to flash the modded system folder instead of the .IMG
    Or create a. IMG of the modded /system folder so you don't have to change the update script
    Zip up and flash.
    Hopefully NO bootloop
    one more method

    you can do that in linux

    mount the system.img
    open it
    make changes
    save it
    flash that file through the zip template in OP.
    @InfinitusDesigner please dont quote the whole OP . it is against XDA rules. Please edit that post above.
    1
    Great guide!
    BTW, there was one error I found.

    Instead of:

    Code:
    C:\Python27>python DZFileTools.py -f kdzextracted/D41010[COLOR="Red"]d[/COLOR]_0.dz -x

    It should have been:

    Code:
    C:\Python27>python DZFileTools.py -f kdzextracted/D41010[COLOR="Red"]c[/COLOR]_0.dz -x


    PS:
    If your running on D415 just replace D410 with whatever version you have.


    Just one question?
    What is the cust.bin for? Is that the data partition?

    no my friend my dz has "d" in it intead of "c "
    i dont know why but it is that way only.

    cust.bin is needed for boot process i think. i have read on forums for other lge phones.

    ya just replacing name of kdz should work fine. for other varients.

    @SubliemeSiem
    it is simple flashable zip.
    and advantage is that you can change your stock version instead of flashing kdz with this method.

    i am currently working on making android kitchen along with this.

    i will keep you people updated on this front...:)