Skip to content

Commit

Permalink
Enable metadata encryption for userdata_gsi.
Browse files Browse the repository at this point in the history
When running a live GSI, userdata is a logical partition. If we don't
fix up the fstab we'll derive the underlying block device instead of
the device-mapper node for userdat_gsi, resulting in a corrupt data
partition for both images.

Bug: 123906417
Test: manual test
Change-Id: Ic0101f30504de26e725442da2da3888008c31b63
  • Loading branch information
dvandercorp committed Feb 14, 2019
1 parent b6d5cd2 commit 0d71c4b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -226,14 +226,19 @@ static int process_config(VolumeManager* vm, bool* has_adoptable, bool* has_quot
*has_adoptable = false;
*has_quota = false;
*has_reserved = false;
for (const auto& entry : fstab_default) {
for (auto& entry : fstab_default) {
if (entry.fs_mgr_flags.quota) {
*has_quota = true;
}
if (entry.reserved_size > 0) {
*has_reserved = true;
}

/* Make sure logical partitions have an updated blk_device. */
if (entry.fs_mgr_flags.logical && !fs_mgr_update_logical_partition(&entry)) {
PLOG(FATAL) << "could not find logical partition " << entry.blk_device;
}

if (entry.fs_mgr_flags.vold_managed) {
if (entry.fs_mgr_flags.nonremovable) {
LOG(WARNING) << "nonremovable no longer supported; ignoring volume";
Expand Down

0 comments on commit 0d71c4b

Please sign in to comment.