mirror of
https://github.com/kvorschk/Magisk.git
synced 2026-12-04 19:10:47 -05:00
init: support 2SI devices with skip_initramfs
This commit is contained in:
@@ -90,15 +90,17 @@ 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.skip_initramfs)
|
||||
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)
|
||||
init = new LegacySARInit(argv, &config);
|
||||
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)
|
||||
else if (recovery)
|
||||
init = new RecoveryInit(argv, &config);
|
||||
else if (check_two_stage())
|
||||
init = new FirstStageInit(argv, &config);
|
||||
else
|
||||
init = new RootFSInit(argv, &config);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user