OSDN Git Service

vold: only allow emmc_optimized on eMMC storage
authorEric Biggers <ebiggers@google.com>
Mon, 6 Jul 2020 20:46:38 +0000 (13:46 -0700)
committerEric Biggers <ebiggers@google.com>
Tue, 7 Jul 2020 17:08:22 +0000 (10:08 -0700)
commit006eed8e3ad8b38915c55092346fb149298975a0
treecb2762ef9c3a5db376fdccd9480c23e5c380148e
parenta485006ab147695fa28ec20c11ffef4f018253a3
vold: only allow emmc_optimized on eMMC storage

The emmc_optimized encryption flag is specifically designed for the
limitations of inline encryption hardware that follows the eMMC
standard.  It isn't appropriate to use on other types of storage.
So, make vold enforce that it's not used on other types of storage.

Bug: 160639344
Test:
  - Enabled emmc_optimized on Cuttlefish and verified it no longer boots
  - Using a modified version of this change, verified that
    IsEmmcStorage() works as expected on various devices including
    Cuttlefish, Cuttlefish booted in GSI image mode, a device with eMMC
    storage, and a device with UFS storage.
  - Verified that VtsKernelEncryptionTest still passes
Change-Id: Ie27b80658db53b1a4207b3cbb4e309d05130812e
Merged-In: Ie27b80658db53b1a4207b3cbb4e309d05130812e
FsCrypt.cpp