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.

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
trezor 3
trezor 5
trezor 7
Twitter Follower Count
- Trezor has about 230k followers.
- 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.

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
- Hold down both hardware wallet buttons and connect it to the computer to enter bootloader mode.
- Tap
Install FWon the hardware wallet. It will showwaiting 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.



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.

