Commit 3c1db7d2 authored by topjohnwu's avatar topjohnwu

Fix some A/B devices unable to boot into recovery

Some newer recovery ramdisk no longer have /sbin/recovery.
Add /system/bin/recovery as an additional indication for recovery.

Close #1920
parent 62650709
......@@ -215,7 +215,7 @@ int main(int argc, char *argv[]) {
init = make_unique<SARInit>(argv, &cmd);
} else {
decompress_ramdisk();
if (access("/sbin/recovery", F_OK) == 0)
if (access("/sbin/recovery", F_OK) == 0 || access("/system/bin/recovery", F_OK) == 0)
init = make_unique<RecoveryInit>(argv, &cmd);
else if (access("/apex", F_OK) == 0)
init = make_unique<AFirstStageInit>(argv, &cmd);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment