mirror of
https://github.com/Ap0dexMe0/unixtract.git
synced 2026-07-16 05:04:22 +02:00
mtk_pkg_old (prev. mtk_upgrade_loader): implement header and content decryption, mtk_pkg: add version reading
This commit is contained in:
@@ -139,9 +139,12 @@ pub fn extract_mtk_pkg(mut file: &File, output_folder: &str) -> Result<(), Box<d
|
||||
out_data = data;
|
||||
}
|
||||
|
||||
//strip iMtK thing
|
||||
//strip iMtK thing and get version
|
||||
let extra_header_len = if &out_data[48..52] == b"iMtK" {
|
||||
let imtk_len = u32::from_le_bytes(out_data[52..56].try_into().unwrap());
|
||||
let version_len = u32::from_le_bytes(out_data[56..60].try_into().unwrap());
|
||||
let version = common::string_from_bytes(&out_data[60..60 + version_len as usize]);
|
||||
println!("- Version: {}", version);
|
||||
imtk_len + 8
|
||||
} else {
|
||||
0
|
||||
|
||||
Reference in New Issue
Block a user