chore(python/debuglink): remove vestigial memory_write/read/erase methods
What changed, and why it matters
This commit simply removes three unused helper functions from the Python debug-link library. These functions were already non-functional on current Trezor devices and are not used by older devices anymore. There is no security issue here.
No security action required. Treat as routine code cleanup.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch deletes the client-side Python wrappers memory_read, memory_write, and flash_erase from python/src/trezorlib/debuglink.py. The commit message states these are vestigial, unsupported on core models, and unused on legacy models for years. The change is purely a cleanup of dead code in a debug/testing helper library; it does not alter firmware behavior or introduce a vulnerability.
Changed components
python/src/trezorlib/debuglink.pyInspect captured patch +0 / −13
diff --git a/python/src/trezorlib/debuglink.py b/python/src/trezorlib/debuglink.py
index baaf80ca..e33fc226 100644
--- a/python/src/trezorlib/debuglink.py
+++ b/python/src/trezorlib/debuglink.py
@@ -889,19 +889,6 @@ class DebugLink:
else:
self.t1_take_screenshots = False
- def memory_read(self, address: int, length: int) -> bytes:
- return self._call(
- messages.DebugLinkMemoryRead(address=address, length=length)
- ).memory
-
- def memory_write(self, address: int, memory: bytes, flash: bool = False) -> None:
- self._write(
- messages.DebugLinkMemoryWrite(address=address, memory=memory, flash=flash)
- )
-
- def flash_erase(self, sector: int) -> None:
- self._write(messages.DebugLinkFlashErase(sector=sector))
-
def erase_sd_card(self, format: bool = True) -> None:
self._call(
messages.DebugLinkEraseSdCard(format=format), expect=messages.Success
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.