mtk_bdp: make it normal, add support for philips and fix old TOC detection

This commit is contained in:
theubusu
2025-10-19 17:14:41 +02:00
parent 1d433a8c4b
commit 9631349ac8
2 changed files with 43 additions and 20 deletions
+5 -8
View File
@@ -102,15 +102,12 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
println!("MTK upgrade_loader file detected!");
formats::mtk_upgrade_loader::extract_mtk_upgrade_loader(&file, &output_path)?;
}
else if formats::mtk_bdp::is_mtk_bdp_file(&file) {
println!("MTK BDP file detected!");
formats::mtk_bdp::extract_mtk_bdp(&file, &output_path)?;
}
else {
// I dont like this need to pass result from search to avoid searching twice
let mtk_bdp_result = formats::mtk_bdp::is_mtk_bdp_file(&file);
if mtk_bdp_result.is_some() {
println!("MTK BDP file detected!\n");
formats::mtk_bdp::extract_mtk_bdp(&file, &output_path, mtk_bdp_result)?;
} else {
println!("Input format not recognized!");
}
println!("Input format not recognized!");
}
}