While not exhaustive, mstar-bin-tool works reliably on:
| Chip Family | Example Devices | Typical XOR Key |
| :--- | :--- | :--- |
| MStar T31 | Wyze Cam v2, Xiaomi 360 Camera | 0x51 |
| MStar T20/T21 | Older IP cameras, Dash cams | 0xA5 |
| Infinity 6 (IMG) | SigmaStar SSC335, SSC333 | 0x00 (No XOR) |
| MSTAR 6A series | TCL Roku TVs (2016-2018) | Auto-detect |
| Novatek? | Not supported (Different tool) | N/A |
Note: Newer MediaTek chips (MTK 9xxx) use a different architecture and are not supported.
| Error | Likely Cause | Fix |
|-------|--------------|-----|
| Invalid magic | Wrong config file | Find correct config or manually analyze header |
| CRC mismatch | Firmware corrupted or encrypted | Verify checksum; decrypt if needed |
| Partition size mismatch | Modified partition larger than original | Do not exceed original partition size |
| SquashFS mount error | Wrong compression type | Use file command to detect actual type |
| Unsupported format | Not an MStar image | Check with hexdump: xxd firmware.bin \| head |
Avoid the "Download ZIP" method; use Git to ensure you get the submodules (if any). mstar-bin-tool
git clone https://github.com/lionsharp/mstar-bin-tool.git
cd mstar-bin-tool
Use dd or a hex editor to modify raw binary partitions.
python mstar_bin_tool.py -f output.bin -c device.ini -p
After unpack, you'll find rootfs.squashfs inside the unpacked folder.
Mount and modify (Linux only):
sudo mount -t squashfs rootfs.squashfs /mnt/rootfs -o loop
# make changes inside /mnt/rootfs
sudo unsquashfs -d rootfs_extracted rootfs.squashfs
# modify files in rootfs_extracted/
sudo mksquashfs rootfs_extracted/ new_rootfs.squashfs -comp xz
Replace the old .squashfs file with new_rootfs.squashfs before repacking.
Step 1 – Unpack
python mstar_bin_tool.py -f update.bin -c my_tv.ini -u
Step 2 – Identify logo partition
Check config: logo is at offset 0x2481000 as raw data.
Step 3 – Replace logo
Your new logo must be in the exact format (BMP, RAW, or MStar proprietary).
Convert your image to the correct size/format using ffmpeg or GIMP. While not exhaustive, mstar-bin-tool works reliably on: |
dd if=new_logo.bin of=logo_partition.bin
Replace logo_partition.bin inside the unpacked folder.
Step 4 – Repack
python mstar_bin_tool.py -f new_firmware.bin -c my_tv.ini -p
Step 5 – Flash using USB or serial method.
To understand why you need mstar-bin-tool, you must understand MStar's "All-In-One" design. | Error | Likely Cause | Fix |
Most embedded devices store the bootloader, kernel, and root filesystem as separate partitions on an SPI NAND or NOR flash. MStar, however, often concatenates these parts into a single monolithic binary (firmware.bin), then adds:
mstar-bin-tool automates the process of stripping that header, decrypting the payload, and splitting the result into discrete files (e.g., boot.bin, kernel.bin, rootfs.bin).