Python script for work with Novatek firmware files. Show full FW info, allow extract, replace, uncompress, compress partitions, fix CRC for modded partitions and whole firmware file. Useful tool for building custom firmwares. Use Linux environment or WSL2 (Windows Subsystem for Linux) for properly work with UBI and SPARSE partitions.
Novatek FW info is available under the terms of the GNU Public License version 3.
If this project helps you, you can send me any amount of BTC to address 12q5kucN1nvWq4gn5V3WJ8LFS6mtxbymdj or use QR code below:
First of all install:
sudo apt-get install python3
sudo apt-get install python3-pip
sudo apt-get install mtd-utils
sudo apt-get install liblzo2-dev
sudo apt-get install pypy3
Additionaly install this python modules:
sudo pip3 install python-lzo
sudo pip3 install ubi_reader
For SPARSE partitions support install:
sudo apt-get install android-sdk-libsparse-utils
For FDT(DTB) partitions support install:
sudo apt-get install device-tree-compiler
python3 ./NTKFWinfo.py -i FWA229A.bin
python3 ./NTKFWinfo.py -i FWA229A.bin -u 6
Compress partition back to firmware binary file from uncompressed file(for BCL1) or folder(for UBI or SPARSE) and fix all CRC:
python3 ./NTKFWinfo.py -i FWA229A.bin -c 6
(as example extract data from CKSM partition require skip first 64 CKSM-header bytes)
python3 ./NTKFWinfo.py -i FWA229A.bin -x 6 64
python3 ./NTKFWinfo.py -i FWA229A.bin -r 6 64 ./img-726660551.ubi
python3 ./NTKFWinfo.py -i FWA229A.bin -fixCRC
python3 ./NTKFWinfo.py -i FWA229A.bin -u 6 -o tempdir
python3 ./NTKFWinfo.py -i FWA229A.bin -c 6 -o tempdir
I suggest use pypy3 VS python3 to decrease compression time for BCL1 LZ partitions:
pypy3 ./NTKFWinfo.py -i GIT3FWv2.3.bin -c 0