summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--gui/basicTheme/res/ui.xml5
-rwxr-xr-xgui/devices/1024x600/res/ui.xml5
-rw-r--r--gui/devices/1024x768/res/ui.xml5
-rw-r--r--gui/devices/1080x1920/res/ui.xml5
-rw-r--r--gui/devices/1200x1920/res/ui.xml5
-rw-r--r--gui/devices/1280x800/res/ui.xml5
-rw-r--r--gui/devices/1600x2560/res/ui.xml5
-rw-r--r--gui/devices/1920x1200/res/ui.xml5
-rw-r--r--gui/devices/240x240/res/ui.xml5
-rw-r--r--gui/devices/2560x1600/res/ui.xml5
-rw-r--r--gui/devices/320x480/res/ui.xml5
-rw-r--r--gui/devices/480x800/res/ui.xml5
-rw-r--r--gui/devices/480x854/res/ui.xml5
-rw-r--r--gui/devices/540x960/res/ui.xml5
-rw-r--r--gui/devices/720x1280/res/ui.xml5
-rwxr-xr-xgui/devices/800x1280/res/ui.xml5
-rwxr-xr-xgui/devices/800x480/res/ui.xml5
-rw-r--r--partition.cpp2
-rw-r--r--partitionmanager.cpp23
-rw-r--r--partitions.hpp3
20 files changed, 92 insertions, 21 deletions
diff --git a/gui/basicTheme/res/ui.xml b/gui/basicTheme/res/ui.xml
index 442f410c1..3b3110135 100644
--- a/gui/basicTheme/res/ui.xml
+++ b/gui/basicTheme/res/ui.xml
@@ -703,7 +703,10 @@
<placement x="%col1_x%" y="525" />
<font resource="font" color="white" />
<text>.android_secure</text>
- <condition var1="fileexists" var2="/sdcard/.android_secure" />
+ <conditions>
+ <condition var1="tw_has_android_secure" var2="1" />
+ <condition var1="fileexists" var2="/and-sec" />
+ </conditions>
<data variable="tw_backup_andsec" />
<image checked="checkbox_true" unchecked="checkbox_false" />
</object>
diff --git a/gui/devices/1024x600/res/ui.xml b/gui/devices/1024x600/res/ui.xml
index e168cb2a3..f201c679e 100755
--- a/gui/devices/1024x600/res/ui.xml
+++ b/gui/devices/1024x600/res/ui.xml
@@ -1394,7 +1394,10 @@
</object>
<object type="text" color="%text_color%">
- <condition var1="tw_has_data_media" var2="0" />
+ <conditions>
+ <condition var1="tw_has_android_secure" var2="1" />
+ <condition var1="fileexists" var2="/and-sec" />
+ </conditions>
<font resource="font" />
<placement x="%center_x%" y="%row2_text_y%" placement="5" />
<text>.android_secure</text>
diff --git a/gui/devices/1024x768/res/ui.xml b/gui/devices/1024x768/res/ui.xml
index 980d0314f..8d7ded82a 100644
--- a/gui/devices/1024x768/res/ui.xml
+++ b/gui/devices/1024x768/res/ui.xml
@@ -1394,7 +1394,10 @@
</object>
<object type="text" color="%text_color%">
- <condition var1="tw_has_data_media" var2="0" />
+ <conditions>
+ <condition var1="tw_has_android_secure" var2="1" />
+ <condition var1="fileexists" var2="/and-sec" />
+ </conditions>
<font resource="font" />
<placement x="%center_x%" y="%row2_text_y%" placement="5" />
<text>.android_secure</text>
diff --git a/gui/devices/1080x1920/res/ui.xml b/gui/devices/1080x1920/res/ui.xml
index 2f4f71f8c..96ff6231e 100644
--- a/gui/devices/1080x1920/res/ui.xml
+++ b/gui/devices/1080x1920/res/ui.xml
@@ -1116,7 +1116,10 @@
</object>
<object type="text" color="%text_color%">
- <condition var1="tw_has_data_media" var2="0" />
+ <conditions>
+ <condition var1="tw_has_android_secure" var2="1" />
+ <condition var1="fileexists" var2="/and-sec" />
+ </conditions>
<font resource="font" />
<placement x="%center_x%" y="%row3_text_y%" placement="5" />
<text>.android_secure</text>
diff --git a/gui/devices/1200x1920/res/ui.xml b/gui/devices/1200x1920/res/ui.xml
index aec4be087..f727e677d 100644
--- a/gui/devices/1200x1920/res/ui.xml
+++ b/gui/devices/1200x1920/res/ui.xml
@@ -1119,7 +1119,10 @@
</object>
<object type="text" color="%text_color%">
- <condition var1="tw_has_data_media" var2="0" />
+ <conditions>
+ <condition var1="tw_has_android_secure" var2="1" />
+ <condition var1="fileexists" var2="/and-sec" />
+ </conditions>
<font resource="font" />
<placement x="%center_x%" y="%row3_text_y%" placement="5" />
<text>.android_secure</text>
diff --git a/gui/devices/1280x800/res/ui.xml b/gui/devices/1280x800/res/ui.xml
index a54e1694c..2c61b7776 100644
--- a/gui/devices/1280x800/res/ui.xml
+++ b/gui/devices/1280x800/res/ui.xml
@@ -1394,7 +1394,10 @@
</object>
<object type="text" color="%text_color%">
- <condition var1="tw_has_data_media" var2="0" />
+ <conditions>
+ <condition var1="tw_has_android_secure" var2="1" />
+ <condition var1="fileexists" var2="/and-sec" />
+ </conditions>
<font resource="font" />
<placement x="%center_x%" y="%row2_text_y%" placement="5" />
<text>.android_secure</text>
diff --git a/gui/devices/1600x2560/res/ui.xml b/gui/devices/1600x2560/res/ui.xml
index dcfd956b6..1873d0b24 100644
--- a/gui/devices/1600x2560/res/ui.xml
+++ b/gui/devices/1600x2560/res/ui.xml
@@ -1121,7 +1121,10 @@
</object>
<object type="text" color="%text_color%">
- <condition var1="tw_has_data_media" var2="0" />
+ <conditions>
+ <condition var1="tw_has_android_secure" var2="1" />
+ <condition var1="fileexists" var2="/and-sec" />
+ </conditions>
<font resource="font" />
<placement x="%center_x%" y="%row3_text_y%" placement="5" />
<text>.android_secure</text>
diff --git a/gui/devices/1920x1200/res/ui.xml b/gui/devices/1920x1200/res/ui.xml
index f126572f1..1a8daf9ef 100644
--- a/gui/devices/1920x1200/res/ui.xml
+++ b/gui/devices/1920x1200/res/ui.xml
@@ -1394,7 +1394,10 @@
</object>
<object type="text" color="%text_color%">
- <condition var1="tw_has_data_media" var2="0" />
+ <conditions>
+ <condition var1="tw_has_android_secure" var2="1" />
+ <condition var1="fileexists" var2="/and-sec" />
+ </conditions>
<font resource="font" />
<placement x="%center_x%" y="%row2_text_y%" placement="5" />
<text>.android_secure</text>
diff --git a/gui/devices/240x240/res/ui.xml b/gui/devices/240x240/res/ui.xml
index d2808c674..3246a4024 100644
--- a/gui/devices/240x240/res/ui.xml
+++ b/gui/devices/240x240/res/ui.xml
@@ -1086,7 +1086,10 @@
</object>
<object type="text" color="%text_color%">
- <condition var1="tw_has_data_media" var2="0" />
+ <conditions>
+ <condition var1="tw_has_android_secure" var2="1" />
+ <condition var1="fileexists" var2="/and-sec" />
+ </conditions>
<font resource="font" />
<placement x="%center_x%" y="%row3_text_y%" placement="5" />
<text>.android_secure</text>
diff --git a/gui/devices/2560x1600/res/ui.xml b/gui/devices/2560x1600/res/ui.xml
index e3cdb8a8b..d04288966 100644
--- a/gui/devices/2560x1600/res/ui.xml
+++ b/gui/devices/2560x1600/res/ui.xml
@@ -1394,7 +1394,10 @@
</object>
<object type="text" color="%text_color%">
- <condition var1="tw_has_data_media" var2="0" />
+ <conditions>
+ <condition var1="tw_has_android_secure" var2="1" />
+ <condition var1="fileexists" var2="/and-sec" />
+ </conditions>
<font resource="font" />
<placement x="%center_x%" y="%row2_text_y%" placement="5" />
<text>.android_secure</text>
diff --git a/gui/devices/320x480/res/ui.xml b/gui/devices/320x480/res/ui.xml
index 4117f16db..cf17d1a2c 100644
--- a/gui/devices/320x480/res/ui.xml
+++ b/gui/devices/320x480/res/ui.xml
@@ -1103,7 +1103,10 @@
</object>
<object type="text" color="%text_color%">
- <condition var1="tw_has_data_media" var2="0" />
+ <conditions>
+ <condition var1="tw_has_android_secure" var2="1" />
+ <condition var1="fileexists" var2="/and-sec" />
+ </conditions>
<font resource="font" />
<placement x="%center_x%" y="%row3_text_y%" placement="5" />
<text>.android_secure</text>
diff --git a/gui/devices/480x800/res/ui.xml b/gui/devices/480x800/res/ui.xml
index 389006ea8..96fc5c4ba 100644
--- a/gui/devices/480x800/res/ui.xml
+++ b/gui/devices/480x800/res/ui.xml
@@ -1103,7 +1103,10 @@
</object>
<object type="text" color="%text_color%">
- <condition var1="tw_has_data_media" var2="0" />
+ <conditions>
+ <condition var1="tw_has_android_secure" var2="1" />
+ <condition var1="fileexists" var2="/and-sec" />
+ </conditions>
<font resource="font" />
<placement x="%center_x%" y="%row3_text_y%" placement="5" />
<text>.android_secure</text>
diff --git a/gui/devices/480x854/res/ui.xml b/gui/devices/480x854/res/ui.xml
index 32b8ab9e4..330f93931 100644
--- a/gui/devices/480x854/res/ui.xml
+++ b/gui/devices/480x854/res/ui.xml
@@ -1102,7 +1102,10 @@
</object>
<object type="text" color="%text_color%">
- <condition var1="tw_has_data_media" var2="0" />
+ <conditions>
+ <condition var1="tw_has_android_secure" var2="1" />
+ <condition var1="fileexists" var2="/and-sec" />
+ </conditions>
<font resource="font" />
<placement x="%center_x%" y="%row3_text_y%" placement="5" />
<text>.android_secure</text>
diff --git a/gui/devices/540x960/res/ui.xml b/gui/devices/540x960/res/ui.xml
index ecc6f627b..75262bb92 100644
--- a/gui/devices/540x960/res/ui.xml
+++ b/gui/devices/540x960/res/ui.xml
@@ -1103,7 +1103,10 @@
</object>
<object type="text" color="%text_color%">
- <condition var1="tw_has_data_media" var2="0" />
+ <conditions>
+ <condition var1="tw_has_android_secure" var2="1" />
+ <condition var1="fileexists" var2="/and-sec" />
+ </conditions>
<font resource="font" />
<placement x="%center_x%" y="%row3_text_y%" placement="5" />
<text>.android_secure</text>
diff --git a/gui/devices/720x1280/res/ui.xml b/gui/devices/720x1280/res/ui.xml
index f613b6af4..83f7c409b 100644
--- a/gui/devices/720x1280/res/ui.xml
+++ b/gui/devices/720x1280/res/ui.xml
@@ -1116,7 +1116,10 @@
</object>
<object type="text" color="%text_color%">
- <condition var1="tw_has_data_media" var2="0" />
+ <conditions>
+ <condition var1="tw_has_android_secure" var2="1" />
+ <condition var1="fileexists" var2="/and-sec" />
+ </conditions>
<font resource="font" />
<placement x="%center_x%" y="%row3_text_y%" placement="5" />
<text>.android_secure</text>
diff --git a/gui/devices/800x1280/res/ui.xml b/gui/devices/800x1280/res/ui.xml
index c08b742da..b70837bc7 100755
--- a/gui/devices/800x1280/res/ui.xml
+++ b/gui/devices/800x1280/res/ui.xml
@@ -1104,7 +1104,10 @@
</object>
<object type="text" color="%text_color%">
- <condition var1="tw_has_data_media" var2="0" />
+ <conditions>
+ <condition var1="tw_has_android_secure" var2="1" />
+ <condition var1="fileexists" var2="/and-sec" />
+ </conditions>
<font resource="font" />
<placement x="%center_x%" y="%row3_text_y%" placement="5" />
<text>.android_secure</text>
diff --git a/gui/devices/800x480/res/ui.xml b/gui/devices/800x480/res/ui.xml
index 2958ba070..de693f17d 100755
--- a/gui/devices/800x480/res/ui.xml
+++ b/gui/devices/800x480/res/ui.xml
@@ -1402,7 +1402,10 @@
</object>
<object type="text" color="%text_color%">
- <condition var1="tw_has_data_media" var2="0" />
+ <conditions>
+ <condition var1="tw_has_android_secure" var2="1" />
+ <condition var1="fileexists" var2="/and-sec" />
+ </conditions>
<font resource="font" />
<placement x="%center_x%" y="%row2_text_y%" placement="5" />
<text>.android_secure</text>
diff --git a/partition.cpp b/partition.cpp
index 2e434595a..e554ac7eb 100644
--- a/partition.cpp
+++ b/partition.cpp
@@ -507,6 +507,8 @@ bool TWPartition::Process_Flags(string Flags, bool Display_Error) {
}
} else if (strcmp(ptr, "settingsstorage") == 0) {
Is_Storage = true;
+ } else if (strcmp(ptr, "andsec") == 0) {
+ Has_Android_Secure = true;
} else if (strcmp(ptr, "canbewiped") == 0) {
Can_Be_Wiped = true;
} else if (strcmp(ptr, "usermrf") == 0) {
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;
diff --git a/partitions.hpp b/partitions.hpp
index 650f2f60b..cdb4f79b9 100644
--- a/partitions.hpp
+++ b/partitions.hpp
@@ -213,7 +213,8 @@ public:
void Output_Storage_Fstab(); // Creates a /cache/recovery/storage.fstab file with a list of all potential storage locations for app use
private:
- void Setup_Settings_Storage_Partition(TWPartition* Part); // Sets things up for the storage partition
+ void Setup_Settings_Storage_Partition(TWPartition* Part); // Sets up settings storage
+ void Setup_Android_Secure_Location(TWPartition* Part); // Sets up .android_secure if needed
bool Make_MD5(bool generate_md5, string Backup_Folder, string Backup_Filename); // Generates an MD5 after a backup is made
bool Backup_Partition(TWPartition* Part, string Backup_Folder, bool generate_md5, unsigned long long* img_bytes_remaining, unsigned long long* file_bytes_remaining, unsigned long *img_time, unsigned long *file_time, unsigned long long *img_bytes, unsigned long long *file_bytes);
bool Restore_Partition(TWPartition* Part, string Restore_Name, int partition_count);