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
This commit is contained in:
Ethan Yonker
2016-01-25 23:59:17 +01:00
committed by Dees Troy
parent 56a7a99d8e
commit 66a1949df9
18 changed files with 1427 additions and 53 deletions
+3 -1
View File
@@ -744,7 +744,7 @@ void DataManager::SetDefaultValues()
mConstValues.insert(make_pair(TW_HAS_USB_STORAGE, "0"));
} else {
LOGINFO("Lun file '%s'\n", Lun_File_str.c_str());
mConstValues.insert(make_pair(TW_HAS_USB_STORAGE, "1"));
mValues.insert(make_pair(TW_HAS_USB_STORAGE, make_pair("1", 0)));
}
#endif
#ifdef TW_INCLUDE_INJECTTWRP
@@ -923,6 +923,8 @@ void DataManager::SetDefaultValues()
mValues.insert(make_pair("tw_language", make_pair(EXPAND(TW_DEFAULT_LANGUAGE), 1)));
LOGINFO("LANG: %s\n", EXPAND(TW_DEFAULT_LANGUAGE));
mValues.insert(make_pair("tw_has_adopted_storage", make_pair("0", 0)));
pthread_mutex_unlock(&m_valuesLock);
}