How shomykohai/penumbra works
Penumbra is a Rust crate and Antumbra app for interacting with MediaTek devices. Users invoke device operations through the CLI or TUI; the core library provides device, transport, download-protocol, storage, and exploit capabilities. The README documents flashing, readback, erase, scatter flashing, vulnerable-device unlocking/relocking, RPMB, and arbitrary memory access. Some implementation relationships are unverified because the relevant source was not excerpted; those links are dashed where useful.
Main entry points: device.rs Device API · protocol.rs Download protocol · commands CLI commands · app.rs TUI app
Components 20
User interfaces
- CLI commands
app/src/cli/commands - TUI app
app/src/app.rs - Device page
app/src/pages/device
Device core
- Device API
core/src/device.rs - Device info
core/src/devinfo.rs - Port transport
core/src/port/mod.rs - USB backends
core/src/port/backend
Download protocols
- Preloader protocol
core/src/preloader/protocol.rs - Download protocol
core/src/da/protocol.rs - V5 XFlash
core/src/da/xflash/protocol.rs - V6 XML
core/src/da/xml/protocol.rs
Device operations
- Flash and readback
core/src/da - Scatter flashing
core/src/da/scatter.rs - Storage and partitions
core/src/storage - RPMB operations
app/src/cli/commands/device/rpmb.rs - Memory access
app/src/cli/commands/device
Security
- Bootloader unlock
core/src/exploit - Device exploits
core/src/exploit/mod.rs - Authentication
core/src/auth
Other components
- Operator
Connections 20
- Operator → CLI commands: runs commands
README.md - Operator → TUI app: uses interface
README.md - TUI app → Device page: switches pages
app/src/app.rs - CLI commands → Device API: executes operations
- Device page → Device API: dispatches actions
- Device API → Port transport: uses transport
- Port transport → USB backends: selects backend
core/src/port/mod.rs - Device API → Preloader protocol: uses protocol
- Device API → Download protocol: enters download mode
- Download protocol → V5 XFlash: supports V5
- Download protocol → V6 XML: supports V6
- Device API → Device info: exposes information
- Device API → Flash and readback: performs flash operations
- Device API → Scatter flashing: supports scatter files
- Device API → Storage and partitions: accesses storage
- Device API → RPMB operations: supports RPMB
README.md - Device API → Memory access: supports memory access
README.md - Device API → Bootloader unlock: supports unlocking
README.md - Device exploits → Bootloader unlock: enables exploits
core/src/exploit/mod.rs - Device API → Authentication: uses authentication