diff options
author | dhacker29 <dhackerdvm@gmail.com> | 2014-07-16 03:33:29 +0200 |
---|---|---|
committer | David Hacker <dhackerdvm@gmail.com> | 2014-07-25 23:54:10 +0200 |
commit | 30f100e3bc49c7cf939a7dc6a45670960c1e3853 (patch) | |
tree | 42e74b76b8a883ed7511de9c93ce3ddbff20a9b2 | |
parent | Allow custom bootloader msg offset in block misc (diff) | |
download | android_bootable_recovery-30f100e3bc49c7cf939a7dc6a45670960c1e3853.tar android_bootable_recovery-30f100e3bc49c7cf939a7dc6a45670960c1e3853.tar.gz android_bootable_recovery-30f100e3bc49c7cf939a7dc6a45670960c1e3853.tar.bz2 android_bootable_recovery-30f100e3bc49c7cf939a7dc6a45670960c1e3853.tar.lz android_bootable_recovery-30f100e3bc49c7cf939a7dc6a45670960c1e3853.tar.xz android_bootable_recovery-30f100e3bc49c7cf939a7dc6a45670960c1e3853.tar.zst android_bootable_recovery-30f100e3bc49c7cf939a7dc6a45670960c1e3853.zip |
Diffstat (limited to '')
-rw-r--r-- | recovery.cpp | 2 | ||||
-rw-r--r-- | twrp.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/recovery.cpp b/recovery.cpp index de9939357..64091305a 100644 --- a/recovery.cpp +++ b/recovery.cpp @@ -1161,7 +1161,7 @@ main(int argc, char **argv) { // Check for su to see if the device is rooted or not if (PartitionManager.Mount_By_Path("/system", false)) { // Disable flashing of stock recovery - if (TWFunc::Path_Exists("/system/recovery-from-boot.p")) { + if (TWFunc::Path_Exists("/system/recovery-from-boot.p") && TWFunc::Path_Exists("/system/etc/install-recovery.sh")) { rename("/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"); } @@ -287,7 +287,7 @@ int main(int argc, char **argv) { // Check for su to see if the device is rooted or not if (PartitionManager.Mount_By_Path("/system", false)) { // Disable flashing of stock recovery - if (TWFunc::Path_Exists("/system/recovery-from-boot.p")) { + if (TWFunc::Path_Exists("/system/recovery-from-boot.p") && TWFunc::Path_Exists("/system/etc/install-recovery.sh")) { rename("/system/recovery-from-boot.p", "/system/recovery-from-boot.bak"); gui_print("Renamed stock recovery file in /system to prevent\nthe stock ROM from replacing TWRP.\n"); } |