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:
parent
626507093a
commit
3c1db7d2f7
@ -215,7 +215,7 @@ int main(int argc, char *argv[]) {
|
|||||||
init = make_unique<SARInit>(argv, &cmd);
|
init = make_unique<SARInit>(argv, &cmd);
|
||||||
} else {
|
} else {
|
||||||
decompress_ramdisk();
|
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);
|
init = make_unique<RecoveryInit>(argv, &cmd);
|
||||||
else if (access("/apex", F_OK) == 0)
|
else if (access("/apex", F_OK) == 0)
|
||||||
init = make_unique<AFirstStageInit>(argv, &cmd);
|
init = make_unique<AFirstStageInit>(argv, &cmd);
|
||||||
|
Loading…
Reference in New Issue
Block a user