summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--twrp.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/twrp.cpp b/twrp.cpp
index 2c2aed499..32b411c93 100644
--- a/twrp.cpp
+++ b/twrp.cpp
@@ -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");