summaryrefslogtreecommitdiffstats
path: root/twrp.cpp
diff options
context:
space:
mode:
authorDees_Troy <dees_troy@teamw.in>2013-08-29 16:16:06 +0200
committerDees_Troy <dees_troy@teamw.in>2013-08-29 16:16:06 +0200
commit329383e5933a2d6e6696ded8f9dde6d0038d2347 (patch)
tree0a27dcc5f03057ef825359f2ded7d48f9176e19b /twrp.cpp
parentskip checking size on links (diff)
downloadandroid_bootable_recovery-329383e5933a2d6e6696ded8f9dde6d0038d2347.tar
android_bootable_recovery-329383e5933a2d6e6696ded8f9dde6d0038d2347.tar.gz
android_bootable_recovery-329383e5933a2d6e6696ded8f9dde6d0038d2347.tar.bz2
android_bootable_recovery-329383e5933a2d6e6696ded8f9dde6d0038d2347.tar.lz
android_bootable_recovery-329383e5933a2d6e6696ded8f9dde6d0038d2347.tar.xz
android_bootable_recovery-329383e5933a2d6e6696ded8f9dde6d0038d2347.tar.zst
android_bootable_recovery-329383e5933a2d6e6696ded8f9dde6d0038d2347.zip
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");