diff --git a/Cargo.lock b/Cargo.lock index 66d867d..097faef 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -575,11 +575,10 @@ dependencies = [ [[package]] name = "num-bigint-dig" -version = "0.8.4" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc84195820f291c7697304f3cbdadd1cb7199c0efc917ff5eafd71225c136151" +checksum = "e661dda6640fad38e827a6d4a310ff4763082116fe217f279885c97f511bb0b7" dependencies = [ - "byteorder", "lazy_static", "libm", "num-integer", @@ -773,9 +772,9 @@ dependencies = [ [[package]] name = "rsa" -version = "0.9.9" +version = "0.9.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40a0376c50d0358279d9d643e4bf7b7be212f1f4ff1da9070a7b54d22ef75c88" +checksum = "b8573f03f5883dcaebdfcf4725caa1ecb9c15b2ef50c43a07b816e06799bb12d" dependencies = [ "const-oid", "digest", diff --git a/Cargo.toml b/Cargo.toml index a707359..e0a73b9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ cbc = "0.1.2" md5 = "0.8" sha1 = "0.10.6" flate2 = "1.1.5" -rsa = { version = "0.9.9", features = ["hazmat"] } +rsa = { version = "0.9.10", features = ["hazmat"] } hex = "0.4.3" ecb = "0.1.2" tar = "0.4.44" diff --git a/src/formats/mtk_bdp.rs b/src/formats/mtk_bdp.rs index b9cff1e..4063896 100644 --- a/src/formats/mtk_bdp.rs +++ b/src/formats/mtk_bdp.rs @@ -17,7 +17,7 @@ struct PITITPITEntry { nand_size: u32, pit_offset: u32, pit_size: u32, - _private_data_2: u32, + _table_id: u32, } #[derive(BinRead)] @@ -31,10 +31,10 @@ struct PITITBITEntry { #[derive(BinRead)] struct PITHeader { #[br(count = 8)] pit_magic: Vec, - _unk: u32, - first_entry_offset: u32, - entry_size: u32, - entry_count: u32, + _version: u32, + first_entry_offset: u32, //"header len" + entry_size: u32, //"item lenght" + entry_count: u32, //"item num" } static PIT_MAGIC: [u8; 8] = [0xDC, 0xEA, 0x30, 0x85, 0xDC, 0xEA, 0x30, 0x85]; @@ -43,10 +43,12 @@ static PIT_MAGIC: [u8; 8] = [0xDC, 0xEA, 0x30, 0x85, 0xDC, 0xEA, 0x30, 0x85]; struct PITEntry { #[br(count = 16)] name_bytes: Vec, partition_id: u32, - _unknown: u32, + _part_info: u32, offset_on_nand: u32, size_on_nand: u32, - #[br(count = 32)] _unused: Vec, + _enc_size: u32, + _no_enc_size: u32, + #[br(count = 24)] _reserve: Vec, } impl PITEntry { fn name(&self) -> String { @@ -60,7 +62,7 @@ struct BITEntry { offset: u32, size: u32, offset_in_target_part: u32, - _unknown: u32, + _bin_info: u32, //"Bin info" } static BIT_MAGIC: [u8; 20] = [0xCD, 0xAB, 0x30, 0x85, 0xCD, 0xAB, 0x30, 0x85, 0xCD, 0xAB, 0x30, 0x85, 0xCD, 0xAB, 0x30, 0x85, 0xCD, 0xAB, 0x30, 0x85];