Announcement

Collapse
No announcement yet.

DENOVA Novatek FW unpacking script.

Collapse
This is a sticky topic.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • DENOVA Novatek FW unpacking script.

    DENOVA script v0.8. download | mirror | mirror

    Unpacks single- and dual-partition Novatek FW files.
    Unpacked file(-s) will be saved at /DENOVA folder.

    Supported Novatek firmware types:
    • 2 BCL partitions in a row.
    • 1 FullComp BCL partition.
    • 1 PartComp BCL partition.
    Usage: denova.bat <filename>
    Example: denova.bat FW96660A.bin

    List of extracted files for firmwares, containing two BCL partitions:
    1.bcl - Original 1st BCL partition without the footer (tailing 40 bytes)
    1.bin - Unpacked 1st BCL partition
    2.bcl - Original 2nd BCL partition (IQ) with 1st BCL partition footer in the beginning of the file

    Firmwares, consisting of one BCL partition will be extracted to 1.bin file.

    Run GETBITS.BAT to extract the bitrate values and offsets. Note: Only NT96660 firmwares are supported now.

    Run DUMP2BIN.BAT to convert SPI-flash dump to firmware update file. Works with NT96660 4 and 8 Mb dumps.
    Last edited by nutsey; 11-03-2019, 02:49 PM.
    Donate here if you want to support my efforts and this site.

    Email me if you have any offers, requests or ideas.

  • #2
    DENOVA script v0.3 download

    List of extracted files for firmwares, containing two BCL partitions:
    1.bcl - Original 1st BCL partition without the footer (tailing 40 bytes)
    1.bin - Unpacked 1st BCL partition
    2.bcl - Original 2nd BCL partition (IQ) with 1st BCL partition footer in the beginning of the file

    Firmwares, consisting of one BCL partition will be extracted to 1.bin file.
    Donate here if you want to support my efforts and this site.

    Email me if you have any offers, requests or ideas.

    Comment


    • #3
      I've found a bug/problem: DENOVA only works with FullComp firmwares.
      This happens with NonComp (BCL1 @0x000b0000)
      Code:
      DENOVA Novatek firmware unpacking script by nutsey for GoPrawn.com v0.3
      
      1 partition found.
      
      decompress tempfile.bin to DENOVA/1.tmp...
      Input file: 2574288 bytes
      Output file: 0 bytes
      error: end offset is lower than start offset
      1 errors occurred.
      error: no such output file: DENOVA/1.bin
      1 errors occurred.
      Sample file: http://download1485.mediafire.com/nebjgi9j19tg/mw791y87jbw8188/SG9665GC_V2_Firmware_update_latest.zip
      Last edited by [email protected]; 01-30-2017, 07:43 PM.

      Comment


    • #4
      DENOVA script v0.4 download

      Supported Novatek firmware types:
      • 2 BCL partitions in a row.
      • 1 FullComp BCL partition.
      • 1 PartComp BCL partition.
      Donate here if you want to support my efforts and this site.

      Email me if you have any offers, requests or ideas.

      Comment


      • #5
        Updated to v0.5.

        GETBITS v0.1 script added.

        Click image for larger version

Name:	getbits.png
Views:	962
Size:	5.9 KB
ID:	2696
        Last edited by nutsey; 03-10-2017, 08:19 AM.
        Donate here if you want to support my efforts and this site.

        Email me if you have any offers, requests or ideas.

        Comment


        • dimok135
          dimok135 commented
          Editing a comment
          Thanks! Hope you will have time to make support for Elephone EleCam Explorer Elite 4K

      • #6
        Hello. Trying to unpack firmware from Elephone EleCam Explorer Elite 4K because it has too low bitrate. In the begining of .bin there is such text: BCL1 ... NT96660 ... 1000000020100701 but ntfwtool.exe
        crashes on unpack. (using DENOVA script v0.5)

        "
        error: end offset is lower than start offset 1 errors occurred. error: no such output file: footer.bin 1 errors occurred. "

        Firmware link:
        FW: 2017-01-06: https://mega.nz/#!80hW3ZjY!0xBdK-rJU...NCp6v0zEMBo-o8
        Loader 2017-02-08: https://mega.nz/#!dwIxDbIY!ag__fyN0PTRlASL2izsZJWa_yDtIBiB53IRHB2q ur20

        Old: https://mega.nz/#!qhhyWQgA!LvgfzIc1w...m2Ml1b_bLSK-z0
        No luck with other utilities.
        Last edited by dimok135; 04-23-2017, 08:21 PM.

        Comment


      • #7
        Can you please explain me if I have found some text which is probably responsible for bitrate, how to find here ordinary digits? What should I change?
        Thanks in advance.

        Comment


        • nutsey
          nutsey commented
          Editing a comment
          Run GETBITS script with 1.bin in DENOVA folder and you'll get OFFSETS.TXT from which you can learn all bitrates offsets.

      • #8
        nutsey, thank you. I've seen instruction. The second problem is that I see hex values of bitrate but I don't know in what form is it and what values to change. I understand that I'm newbie and you don't have to explain me all stuff of reverse ingeniering but I guess this task is not super hard. I'm trying to convert hex to dec with windows calculator. Is it right?

        Comment


        • nutsey
          nutsey commented
          Editing a comment
          Real values are divided by 2, stored in reversed ordered hex.

      • #9
        Updated to v0.6.

        DUMP2BIN v0.1 script added.
        Click image for larger version

Name:	dump2bin.png
Views:	963
Size:	4.6 KB
ID:	3610
        Donate here if you want to support my efforts and this site.

        Email me if you have any offers, requests or ideas.

        Comment


        • yspance
          yspance commented
          Editing a comment
          very usefull, saved my life !

      • #10
        Ok, I almost found what is what. Hex to dec helped. Stil don't understand bitrate values.
        Click image for larger version

Name:	1.JPG
Views:	918
Size:	62.6 KB
ID:	3617
        Last edited by dimok135; 04-24-2017, 07:10 PM.

        Comment


        • nutsey
          nutsey commented
          Editing a comment
          Ok. The first bitrate stored as 0x00E02E -> reverse it -> 2EE0 -> dec -> 12000 -> the real value is x2 as I said above = 24000

      • #11
        Great! Thanks!

        Comment


        • #12
          Now how to pack firmware again after modding?

          Comment


          • nutsey
            nutsey commented
            Editing a comment
            This script is not ready yet

        • #13
          Firefly 7s firmware https://drive.google.com/open?id=0B4...lRyNWdMeWhDTDQ unpacking fails (version 0.6)

          >>decompress tempfile.bin to DENOVA/1.tmp...
          >>Input file: 3937964 bytes
          >>Output file: 5470228 bytes
          >>error: end offset is lower than start offset
          >>1 errors occurred.
          >>error: no such output file: DENOVA/1.bin
          >>1 errors occurred.

          Comment


          • #14
            cad_andry
            Click image for larger version

Name:	firefly-7s-fw-unpacked.png
Views:	992
Size:	7.1 KB
ID:	3632
            Win 10 64bit
            Donate here if you want to support my efforts and this site.

            Email me if you have any offers, requests or ideas.

            Comment


            • cad_andry
              cad_andry commented
              Editing a comment
              Was successful on other env. Probably some framework libs were missed.
              Thanks.

              Are there any plans to implement bitrate editing scripts?
              Last edited by cad_andry; 04-25-2017, 05:41 PM.

            • Olitsch
              Olitsch commented
              Editing a comment
              I get the same error with the Firefly Q6 firmware https://drive.google.com/open?id=0Bx...VRBSG1NZVhwWTg
              What did you change to get it working?
              Last edited by Olitsch; 05-20-2017, 04:22 PM.

            • cad_andry
              cad_andry commented
              Editing a comment
              Just run under my working VM. Did not try to ivestigate the issue source.

          • #15
            GETBITS script was updated to v0.2. Now you can get more informative data layout with bitrate values in dec.
            Donate here if you want to support my efforts and this site.

            Email me if you have any offers, requests or ideas.

            Comment


            • petesimon
              petesimon commented
              Editing a comment
              link please to this GETBITS v0.2

            • nutsey
              nutsey commented
              Editing a comment
              GETBITS script (getbits.bat file) is included into DENOVA package

            • petesimon
              petesimon commented
              Editing a comment
              aah, gotcha. ok
          Working...
          X