Add support for A-only 2SI

This commit is contained in:
topjohnwu
2019-09-22 05:15:31 -04:00
parent 0e5a113a0c
commit ee0cef06a6
3 changed files with 29 additions and 8 deletions

View File

@@ -207,7 +207,7 @@ int main(int argc, char *argv[]) {
if (run_test) {
init = make_unique<TestInit>(argv, &cmd);
} else if (cmd.force_normal_boot) {
init = make_unique<FirstStageInit>(argv, &cmd);
init = make_unique<ABFirstStageInit>(argv, &cmd);
} else if (cmd.system_as_root) {
if (access("/overlay", F_OK) == 0) /* Compatible mode */
init = make_unique<SARCompatInit>(argv, &cmd);
@@ -217,6 +217,8 @@ int main(int argc, char *argv[]) {
decompress_ramdisk();
if (access("/sbin/recovery", F_OK) == 0)
init = make_unique<RecoveryInit>(argv, &cmd);
else if (access("/apex", F_OK) == 0)
init = make_unique<AFirstStageInit>(argv, &cmd);
else
init = make_unique<LegacyInit>(argv, &cmd);
}