From 3c1db7d2f75798dd6182126f0cdf5db8c638a19d Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Sat, 26 Oct 2019 17:12:35 -0400 Subject: [PATCH] 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 --- native/jni/init/init.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/native/jni/init/init.cpp b/native/jni/init/init.cpp index c95b29fdb..c1b56dd9e 100644 --- a/native/jni/init/init.cpp +++ b/native/jni/init/init.cpp @@ -215,7 +215,7 @@ int main(int argc, char *argv[]) { init = make_unique(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(argv, &cmd); else if (access("/apex", F_OK) == 0) init = make_unique(argv, &cmd);