Use twrp.fstab if present
diff --git a/twrp.cpp b/twrp.cpp
index 2c2aed4..32b411c 100644
--- a/twrp.cpp
+++ b/twrp.cpp
@@ -86,6 +86,14 @@
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");