This Python script allows you to unpack and repack firmware images for Ambarella BRAVE8-based devices. It is specifically tailored for the BRAVE8 format and is not intended for other Ambarella models.
- Unpack: Extracts all firmware sections and ROMFS files from a BRAVE8 firmware image into a directory.
- Repack: Rebuilds a firmware image from previously extracted and (optionally) modified files.
- Handles CRC32 checksums and section table updates automatically.
Extract all sections and ROMFS files from a firmware image:
python3 brave8-firmware.py unpack <firmware.bin> <output_directory>Example:
python3 brave8-firmware.py unpack BRAVE8.bin extracted/Rebuild a firmware image from an extracted directory:
python3 brave8-firmware.py repack <input_directory> <output_firmware.bin>Example:
python3 brave8-firmware.py repack extracted/ new_BRAVE8.bin00000000_header.bin— Firmware file header<offset>_head.bin— Section header at given offset<offset>_sect.bin— Section data at given offset<offset>.dir— List of files in a ROMFS partition<offset>_files/— Extracted files from a ROMFS partition
- Python 3.x
- Only BRAVE8 firmware images are supported.
- The script is not intended for use with other Ambarella SoCs or firmware formats.
- CRC32 and section table values are handled automatically during repack.
GPLv3-or-later
- Heavily inspired by the original work of Niccolo Rigacci.
- Author: Fexiven