From 83e82578af038e85cf75cf6675dc76120ec84860 Mon Sep 17 00:00:00 2001 From: Ethan Yonker Date: Fri, 4 Apr 2014 10:59:28 -0500 Subject: Allow building of an OEM friendly TWRP Disable theming Disable creating the TWRP folder for the settings file Change factory reset on data/media devices to a full wipe Change-Id: I3104282b5dd3f55dfff7c8cf39c72750af08563d --- partition.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'partition.cpp') diff --git a/partition.cpp b/partition.cpp index 56cae1e08..2e434595a 100644 --- a/partition.cpp +++ b/partition.cpp @@ -1312,7 +1312,9 @@ bool TWPartition::Wipe_Encryption() { if (Has_Data_Media && !Symlink_Mount_Point.empty()) { Recreate_Media_Folder(); } +#ifndef TW_OEM_BUILD gui_print("You may need to reboot recovery to be able to use /data again.\n"); +#endif return true; } else { Has_Data_Media = Save_Data_Media; @@ -1556,6 +1558,10 @@ bool TWPartition::Wipe_F2FS() { } bool TWPartition::Wipe_Data_Without_Wiping_Media() { +#ifdef TW_OEM_BUILD + // In an OEM Build we want to do a full format + return Wipe_Encryption(); +#else string dir; #ifdef HAVE_SELINUX fixPermissions perms; @@ -1599,6 +1605,7 @@ bool TWPartition::Wipe_Data_Without_Wiping_Media() { } gui_print("Dirent failed to open /data, error!\n"); return false; +#endif // ifdef TW_OEM_BUILD } bool TWPartition::Backup_Tar(string backup_folder) { -- cgit v1.2.3