Trezor Hardware Wallet: Firmware, Emulator, and Custom Firmware Notes

Apr 28, 2026 · 3 min read · 580 Words · -Views -Comments · Programming

imKey does not support flashing custom firmware, so our team looked into another hardware wallet brand: Trezor. I am noting down some resources here for future reference.

https://static.1991421.cn/2026/04/2026-04-28-231814.jpeg

Firmware

It looks like all models share one unified firmware repository.

App Support

https://github.com/trezor/trezor-firmware/tree/main/core/src/apps

Emulator

Custom Firmware

  1. https://trezor.io/trezor-suite?srsltid=AfmBOortBR02GKnAknyFOeS8YWKwWmQuYZeSHtu-ix4v0_7UJaBYd-5w

trezor 3

  1. https://trezor.io/support/troubleshooting/device-issues/install-custom-firmware-on-trezor-safe-3

trezor 5

  1. https://trezor.io/support/troubleshooting/device-issues/install-custom-firmware-on-trezor-safe-5

trezor 7

  1. https://trezor.io/support/troubleshooting/device-issues/install-custom-firmware-on-trezor-safe-7?srsltid=AfmBOopwRAgh3ldC25awGsoDHbApnG7UgThYw8xWUDtUtBZE8_MHj3QC

Twitter Follower Count

  1. Trezor has about 230k followers.
  2. Ledger has about 670k followers. Based on the numbers, Trezor has roughly one third of Ledger’s follower count, which may suggest its community influence is lower than Ledger’s.

Web-to-Wallet Communication

@trezor/connect-web

Firmware Development / Build

$ git clone git@github.com:trezor/trezor-firmware.git

# Fetch all submodule resources.
$ git submodule update --init --recursive --force --progress

# Install nix. It supports Linux/macOS, and you need to restart the shell after installation.
$ curl -L https://nixos.org/nix/install | sh

$ nix-shell --arg devTools true

# Environment.
$ uv sync

$ source .venv/bin/activate

# Test whether the environment is set up correctly.
$ python -c "import click; print('click ok')"

# Enter the core directory and install dependencies.
$ cd core

# Fetch third-party dependencies.
$ make vendor


# Note: if the code has not changed but you build the firmware repeatedly, it will error because the file already exists.
# A normal build will print something like: cp build/firmware/firmware.bin build/firmware/firmware-T3T1-2.11.2-6daa3bd.bin (trezor-firmware)
$ make build_firmware 
# For example, if the device model is T3B1, specify the environment variable.
$ TREZOR_MODEL=T3B1 make build_firmware

# TREZOR_MODEL=T3B1 make upload

# Device list, used to confirm the device is connected and recognized correctly.
$ trezorctl list

Firmware File

After building, the file is at core/build/firmware/firmware-T3B1-2.11.3-3a8d901.bin.

https://static.1991421.cn/2026/05/2026-05-13-105333.jpeg

Note: if your local git tree has uncommitted changes, the built firmware will include a dirty marker.

Check the Device’s Real Model

trezorctl get-features | grep -E "model|internal_model|vendor|major_version"

Flashing Firmware

Unlocking add this if the prompt does not pass

$ trezorctl device unlock-bootloader

Unlock it according to the on-device prompts.

Note: trezorctl is the official CLI tool written in Python. I recommend following the firmware development flow to install the environment.

$ git clone git@github.com:trezor/trezor-firmware.git

# Fetch all submodule resources.
$ git submodule update --init --recursive --force --progress

# Install nix. It supports Linux/macOS, and you need to restart the shell after installation.
$ curl -L https://nixos.org/nix/install | sh

$ nix-shell --arg devTools true

# Environment.
$ uv sync

$ source .venv/bin/activate

# At this point, trezorctl commands should work. For example, trezorctl list can show the device list.

Enter Bootloader Mode

  1. Hold down both hardware wallet buttons and connect it to the computer to enter bootloader mode.
  2. Tap Install FW on the hardware wallet. It will show waiting for host.

Install Firmware from the Command Line method 1

# This will trigger firmware flashing on the physical device. You can also use Trezor Suite to flash firmware.
$ make upload

Install Firmware with Trezor Suite method 2

The prerequisite is entering bootloader mode. After entering it, the hardware wallet will prompt for installation; tap install, then choose the connected device from the top-left corner on the PC side.

Download Trezor Suite from the official site.

https://static.1991421.cn/2026/05/2026-05-13-115155.jpeg

https://static.1991421.cn/2026/05/2026-05-13-115316.jpeg

https://static.1991421.cn/2026/05/2026-05-09-164639.jpeg

Note: firmware size is only about 1-2MB in my test, so installation is fast. It needs confirmation on the hardware wallet side.

Note: after flashing locally custom-signed firmware, the wallet will show a warning on startup. The warning disappears only after flashing official signed firmware again.

web3.js and Trezor Interaction

  • It uses the PB message protocol.
  • Communication goes through WebUSB or the bridge protocol.
Authors
Developer, digital product enthusiast, tinkerer, sharer, open source lover