diff options
-rw-r--r-- | twrp.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -86,6 +86,14 @@ int main(int argc, char **argv) { gui_init(); printf("=> Linking mtab\n"); symlink("/proc/mounts", "/etc/mtab"); + if (TWFunc::Path_Exists("/etc/twrp.fstab")) { + if (TWFunc::Path_Exists("/etc/recovery.fstab")) { + printf("Renaming regular /etc/recovery.fstab -> /etc/recovery.fstab.bak\n"); + rename("/etc/recovery.fstab", "/etc/recovery.fstab.bak"); + } + printf("Moving /etc/twrp.fstab -> /etc/recovery.fstab\n"); + rename("/etc/twrp.fstab", "/etc/recovery.fstab"); + } printf("=> Processing recovery.fstab\n"); if (!PartitionManager.Process_Fstab("/etc/recovery.fstab", 1)) { LOGERR("Failing out of recovery due to problem with recovery.fstab.\n"); |