Bootstrap OpenBitdo clean-room SDK and reliability milestone

This commit is contained in:
2026-02-27 20:43:34 -05:00
commit d5afadf560
46 changed files with 3652 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
use bitdo_proto::{BitdoError, DeviceSession, MockTransport, SessionConfig, VidPid};
#[test]
fn detect_only_pid_blocks_unsafe_operations() {
let transport = MockTransport::default();
let config = SessionConfig {
allow_unsafe: true,
brick_risk_ack: true,
experimental: true,
..SessionConfig::default()
};
let mut session =
DeviceSession::new(transport, VidPid::new(0x2dc8, 8448), config).expect("session init");
let err = session
.enter_bootloader()
.expect_err("must reject unsafe op");
match err {
BitdoError::UnsupportedForPid { .. } => {}
other => panic!("unexpected error: {other:?}"),
}
}