summaryrefslogtreecommitdiffstats
path: root/recovery.cpp
diff options
context:
space:
mode:
authorDees_Troy <dees_troy@teamw.in>2012-10-03 05:03:01 +0200
committerDees_Troy <dees_troy@teamw.in>2012-10-03 05:03:01 +0200
commitc7c4341ed7b1823963989040219471a542d9afed (patch)
tree747995cfa4335b997b1437f07686a99d934dc807 /recovery.cpp
parentRemove extra call for ORS (diff)
downloadandroid_bootable_recovery-c7c4341ed7b1823963989040219471a542d9afed.tar
android_bootable_recovery-c7c4341ed7b1823963989040219471a542d9afed.tar.gz
android_bootable_recovery-c7c4341ed7b1823963989040219471a542d9afed.tar.bz2
android_bootable_recovery-c7c4341ed7b1823963989040219471a542d9afed.tar.lz
android_bootable_recovery-c7c4341ed7b1823963989040219471a542d9afed.tar.xz
android_bootable_recovery-c7c4341ed7b1823963989040219471a542d9afed.tar.zst
android_bootable_recovery-c7c4341ed7b1823963989040219471a542d9afed.zip
Diffstat (limited to '')
-rw-r--r--recovery.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/recovery.cpp b/recovery.cpp
index 2459650f3..de6e10019 100644
--- a/recovery.cpp
+++ b/recovery.cpp
@@ -946,6 +946,10 @@ main(int argc, char **argv) {
if (status != INSTALL_SUCCESS /*|| ui->IsTextVisible()*/) {
finish_recovery(NULL);
DataManager_ReadSettingsFile();
+ if (PartitionManager.Mount_By_Path("/system", false) && TWFunc::Path_Exists("/system/recovery-from-boot.p")) {
+ system("mv /system/recovery-from-boot.p /system/recovery-from-boot.bak");
+ ui_print("Renamed stock recovery file in /system to prevent\nthe stock ROM from replacing TWRP.\n");
+ }
if (DataManager_GetIntValue(TW_IS_ENCRYPTED) == 0 && OpenRecoveryScript::check_for_script_file()) {
gui_console_only();
OpenRecoveryScript::run_script_file();