super partition: mount super partitions using fs_mgr

We are now requiring fstab v2 for android-10+ trees. You can
specify twrp flags using /etc/twrp.flags to label and
annotate partitions.

This patchset uses fs_mgr to load the super partition and build
device mapper blocks off vendor and system depending on the slot
in use. These are mapped to partitions in TWRP and allowed to
be mounted read-only. The super partition is also mapped into a
TWRP partition in order to backup the entire partition. You cannot
backup individual device mapper blocks due to the device can only
be read-only. Therefore you cannot write back to the device mapper.

Change-Id: Icc1d895dcf96ad5ba03989c9bf759419d83673a3
This commit is contained in:
bigbiff
2020-03-23 15:08:27 -04:00
parent 3a299dcc32
commit ee7b7ffba4
15 changed files with 296 additions and 51 deletions

View File

@@ -777,8 +777,12 @@ void DataManager::SetDefaultValues()
#ifdef TW_HAS_NO_BOOT_PARTITION
mPersist.SetValue("tw_backup_list", "/system;/data;");
#else
#ifdef PRODUCT_USE_DYNAMIC_PARTITIONS
mPersist.SetValue("tw_backup_list", "/data;");
#else
mPersist.SetValue("tw_backup_list", "/system;/data;/boot;");
#endif
#endif
mConst.SetValue(TW_MIN_SYSTEM_VAR, TW_MIN_SYSTEM_SIZE);
mData.SetValue(TW_BACKUP_NAME, "(Auto Generate)");
@@ -814,6 +818,7 @@ void DataManager::SetDefaultValues()
mData.SetValue("tw_background_thread_running", "0");
mData.SetValue(TW_RESTORE_FILE_DATE, "0");
mPersist.SetValue("tw_military_time", "0");
mData.SetValue(TW_IS_SUPER, "0");
#ifdef TW_INCLUDE_CRYPTO
mPersist.SetValue(TW_USE_SHA2, "1");