From 66a1949df91cc558bf5573c395fa9084c1365e81 Mon Sep 17 00:00:00 2001 From: Ethan Yonker Date: Thu, 10 Dec 2015 10:19:45 -0600 Subject: Adopted Storage support -Detects, decrypts, and mounts an adopted SD card if a secondary block device is defined (usually mmcblk1) -Handles unified storage -Displays the adopted storage in MTP along with internal -Factory Reset - wiped just like a data media device, we retain the keys folder and the storage.xml during a factory reset -Backup / Restore -Disable mass storage when adopted storage is present -Read storage nickname from storage.xml and apply it to display names in the GUI -Read storage.xml and determine what storage location is in use for /sdcard and remap accordingly libgpt_twrp is source code mostly kanged from an efimanager project. It is GPL v2 or higher, so we will opt for GPL v3. Change-Id: Ieda0030bec5155ba8d2b9167dc0016cebbf39d55 --- gui/action.cpp | 1 + gui/theme/common/landscape.xml | 6 ++++++ gui/theme/common/languages/en.xml | 1 + gui/theme/common/portrait.xml | 6 ++++++ 4 files changed, 14 insertions(+) (limited to 'gui') diff --git a/gui/action.cpp b/gui/action.cpp index 711f64506..8895e4013 100644 --- a/gui/action.cpp +++ b/gui/action.cpp @@ -1466,6 +1466,7 @@ int GUIAction::decrypt(std::string arg __unused) LOGINFO("Got default contexts and file mode for storage files.\n"); } } + PartitionManager.Decrypt_Adopted(); } } diff --git a/gui/theme/common/landscape.xml b/gui/theme/common/landscape.xml index ff6babe1c..a6b5dca4c 100755 --- a/gui/theme/common/landscape.xml +++ b/gui/theme/common/landscape.xml @@ -1120,6 +1120,12 @@ {@format_data_lcp2=removes encryption on internal storage.} + + + + {@format_data_adopted=Including Adopted Storage} + + {@format_data_undo=This cannot be undone.} diff --git a/gui/theme/common/languages/en.xml b/gui/theme/common/languages/en.xml index 5d7a5ac03..8b36ccfc0 100755 --- a/gui/theme/common/languages/en.xml +++ b/gui/theme/common/languages/en.xml @@ -143,6 +143,7 @@ Format Data will wipe all of your apps, backups, pictures, videos, media, and removes encryption on internal storage. + Including Adopted Storage Format Data will wipe all of your apps, backups, pictures, videos, media, and removes encryption on internal storage. Format Data will wipe all of your apps, diff --git a/gui/theme/common/portrait.xml b/gui/theme/common/portrait.xml index 03004aeff..0904c7254 100755 --- a/gui/theme/common/portrait.xml +++ b/gui/theme/common/portrait.xml @@ -1077,6 +1077,12 @@ {@format_data_ptr3=removes encryption on internal storage.} + + + + {@format_data_adopted=Including Adopted Storage} + + {@format_data_undo=This cannot be undone.} -- cgit v1.2.3