Restructure into freemkv-unlock workspace (ld member + room for more)
libfreemkv owns the Unlocker trait + registry; this repo holds the concrete unlocker plugins. LibreDrive moves to the ld/ member (package freemkv-unlock-ld unchanged). Workspace root + repo README describe the general-unlocker model; adding an unlocker = a new member + one register_unlocker line in the consumer. libfreemkv dep is the crates.io version; local dev resolves it via the gitignored .cargo/config.toml patch.
This commit is contained in:
+13
-15
@@ -1,15 +1,13 @@
|
|||||||
[package]
|
# freemkv-unlock — unlocker plugins for libfreemkv.
|
||||||
name = "freemkv-unlock-ld"
|
#
|
||||||
version = "1.0.0-rc.2"
|
# libfreemkv ships only the `Unlocker` trait + registry and stays firmware-clean.
|
||||||
edition = "2024"
|
# Each member here is one concrete unlocker, registered into libfreemkv by a
|
||||||
rust-version = "1.86"
|
# single `register_unlocker(...)` line in the consuming binary — so dropping an
|
||||||
license = "AGPL-3.0-only"
|
# unlocker is deleting that one line plus the dependency (delete-to-comply).
|
||||||
description = "LibreDrive unlocker plugin for libfreemkv (firmware unlock for MediaTek MT1959 drives)"
|
#
|
||||||
repository = "https://github.com/freemkv/freemkv-unlock-ld"
|
# Members:
|
||||||
|
# ld — LibreDrive (MediaTek MT1959 firmware unlock)
|
||||||
[dependencies]
|
# (future unlockers go here as additional members)
|
||||||
libfreemkv = "1.0.0-rc.2"
|
[workspace]
|
||||||
serde = { version = "1", features = ["derive"] }
|
resolver = "2"
|
||||||
serde_json = "1"
|
members = ["ld"]
|
||||||
base64 = "0.22.1"
|
|
||||||
tracing = "0.1"
|
|
||||||
|
|||||||
@@ -1,50 +1,23 @@
|
|||||||
# freemkv-unlock-ld
|
# freemkv-unlock
|
||||||
|
|
||||||
The **LibreDrive** unlocker plugin for [libfreemkv](https://github.com/freemkv/libfreemkv).
|
Unlocker plugins for [libfreemkv](https://github.com/freemkv/libfreemkv).
|
||||||
|
|
||||||
libfreemkv ships only the `Unlocker` trait + registry and stays firmware-clean.
|
libfreemkv ships only the pluggable `Unlocker` trait + registry and stays
|
||||||
This crate owns *how* MediaTek MT1959 drives are firmware-unlocked: the bundled
|
firmware-clean — it contains no concrete firmware-unlock code. Each crate in
|
||||||
drive-profile database (`profiles.json`), the firmware blobs, the
|
this workspace implements one unlocker and is registered into libfreemkv by a
|
||||||
WRITE_BUFFER / MODE SELECT upload, the unlock CDBs, and the variant-A / variant-B
|
single line in the consuming binary:
|
||||||
handshake logic.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
Register the unlocker once at process start, before any rip:
|
|
||||||
|
|
||||||
```rust
|
```rust
|
||||||
libfreemkv::register_unlocker(Box::new(freemkv_unlock_ld::LibreDrive::new()));
|
libfreemkv::register_unlocker(Box::new(freemkv_unlock_ld::LibreDrive::new()));
|
||||||
```
|
```
|
||||||
|
|
||||||
That single line is the whole plug. Any drive whose identity matches a bundled
|
Removing an unlocker is deleting that one line and the dependency
|
||||||
profile is firmware-unlocked at drive-prep; everything else falls through to
|
(delete-to-comply).
|
||||||
libfreemkv's host-certificate AACS handshake.
|
|
||||||
|
|
||||||
## The `Unlocker` contract
|
## Members
|
||||||
|
|
||||||
This crate is the LibreDrive unlocker — an implementation of libfreemkv's
|
| Crate | Unlocker |
|
||||||
`Unlocker` trait. The trait is a 3-method capability contract:
|
|-------|----------|
|
||||||
|
| [`ld`](ld/) (`freemkv-unlock-ld`) | LibreDrive — MediaTek MT1959 firmware unlock |
|
||||||
- `unlock_drive` — put the drive into extended-access mode. The one required
|
|
||||||
capability.
|
|
||||||
- `read_volume_id` — read the disc Volume ID directly, bypassing the AACS cert
|
|
||||||
handshake. `None` → libfreemkv falls back to the cert-based read. No-op
|
|
||||||
default.
|
|
||||||
- `set_max_read_speed` — raise the drive to its maximum read speed. No-op
|
|
||||||
default.
|
|
||||||
|
|
||||||
libfreemkv's AACS layer is the always-present baseline; it uses an unlocker's
|
|
||||||
capabilities when one matches, and does the full cert handshake when none do.
|
|
||||||
Remove this crate and libfreemkv still compiles and rips — every capability
|
|
||||||
falls back to the OEM/baseline path.
|
|
||||||
|
|
||||||
## Scope: RAM microcode only (`#2`), never the bootloader flash (`#1`)
|
|
||||||
|
|
||||||
freemkv uploads the RAM microcode to an **already-bootloader-flashed** drive.
|
|
||||||
The permanent bootloader flash (`#1`) is the drive owner's one-time manual
|
|
||||||
step; it is **never** automated by freemkv. This crate only performs the
|
|
||||||
non-persistent `#2` step — the microcode lives in RAM and is gone on power
|
|
||||||
cycle.
|
|
||||||
|
|
||||||
<!-- TODO(owner): MakeMKV attribution + thanks -->
|
|
||||||
|
|
||||||
|
License: AGPL-3.0-only.
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
[package]
|
||||||
|
name = "freemkv-unlock-ld"
|
||||||
|
version = "1.0.0-rc.3"
|
||||||
|
edition = "2024"
|
||||||
|
rust-version = "1.86"
|
||||||
|
license = "AGPL-3.0-only"
|
||||||
|
description = "LibreDrive unlocker plugin for libfreemkv (firmware unlock for MediaTek MT1959 drives)"
|
||||||
|
repository = "https://github.com/freemkv/freemkv-unlock"
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
libfreemkv = "1.0.0-rc.3"
|
||||||
|
serde = { version = "1", features = ["derive"] }
|
||||||
|
serde_json = "1"
|
||||||
|
base64 = "0.22.1"
|
||||||
|
tracing = "0.1"
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
# freemkv-unlock-ld
|
||||||
|
|
||||||
|
The **LibreDrive** unlocker plugin for [libfreemkv](https://github.com/freemkv/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:
|
||||||
|
|
||||||
|
```rust
|
||||||
|
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.
|
||||||
|
|
||||||
|
## The `Unlocker` contract
|
||||||
|
|
||||||
|
This crate is the LibreDrive unlocker — an implementation of libfreemkv's
|
||||||
|
`Unlocker` trait. The trait is a 3-method capability contract:
|
||||||
|
|
||||||
|
- `unlock_drive` — put the drive into extended-access mode. The one required
|
||||||
|
capability.
|
||||||
|
- `read_volume_id` — read the disc Volume ID directly, bypassing the AACS cert
|
||||||
|
handshake. `None` → libfreemkv falls back to the cert-based read. No-op
|
||||||
|
default.
|
||||||
|
- `set_max_read_speed` — raise the drive to its maximum read speed. No-op
|
||||||
|
default.
|
||||||
|
|
||||||
|
libfreemkv's AACS layer is the always-present baseline; it uses an unlocker's
|
||||||
|
capabilities when one matches, and does the full cert handshake when none do.
|
||||||
|
Remove this crate and libfreemkv still compiles and rips — every capability
|
||||||
|
falls back to the OEM/baseline path.
|
||||||
|
|
||||||
|
## Scope: RAM microcode only (`#2`), never the bootloader flash (`#1`)
|
||||||
|
|
||||||
|
freemkv uploads the RAM microcode to an **already-bootloader-flashed** drive.
|
||||||
|
The permanent bootloader flash (`#1`) is the drive owner's one-time manual
|
||||||
|
step; it is **never** automated by freemkv. This crate only performs the
|
||||||
|
non-persistent `#2` step — the microcode lives in RAM and is gone on power
|
||||||
|
cycle.
|
||||||
|
|
||||||
|
<!-- TODO(owner): MakeMKV attribution + thanks -->
|
||||||
|
|
||||||
Reference in New Issue
Block a user