userspace: remove vendor_boot selection logic

- Only patch it when user actively selects vendor_boot.
This commit is contained in:
YuKongA
2025-11-13 20:15:19 +08:00
committed by ShirkNeko
parent 9f869090d2
commit 12fc2e6d5e

View File

@@ -690,10 +690,7 @@ pub fn choose_boot_partition(
) -> String {
let slot_suffix = get_slot_suffix(false);
let skip_init_boot = kmi.starts_with("android12-");
let init_boot_exist = Path::new(&format!("/dev/block/by-name/init_boot{slot_suffix}")).exists();
let vendor_boot_exist =
Path::new(&format!("/dev/block/by-name/vendor_boot{slot_suffix}")).exists();
// if specific partition is specified, use it
if let Some(part) = partition {
@@ -708,11 +705,6 @@ pub fn choose_boot_partition(
return "init_boot".to_string();
}
// if vendor_boot exists and not skipping it, use it
if !is_replace_kernel && vendor_boot_exist && !skip_init_boot {
return "vendor_boot".to_string();
}
"boot".to_string()
}