libcros 0.2.0

A Rust library that provides easy-to-use functions for interacting with a Chrome device
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use libcros::{LOG, Logger, kv_set, tlcl::TlclWrite};

fn main() {
  Logger::init(true, true);
  let tpm = "/dev/tpm1";
  kv_set(libcros::keys::TPM_PATH, tpm);

  LOG!("writing 0xD bytes to index 0x1008 {}", tpm);
  // kernver 0x00010002
  let output = TlclWrite(
    0x1008,
    &[
      0x02, 0x4C, 0x57, 0x52, 0x47, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x33,
    ],
  );
  LOG!("write output: {:02X?}", output);
}