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
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user