mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-12-10 04:22:10 +00:00
Detect 2SI after system_root mount on legacy SAR
This commit is contained in:
@@ -166,18 +166,14 @@ int main(int argc, char *argv[]) {
|
||||
// This will also mount /sys and /proc
|
||||
load_kernel_info(&cmd);
|
||||
|
||||
bool two_stage = check_two_stage();
|
||||
if (cmd.skip_initramfs) {
|
||||
if (two_stage)
|
||||
init = new SARFirstStageInit(argv, &cmd);
|
||||
else
|
||||
init = new SARInit(argv, &cmd);
|
||||
init = new SARInit(argv, &cmd);
|
||||
} else {
|
||||
if (cmd.force_normal_boot)
|
||||
init = new FirstStageInit(argv, &cmd);
|
||||
else if (access("/sbin/recovery", F_OK) == 0 || access("/system/bin/recovery", F_OK) == 0)
|
||||
init = new RecoveryInit(argv, &cmd);
|
||||
else if (two_stage)
|
||||
else if (check_two_stage())
|
||||
init = new FirstStageInit(argv, &cmd);
|
||||
else
|
||||
init = new RootFSInit(argv, &cmd);
|
||||
|
||||
Reference in New Issue
Block a user