summaryrefslogtreecommitdiffstats
path: root/partitionmanager.cpp
diff options
context:
space:
mode:
authorMatt Mower <mowerm@gmail.com>2014-04-15 06:25:26 +0200
committerGerrit Code Review <gerrit2@gerrit>2014-04-16 17:30:26 +0200
commitbf4efa39e4f710100c3087be5ecde014d089b1d8 (patch)
treea7eec6533b60db78ca4f2686b9b10e018406f964 /partitionmanager.cpp
parentSupport .md5sum extension for package verification (diff)
downloadandroid_bootable_recovery-bf4efa39e4f710100c3087be5ecde014d089b1d8.tar
android_bootable_recovery-bf4efa39e4f710100c3087be5ecde014d089b1d8.tar.gz
android_bootable_recovery-bf4efa39e4f710100c3087be5ecde014d089b1d8.tar.bz2
android_bootable_recovery-bf4efa39e4f710100c3087be5ecde014d089b1d8.tar.lz
android_bootable_recovery-bf4efa39e4f710100c3087be5ecde014d089b1d8.tar.xz
android_bootable_recovery-bf4efa39e4f710100c3087be5ecde014d089b1d8.tar.zst
android_bootable_recovery-bf4efa39e4f710100c3087be5ecde014d089b1d8.zip
Diffstat (limited to 'partitionmanager.cpp')
-rw-r--r--partitionmanager.cpp23
1 files changed, 20 insertions, 3 deletions
diff --git a/partitionmanager.cpp b/partitionmanager.cpp
index 495ef9bb3..d4e371551 100644
--- a/partitionmanager.cpp
+++ b/partitionmanager.cpp
@@ -57,6 +57,7 @@ int TWPartitionManager::Process_Fstab(string Fstab_Filename, bool Display_Error)
FILE *fstabFile;
char fstab_line[MAX_FSTAB_LINE_LENGTH];
TWPartition* settings_partition = NULL;
+ TWPartition* andsec_partition = NULL;
fstabFile = fopen(Fstab_Filename.c_str(), "rt");
if (fstabFile == NULL) {
@@ -81,6 +82,11 @@ int TWPartitionManager::Process_Fstab(string Fstab_Filename, bool Display_Error)
} else {
partition->Is_Settings_Storage = false;
}
+ if (!andsec_partition && partition->Has_Android_Secure) {
+ andsec_partition = partition;
+ } else {
+ partition->Has_Android_Secure = false;
+ }
Partitions.push_back(partition);
} else {
delete partition;
@@ -104,6 +110,11 @@ int TWPartitionManager::Process_Fstab(string Fstab_Filename, bool Display_Error)
else
LOGINFO("Error creating fstab\n");
}
+ if (andsec_partition) {
+ Setup_Android_Secure_Location(andsec_partition);
+ } else {
+ Setup_Android_Secure_Location(settings_partition);
+ }
Setup_Settings_Storage_Partition(settings_partition);
Update_System_Details();
UnMount_Main_Partitions();
@@ -139,14 +150,20 @@ int TWPartitionManager::Write_Fstab(void) {
}
void TWPartitionManager::Setup_Settings_Storage_Partition(TWPartition* Part) {
-#ifndef RECOVERY_SDCARD_ON_DATA
- Part->Setup_AndSec();
-#endif
DataManager::SetValue("tw_settings_path", Part->Storage_Path);
DataManager::SetValue("tw_storage_path", Part->Storage_Path);
LOGINFO("Settings storage is '%s'\n", Part->Storage_Path.c_str());
}
+void TWPartitionManager::Setup_Android_Secure_Location(TWPartition* Part) {
+ if (Part->Has_Android_Secure)
+ Part->Setup_AndSec();
+#ifndef RECOVERY_SDCARD_ON_DATA
+ else
+ Part->Setup_AndSec();
+#endif
+}
+
void TWPartitionManager::Output_Partition_Logging(void) {
std::vector<TWPartition*>::iterator iter;