summaryrefslogtreecommitdiffstats
path: root/partitions.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'partitions.hpp')
-rw-r--r--partitions.hpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/partitions.hpp b/partitions.hpp
index d780fe560..a8fd70b40 100644
--- a/partitions.hpp
+++ b/partitions.hpp
@@ -31,6 +31,23 @@
using namespace std;
+// BasePartition is used for overriding so we can run custom, device
+// specific code.
+class BasePartition {
+ public:
+ explicit BasePartition() {}
+ virtual ~BasePartition() {}
+
+ virtual bool PreWipeEncryption() {
+ return true;
+ }
+
+ virtual bool PostWipeEncryption() {
+ return true;
+ }
+};
+BasePartition* make_partition();
+
struct PartitionList {
std::string Display_Name;
std::string Mount_Point;
@@ -128,6 +145,7 @@ public:
void Partition_Post_Processing(bool Display_Error); // Apply partition specific settings after fstab processed
void Set_Backup_FileName(string fname); // Set Backup_FileName for partition
string Get_Backup_Name(); // Get Backup_Name for partition
+ bool Decrypt_FBE_DE(); // If FBE is present, backup exclusions are set up and DE decrypt is attempted
public:
string Current_File_System; // Current file system
@@ -246,6 +264,7 @@ private:
bool SlotSelect; // Partition has A/B slots
TWExclude backup_exclusions; // Exclusions for file based backups
TWExclude wipe_exclusions; // Exclusions for file based wipes (data/media devices only)
+ string Key_Directory; // Metadata key directory needed for mounting FBE encrypted data partitions using metadata encryption
struct partition_fs_flags_struct { // This struct is used to store mount flags and options for different file systems for the same partition
string File_System;
@@ -332,6 +351,7 @@ public:
void Set_Active_Slot(const string& Slot); // Sets the active slot to A or B
string Get_Active_Slot_Suffix(); // Returns active slot _a or _b
string Get_Active_Slot_Display(); // Returns active slot A or B for display purposes
+ string Get_Android_Root_Path(); // Returns path of ANDROID_ROOT environment variable
struct pollfd uevent_pfd; // Used for uevent code
void Remove_Uevent_Devices(const string& sysfs_path); // Removes subpartitions from the Partitions vector for a matched uevent device
void Handle_Uevent(const Uevent_Block_Data& uevent_data); // Handle uevent data