Repository navigation
Features
- Resumable Downloads: Firmware downloads now save to
.partfiles with embedded metadata and bitfield tracking, allowing seamless resumption; added-f/--forceto restart from scratch (#29). - Automatic PIT Flashing: Removed
--repartition; PIT files are now automatically committed whenever available (from archives or--pit), matching Odin4 behavior. - Dynamic Partition Validation: Implemented pre-flight capacity checks (opcode
0x6a) and automaticsuper_used_sizedetection from raw, sparse, and LZ4super.imgmetadata. This allows flashing super partition without repartitioning. - Device Diagnostics: Added hardware specification inspection in
samloader detectusing pre-handshakeDVIFand opcode0x69TLV dumps (with--jsonoutput). - Extended Flash Controls:
--csc-code <CODE>: Configure persistent device sales code via opcode0x64.-e, --erase: Perform low-levelUSERDATANAND block wiping via opcode0x64.--redownload: Reboot directly back into Download Mode via opcode0x67.
- Legacy
.enc2Support: Added download and MD5-derived AES decryption for older Samsung firmware packages.
Bug Fixes & Reliability
- USB Connection Stability: Replaced disruptive USB bus resets with
clear_haltand a non-blocking IN buffer drain, resolvingFAILunknown commanderrors on Snapdragon UEFI and timeouts on newer tablets (#27, #37). - Odin4 Protocol Alignment:
- Matched official Zero-Length Packet (ZLP) rules: eliminated ZLPs during chunk streaming and limited control ZLPs to legacy devices (
"Gadget Serial"). - Fixed slice transfer state by sending init packets before every sequence and rounding raw slice announcements to 128 KB boundaries.
- Added uncompressed size reporting for LZ4 transfer announcements.
- Matched official Zero-Length Packet (ZLP) rules: eliminated ZLPs during chunk streaming and limited control ZLPs to legacy devices (
- Error Handling: Introduced
LokeErrorto map bootloader negative status codes and prevent silent failures. - Manifest Validation: Correctly propagate corrupted archive and manifest errors (
download-list.txt,super_used_size.txt) instead of ignoring them (#39). - Download Metrics: Fixed EMA speed and ETA calculation spikes when resuming partial downloads.
Architecture & Performance
- Session & Flashing Pipeline: Split connection lifecycle into
OdinConnection(handshake) andOdinSession(protocol), orchestrated via a fluentFlashManagerbuilder. - Zero-Copy & Memory Optimizations: Lazily memory-map only partitions selected for flashing and eliminate heap allocations in packet serialization using stack buffers and
Cow<[u8]>. - Global Progress Reporter: Streamlined CLI callbacks through a process-wide
FlashProgressreporter and added real-time MD5 verification progress. - Portability & Mocks: Fixed Linux compilation (
libc), expanded mock USB device profiles (SM-F968B, GT-I9305), aligned protocol terminology with Odin4/LOKE, and pruned unused dependencies and derives.
Full Changelog: 2.1.0...2.2.0