d6d79fc74cc746ab70b36c8beb8c023efc99498b
Recover the per-drive READ_BUFFER OEM VID path that lived in libfreemkv before the unlocker refactor (read_vid_oem in disc/encrypt.rs), now living inside the unlocker where the per-drive read_vid_cdb template belongs. read_vid finds the drive's profile; if it carries a read_vid_cdb, issues it and parses the 36-byte response (signature 00 22 00, VID at [4..20]), returning Some(vid). No matching profile or no OEM VID CDB returns Ok(None) so libfreemkv falls back to the cert handshake. VID is thus obtained without the host certificate + HRL. Adds response-parse unit tests (well-formed, short response, bad header, no-profile fallback).
freemkv-unlock-ld
The LibreDrive unlocker plugin for libfreemkv.
libfreemkv ships only the Unlocker trait + registry and stays firmware-clean.
This crate owns how MediaTek MT1959 drives are firmware-unlocked: the bundled
drive-profile database (profiles.json), the firmware blobs, the
WRITE_BUFFER / MODE SELECT upload, the unlock CDBs, and the variant-A / variant-B
handshake logic.
Usage
Register the unlocker once at process start, before any rip:
libfreemkv::register_unlocker(Box::new(freemkv_unlock_ld::LibreDrive::new()));
That single line is the whole plug. Any drive whose identity matches a bundled profile is firmware-unlocked at drive-prep; everything else falls through to libfreemkv's host-certificate AACS handshake.
Languages
Rust
100%