Skip to content

Commit 3f8fa3e

Browse files
manuel-domkeclaude
andcommitted
Fix SB2.1 detection offsets
The 'sgtl' magic sits at offset 52 in real SB2.1 files (with 'STMP' at offset 20), not at offset 28. Real .sb2 release files were therefore not recognized as SB2, and verify_firmware rejected them on locked devices as if they were raw .bin images. Verified against app-secure-2.2362.0.sb2 and the official solo2-firmware-2.964.0.sb2 from GitHub releases; confirmed by a successful flash on a real Secure device. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent bbff4ce commit 3f8fa3e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/solo_gui/workers/firmware_worker.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626

2727

2828
def _is_sb2_file(data: bytes) -> bool:
29-
"""Detect SB2.1 by the 'sgtl' magic at bytes 28-32."""
30-
return len(data) >= 96 and data[28:32] == b"sgtl"
29+
"""Detect SB2.1 by the header magics: 'STMP' at offset 20, 'sgtl' at offset 52."""
30+
return len(data) >= 96 and data[20:24] == b"STMP" and data[52:56] == b"sgtl"
3131

3232

3333
@dataclass

0 commit comments

Comments
 (0)