summaryrefslogtreecommitdiffstats
path: root/twrp.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--twrp.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/twrp.cpp b/twrp.cpp
index 091de19fd..219c30612 100644
--- a/twrp.cpp
+++ b/twrp.cpp
@@ -332,6 +332,7 @@ int main(int argc, char **argv) {
PartitionManager.Disable_MTP();
#endif
+#ifndef TW_OEM_BUILD
// Check if system has never been changed
TWPartition* sys = PartitionManager.Find_Partition_By_Path("/system");
if (sys) {
@@ -350,10 +351,12 @@ int main(int argc, char **argv) {
sys->Change_Mount_Read_Only(false);
}
}
+#endif
// Launch the main GUI
gui_start();
+#ifndef TW_OEM_BUILD
// Disable flashing of stock recovery
TWFunc::Disable_Stock_Recovery_Replace();
// Check for su to see if the device is rooted or not
@@ -368,6 +371,7 @@ int main(int argc, char **argv) {
sync();
PartitionManager.UnMount_By_Path("/system", false);
}
+#endif
// Reboot
TWFunc::Update_Intent_File(Reboot_Value);