1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-10-17 21:39:23 +00:00
trezor-firmware/legacy/imhex
2022-11-01 14:58:35 +01:00
..
imhex_screenshot.png docs(legacy): ImHex patterns for v2 trezor.bin, v1+v2 combined trezor.bin and bootloader binary images 2022-11-01 14:58:35 +01:00
README.md docs(legacy): ImHex patterns for v2 trezor.bin, v1+v2 combined trezor.bin and bootloader binary images 2022-11-01 14:58:35 +01:00
t1_bootloader_bin.hexpat docs(legacy): ImHex patterns for v2 trezor.bin, v1+v2 combined trezor.bin and bootloader binary images 2022-11-01 14:58:35 +01:00
t1_firmware_trezor_bin_v2.hexpat docs(legacy): ImHex patterns for v2 trezor.bin, v1+v2 combined trezor.bin and bootloader binary images 2022-11-01 14:58:35 +01:00
t1_firmware_v1+v2.hexpat docs(legacy): ImHex patterns for v2 trezor.bin, v1+v2 combined trezor.bin and bootloader binary images 2022-11-01 14:58:35 +01:00
t1_firmware.pat docs(legacy): ImHex patterns for v2 trezor.bin, v1+v2 combined trezor.bin and bootloader binary images 2022-11-01 14:58:35 +01:00

ImHex patterns for T1 firmware images

ImHex is multiplatform hex editor, with ability to parse binary files based on patterns.

Here are patterns for decoding binary images, there are 3 types:

  1. firmware with both headers (TRZR and TRZF) which we distribute - t1_firmware_v1+v2.hexpat
  2. firmware built from git (TRZF header) - t1_firmware_trezor_bin_v2.hexpat
  3. bootloader - t1_bootloader_bin.hexpat

Using ImHex with these patterns

Download ImHex from https://github.com/WerWolv/ImHex or https://imhex.werwolv.net/

First download base library

You must download standard libraries via menu Help->Content Store->Libraries

Opening T1 firmware images

In this directory, run imhex /path/to/some_firmware.bin (so that patterns can be found in current directory with includes).

Open pattern via File->Load Pattern->Browse... or add the patterns to existing pattern directories so that you can load without using browse. Pattern dirs are XDG-BASED, so your dir depending on installation will be something like

  • /usr/share/imhex/patterns
  • .local/share/imhex/patterns

or see where the directories are for other OSes.

Sample screenshot

ImHex screenshot