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
This commit is contained in:
topjohnwu 2019-10-26 17:12:35 -04:00
parent 626507093a
commit 3c1db7d2f7
1 changed files with 1 additions and 1 deletions

View File

@ -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);