fix(firmware): detect bitcoin-only variant in flash preview#348
Merged
Conversation
The flash-preview screen read a bitcoin-only .bin as full multi-chain — it showed the generic v7.15.0 'What's New' (Zcash/Solana/TON/etc., none of which a btc-only device can touch) and no variant indicator. The device can't report firmware_variant until it BOOTS the new firmware, so flash-time detection must come from the binary itself. - analyzeFirmware scans the payload for the embedded 'KeepKeyBTC'/'EmulatorBTC' literal (compiled in only under #if BITCOIN_ONLY, fsm_msg_common.h); returns isBitcoinOnly. Verified true on the rc7 btc-only bin, false on a full build. - FirmwareDropZone shows a BITCOIN-ONLY badge and threads the flag to the preview. - FirmwareUpgradePreview renders a single honest Bitcoin-only card + headline instead of the multi-chain release notes when isBitcoinOnly.
This was referenced Jul 12, 2026
Collaborator
Author
|
Backed out of |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The flash-preview screen read a bitcoin-only
.binas full multi-chain — generic v7.15.0 'What's New' (Zcash/Solana/TON/etc.) and no variant indicator. The device can't reportfirmware_variantuntil it boots the new firmware, so flash-time detection must come from the binary.analyzeFirmwarescans the payload for the embeddedKeepKeyBTC/EmulatorBTCliteral (compiled in only under#if BITCOIN_ONLY,fsm_msg_common.h) →isBitcoinOnly. Verified true on the rc7 btc-only bin (payloadeec35ee3), false on a full build (b8824d55).FirmwareDropZoneshows a BITCOIN-ONLY badge and threads the flag to the preview.FirmwareUpgradePreviewrenders a single honest Bitcoin-only card + headline instead of the multi-chain notes.Follow-up to #347.