From 89583ef00f54369be2b5ab3495495616056eba13 Mon Sep 17 00:00:00 2001 From: Ethan Yonker Date: Wed, 26 Aug 2015 09:01:59 -0500 Subject: Fix up some TW_OEM_BUILD things Fix factory reset now properly formats data as expected Change text for ORS processing Disable system read only check, SuperSU, and patch system Stop copying fstab and version to cache Change-Id: I20f5cae390afbb8d2d88e01b8d9b9bf4ff0fdea1 --- partitionmanager.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'partitionmanager.cpp') diff --git a/partitionmanager.cpp b/partitionmanager.cpp index 0262648f1..bf4b38247 100644 --- a/partitionmanager.cpp +++ b/partitionmanager.cpp @@ -1095,8 +1095,17 @@ int TWPartitionManager::Factory_Reset(void) { for (iter = Partitions.begin(); iter != Partitions.end(); iter++) { if ((*iter)->Wipe_During_Factory_Reset && (*iter)->Is_Present) { - if (!(*iter)->Wipe()) - ret = false; +#ifdef TW_OEM_BUILD + if ((*iter)->Mount_Point == "/data") { + if (!(*iter)->Wipe_Encryption()) + ret = false; + } else { +#endif + if (!(*iter)->Wipe()) + ret = false; +#ifdef TW_OEM_BUILD + } +#endif } else if ((*iter)->Has_Android_Secure) { if (!(*iter)->Wipe_AndSec()) ret = false; -- cgit v1.2.3