summaryrefslogtreecommitdiffstats
path: root/partitions.hpp
diff options
context:
space:
mode:
authorEthan Yonker <dees_troy@teamw.in>2015-12-10 17:19:45 +0100
committerDees Troy <dees_troy@teamw.in>2016-01-25 23:59:17 +0100
commit66a1949df91cc558bf5573c395fa9084c1365e81 (patch)
tree2a2e3c959e8f19f2489bc19f86df6e5a6caa1ccf /partitions.hpp
parentgui: add icons on settings tabs (diff)
downloadandroid_bootable_recovery-66a1949df91cc558bf5573c395fa9084c1365e81.tar
android_bootable_recovery-66a1949df91cc558bf5573c395fa9084c1365e81.tar.gz
android_bootable_recovery-66a1949df91cc558bf5573c395fa9084c1365e81.tar.bz2
android_bootable_recovery-66a1949df91cc558bf5573c395fa9084c1365e81.tar.lz
android_bootable_recovery-66a1949df91cc558bf5573c395fa9084c1365e81.tar.xz
android_bootable_recovery-66a1949df91cc558bf5573c395fa9084c1365e81.tar.zst
android_bootable_recovery-66a1949df91cc558bf5573c395fa9084c1365e81.zip
Diffstat (limited to 'partitions.hpp')
-rw-r--r--partitions.hpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/partitions.hpp b/partitions.hpp
index e802f3468..bc44384ee 100644
--- a/partitions.hpp
+++ b/partitions.hpp
@@ -74,6 +74,8 @@ public:
bool Flash_Image(string Filename); // Flashes an image to the partition
void Change_Mount_Read_Only(bool new_value); // Changes Mount_Read_Only to new_value
int Check_Lifetime_Writes();
+ int Decrypt_Adopted();
+ void Revert_Adopted();
public:
string Current_File_System; // Current file system
@@ -82,6 +84,7 @@ public:
bool Is_Present; // Indicates if the partition is currently present as a block device
string Crypto_Key_Location; // Location of the crypto key used for decrypting encrypted data partitions
unsigned int MTP_Storage_ID;
+ string Adopted_GUID;
protected:
bool Has_Data_Media; // Indicates presence of /data/media, may affect wiping and backup methods
@@ -111,6 +114,7 @@ private:
bool Wipe_F2FS(); // Uses mkfs.f2fs to wipe
bool Wipe_NTFS(); // Uses mkntfs to wipe
bool Wipe_Data_Without_Wiping_Media(); // Uses rm -rf to wipe but does not wipe /data/media
+ bool Wipe_Data_Without_Wiping_Media_Func(const string& parent); // Uses rm -rf to wipe but does not wipe /data/media
bool Backup_Tar(string backup_folder, const unsigned long long *overall_size, const unsigned long long *other_backups_size, pid_t &tar_fork_pid); // Backs up using tar for file systems
bool Backup_DD(string backup_folder); // Backs up using dd for emmc memory types
bool Backup_Dump_Image(string backup_folder); // Backs up using dump_image for MTD memory types
@@ -174,6 +178,7 @@ private:
bool Retain_Layout_Version; // Retains the .layout_version file during a wipe (needed on devices like Sony Xperia T where /data and /data/media are separate partitions)
bool Can_Flash_Img; // Indicates if this partition can have images flashed to it via the GUI
bool Mount_Read_Only; // Only mount this partition as read-only
+ bool Is_Adopted_Storage; // Indicates that this partition is for adopted storage (android_expand)
friend class TWPartitionManager;
friend class DataManager;
@@ -238,6 +243,7 @@ public:
void Translate_Partition(const char* path, const char* resource_name, const char* default_value);
void Translate_Partition(const char* path, const char* resource_name, const char* default_value, const char* storage_resource_name, const char* storage_default_value);
void Translate_Partition_Display_Names(); // Updates display names based on translations
+ void Decrypt_Adopted();
TWAtomicInt stop_backup;
@@ -250,7 +256,7 @@ private:
void Output_Partition(TWPartition* Part);
TWPartition* Find_Partition_By_MTP_Storage_ID(unsigned int Storage_ID); // Returns a pointer to a partition based on MTP Storage ID
bool Add_Remove_MTP_Storage(TWPartition* Part, int message_type); // Adds or removes an MTP Storage partition
- TWPartition* Find_Next_Storage(string Path, string Exclude);
+ TWPartition* Find_Next_Storage(string Path, bool Exclude_Data_Media);
int Open_Lun_File(string Partition_Path, string Lun_File);
pid_t mtppid;
bool mtp_was_enabled;