diff --git a/native/src/init/init.cpp b/native/src/init/init.cpp index 4beaa9fe2..c71313325 100644 --- a/native/src/init/init.cpp +++ b/native/src/init/init.cpp @@ -90,17 +90,15 @@ int main(int argc, char *argv[]) { } else { // This will also mount /sys and /proc load_kernel_info(&config); - bool recovery = access("/sbin/recovery", F_OK) == 0 || - access("/system/bin/recovery", F_OK) == 0; - if (config.force_normal_boot) - init = new FirstStageInit(argv, &config); - else if (!recovery && check_two_stage()) - init = new FirstStageInit(argv, &config); - else if (config.skip_initramfs) + if (config.skip_initramfs) init = new LegacySARInit(argv, &config); - else if (recovery) + else if (config.force_normal_boot) + init = new FirstStageInit(argv, &config); + else if (access("/sbin/recovery", F_OK) == 0 || access("/system/bin/recovery", F_OK) == 0) init = new RecoveryInit(argv, &config); + else if (check_two_stage()) + init = new FirstStageInit(argv, &config); else init = new RootFSInit(argv, &config); }