Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cadee353 authored by daren.liao's avatar daren.liao
Browse files

Fix for Cannot load etc/recovery.fstab when doing OTA upgrade

1.In ANP, the path of the executable file recovery is sbin/recovery, and in ANR it is system/bin/recovery
2.Add a judgment on whether sbin/recovery exists in fs_mgr_fstab.cpp,
Make it possible to correctly load etc/recovery.fstab in recovery mode

Bug: 237368169
Change-Id: I8df76a003bc2edbaa01d9dd173a0cba1401ef3ac
parent 10126261
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -804,7 +804,7 @@ bool ReadDefaultFstab(Fstab* fstab) {

    std::string default_fstab_path;
    // Use different fstab paths for normal boot and recovery boot, respectively
    if (access("/system/bin/recovery", F_OK) == 0) {
    if ((access("/sbin/recovery", F_OK) == 0) || (access("/system/bin/recovery", F_OK) == 0)) {
        default_fstab_path = "/etc/recovery.fstab";
    } else {  // normal boot
        default_fstab_path = GetFstabPath();