OSDN Git Service

android-x86/system-vold.git
3 years agoCheck return value of create_crypto_blk_dev()
Eric Biggers [Tue, 3 Nov 2020 22:11:00 +0000 (14:11 -0800)]
Check return value of create_crypto_blk_dev()

cryptfs_enable_internal() forgot to check the return value of
create_crypto_blk_dev(), so it was continuing to
cryptfs_enable_inplace() when creating the dm-crypt device failed, which
doesn't make sense.

Test: see I08fc8465f7962abd698904b5466f3ed080d53953
Change-Id: If9f20069d0f084150aa887a350f7c0c31a6d80f2

3 years agoRemove unused support for partial encryption
Eric Biggers [Tue, 3 Nov 2020 22:11:00 +0000 (14:11 -0800)]
Remove unused support for partial encryption

Commit 87999173dd79 ("Don't corrupt ssd when encrypting and power
fails") added a lot of code to handle pausing in-place conversion from
unencrypted => FDE when the battery was low, and resuming it later.

It was eventually decided that this wasn't needed, and commit
7e17e2d22678 ("Don't worry about battery levels when encrypting")
removed the checks for low battery.

This made the partial encryption code unused.  So remove it.

Note that this was cluttering up the metadata encryption code too, since
EncryptInplace.cpp is now shared by both FDE and metadata encryption.

Bug: 16868177
Test: see I08fc8465f7962abd698904b5466f3ed080d53953
Change-Id: Ibd2eb08a2aa15938097abcb8a67b5a813c4d76c7

3 years agoMerge changes I8d2bd67d,I704522b2
Eric Biggers [Tue, 3 Nov 2020 17:02:46 +0000 (17:02 +0000)]
Merge changes I8d2bd67d,I704522b2

* changes:
  FsCrypt: silently skip "." and ".." when loading keys
  Utils: add IsDotOrDotDot() and use it in the appropriate places

3 years agoFsCrypt: silently skip "." and ".." when loading keys
Eric Biggers [Mon, 2 Nov 2020 23:11:06 +0000 (15:11 -0800)]
FsCrypt: silently skip "." and ".." when loading keys

Avoid logging useless messages like:

    D vold    : Skipping non-key .
    D vold    : Skipping non-key ..
    D vold    : Skipping non-de-key .
    D vold    : Skipping non-de-key ..

Change-Id: I8d2bd67d554605a5ab9faadd3730870dfe0881f6

3 years agoUtils: add IsDotOrDotDot() and use it in the appropriate places
Eric Biggers [Mon, 2 Nov 2020 23:31:56 +0000 (15:31 -0800)]
Utils: add IsDotOrDotDot() and use it in the appropriate places

Change-Id: I704522b26acfb3e7c423d9a14d69ede513b50482

3 years agoMerge "KeyUtil: don't use keepOld=true for system DE and volume keys"
Eric Biggers [Mon, 2 Nov 2020 23:31:23 +0000 (23:31 +0000)]
Merge "KeyUtil: don't use keepOld=true for system DE and volume keys"

3 years agoKeyUtil: don't use keepOld=true for system DE and volume keys
Eric Biggers [Thu, 29 Oct 2020 19:59:28 +0000 (12:59 -0700)]
KeyUtil: don't use keepOld=true for system DE and volume keys

Commit 77df7f207dce / http://aosp/1217657 ("Refactor to use
EncryptionPolicy everywhere we used to use raw_ref") unintentionally
made fscrypt_initialize_systemwide_keys() start specifying keepOld=true
(via default parameter value) when retrieving the system DE key, and
likewise for read_or_create_volkey() and volume keys.

As a result, if the associated Keymaster key needs to be upgraded, the
upgraded key blob gets written to "keymaster_key_blob_upgraded", but it
doesn't replace the original "keymaster_key_blob", nor is the original
key deleted from Keymaster.  This happens at every boot, eventually
resulting in the RPMB partition in Keymaster becoming full.

Only the metadata encryption key ever needs keepOld=true, since it's the
only key that isn't stored in /data, and the purpose of keepOld=true is
to allow a key that isn't stored in /data to be committed or rolled back
when a userdata checkpoint is committed or rolled back.

So, fix this bug by removing the default value of keepOld, and
specifying false everywhere except the metadata encryption key.

Note that when an affected device gets this fix, it will finally upgrade
its system DE key correctly.  However, this fix doesn't free up space in
Keymaster that was consumed by this bug.

Test: On bramble:
  - Flashed rvc-d1-dev build, with wiping userdata
  - Flashed a newer build, without wiping userdata
  - Log expectedly shows key upgrades:
        $ adb logcat | grep 'Upgrading key'
        D vold    : Upgrading key: /metadata/vold/metadata_encryption/key
        D vold    : Upgrading key: /data/unencrypted/key
        D vold    : Upgrading key: /data/misc/vold/user_keys/de/0
        D vold    : Upgrading key: /data/misc/vold/user_keys/ce/0/current
  - Rebooted
  - Log unexpectedly shows the system DE key being upgraded again:
        $ adb logcat | grep 'Upgrading key'
        D vold    : Upgrading key: /data/unencrypted/key
  - "keymaster_key_blob_upgraded" unexpectedly still exists:
        $ adb shell find /data /metadata -name keymaster_key_blob_upgraded
        /data/unencrypted/key/keymaster_key_blob_upgraded
  - Applied this fix and flashed, without wiping userdata
  - Log shows system DE key being upgraded (expected because due to the
    bug, the upgraded key didn't replace the original one before)
        $ adb logcat | grep 'Upgrading key'
        D vold    : Upgrading key: /data/unencrypted/key
  - "keymaster_key_blob_upgraded" expectedly no longer exists
        $ adb shell find /data /metadata -name keymaster_key_blob_upgraded
  - Rebooted
  - Log expectedly doesn't show any more key upgrades
        $ adb logcat | grep 'Upgrading key'
Bug: 171944521
Bug: 172019387
Change-Id: I42d3f5fbe32cb2ec229f4b614cfb271412a3ed29

3 years agoMerge "Fix argument type for FS_IOC_GETFLAGS and FS_IOC_SETFLAGS"
Eric Biggers [Wed, 28 Oct 2020 16:16:26 +0000 (16:16 +0000)]
Merge "Fix argument type for FS_IOC_GETFLAGS and FS_IOC_SETFLAGS"

3 years agoFix argument type for FS_IOC_GETFLAGS and FS_IOC_SETFLAGS
Eric Biggers [Fri, 23 Oct 2020 23:32:58 +0000 (16:32 -0700)]
Fix argument type for FS_IOC_GETFLAGS and FS_IOC_SETFLAGS

These ioctls take a pointer to an 'int' (or an 'unsigned int', it
doesn't matter), not an 'unsigned long'.  See 'man ioctl_iflags'.
Presumably it happened to work anyway because Android only runs on
little endian platforms.

Bug: 146419093
Bug: 163453310
Change-Id: I73099dafd4ee8d497c0a754149271871a37454f6
Signed-off-by: Eric Biggers <ebiggers@google.com>
3 years agoMerge "Add IVold::destroyDsuMetadataKey()"
Yo Chiang [Mon, 26 Oct 2020 05:27:36 +0000 (05:27 +0000)]
Merge "Add IVold::destroyDsuMetadataKey()"

3 years agoMerge "Set media folder +F for adopted storage as well"
Treehugger Robot [Wed, 21 Oct 2020 22:04:11 +0000 (22:04 +0000)]
Merge "Set media folder +F for adopted storage as well"

3 years agoSet media folder +F for adopted storage as well
Daniel Rosenberg [Thu, 13 Aug 2020 01:31:43 +0000 (18:31 -0700)]
Set media folder +F for adopted storage as well

We previously only set +F for /data/media, but adopted storage needs
this as well. Instead we add support for adding attrs to PrepareDir.

Bug: 163453310
Test: sm set-virtual-disk true
      follow UI setup and confirm +F on /mnt/expand/*/media
Change-Id: I08f13b57a4de3538e88b38eb95b0ac115a5a5ce8
Merged-In: I08f13b57a4de3538e88b38eb95b0ac115a5a5ce8

3 years agoMerge "vold: Generate storage key without rollback resistance"
Eric Biggers [Tue, 20 Oct 2020 23:17:22 +0000 (23:17 +0000)]
Merge "vold: Generate storage key without rollback resistance"

3 years agovold: Generate storage key without rollback resistance
Gaurav Kashyap [Fri, 11 Sep 2020 22:24:01 +0000 (15:24 -0700)]
vold: Generate storage key without rollback resistance

Generate a storage key without rollback_resistance when device doesnt
support the corresponding tag.

Bug: 168527558

Change-Id: Iaf27c64dba627a31c9cbd9178458bf6785d00251

3 years agoMerge changes Idc575106,Id6457a2b am: 3e0e53dbe5
Eric Biggers [Mon, 19 Oct 2020 16:26:21 +0000 (16:26 +0000)]
Merge changes Idc575106,Id6457a2b am: 3e0e53dbe5

Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1462712

Change-Id: If01239e184cd19de660fa158d599c9826ea0cf71

3 years agoMerge "MetadataCrypt: remove unnecessary retry loop" am: 80fdc5a4e3
Eric Biggers [Mon, 19 Oct 2020 16:26:15 +0000 (16:26 +0000)]
Merge "MetadataCrypt: remove unnecessary retry loop" am: 80fdc5a4e3

Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1462708

Change-Id: Id26dbda854480c74d07fcec87f1d045325bf625a

3 years agoMerge "Silence useless LOOP_GET_STATUS64 warnings" am: 6f70c92aee
Eric Biggers [Mon, 19 Oct 2020 16:26:06 +0000 (16:26 +0000)]
Merge "Silence useless LOOP_GET_STATUS64 warnings" am: 6f70c92aee

Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1462709

Change-Id: I75d169008b857848c314598cac4d87f27d6919b1

3 years agoMerge changes Idc575106,Id6457a2b
Eric Biggers [Mon, 19 Oct 2020 16:08:02 +0000 (16:08 +0000)]
Merge changes Idc575106,Id6457a2b

* changes:
  IdleMaint: skip swap space, bind mounts, and virtual filesystems
  IdleMaint: use fstab_default from VoldUtil

3 years agoMerge "MetadataCrypt: remove unnecessary retry loop"
Eric Biggers [Mon, 19 Oct 2020 16:05:53 +0000 (16:05 +0000)]
Merge "MetadataCrypt: remove unnecessary retry loop"

3 years agoMerge "Silence useless LOOP_GET_STATUS64 warnings"
Eric Biggers [Mon, 19 Oct 2020 16:05:17 +0000 (16:05 +0000)]
Merge "Silence useless LOOP_GET_STATUS64 warnings"

3 years agoIdleMaint: skip swap space, bind mounts, and virtual filesystems
Eric Biggers [Thu, 15 Oct 2020 23:54:38 +0000 (16:54 -0700)]
IdleMaint: skip swap space, bind mounts, and virtual filesystems

When the idle maintenance task runs on Cuttlefish, there are several
warnings printed to logcat after the expected messages:

    D vold    : Starting trim of /data
    I vold    : Trimmed 0 bytes on /data in 36ms
    D vold    : Starting trim of /cache
    I vold    : Trimmed 58662912 bytes on /cache in 0ms
    D vold    : Starting trim of /metadata
    I vold    : Trimmed 7725056 bytes on /metadata in 12ms
    D vold    : Starting trim of none
    W vold    : Failed to open none: No such file or directory
    D vold    : Starting trim of /sdcard
    W vold    : Failed to open /sdcard: Not a directory
    D vold    : Starting trim of /mnt/vendor/shared
    W vold    : Trim failed on /mnt/vendor/shared: Inappropriate ioctl for device

This is because vold gathers the filesystems to trim from the fstab, but
it fails to exclude some entries that aren't appropriate to trim:

    /dev/block/zram0 none swap defaults zramsize=75%
    /tmp /sdcard none defaults,bind recoveryonly
    shared /mnt/vendor/shared virtiofs nosuid,nodev,noatime nofail

These should be excluded because they are swap space, a bind mount, and
a virtual filesystem respectively.

Fix addFromFstab() to exclude the above cases.

Afterwards, the messages on Cuttlefish are:

    D vold    : Starting trim of /data
    I vold    : Trimmed 0 bytes on /data in 39ms
    D vold    : Starting trim of /cache
    I vold    : Trimmed 58662912 bytes on /cache in 0ms
    D vold    : Starting trim of /metadata
    I vold    : Trimmed 9822208 bytes on /metadata in 12ms

Change-Id: Idc575106fe6f81c737f684429d58dba4bd5478ad

3 years agoIdleMaint: use fstab_default from VoldUtil
Eric Biggers [Thu, 15 Oct 2020 23:54:38 +0000 (16:54 -0700)]
IdleMaint: use fstab_default from VoldUtil

vold already reads the default fstab into memory when starting up, and
the default fstab isn't allowed to change later.  So in IdleMaint.cpp,
just use 'fstab_default' instead of reading it again.

This also has the advantage that fstab entries for "logical partitions"
now get a properly updated blk_device, which is needed in order to start
using blk_device to exclude virtual filesystems in addFromFstab().

Change-Id: Id6457a2b7972d01dde4bca0c5f2da86374d930af

3 years agoSilence useless LOOP_GET_STATUS64 warnings
Eric Biggers [Thu, 15 Oct 2020 21:52:54 +0000 (14:52 -0700)]
Silence useless LOOP_GET_STATUS64 warnings

When vold starts up, there are lots of warnings like:

    W vold    : Failed to LOOP_GET_STATUS64 /dev/block/loop30: No such device or address
    W vold    : Failed to LOOP_GET_STATUS64 /dev/block/loop29: No such device or address
    W vold    : Failed to LOOP_GET_STATUS64 /dev/block/loop28: No such device or address

vold is iterating through all loop devices and unbinding the file from
any vold-managed ones.

It's expected that not all loop devices have a file bound to them,
however.  On these, LOOP_GET_STATUS64 fails with ENXIO.

Don't print a warning in such cases.

Change-Id: I91755259dc2c09b1869627259d1e59d5edd6f145

3 years agoMetadataCrypt: remove unnecessary retry loop
Eric Biggers [Thu, 15 Oct 2020 21:39:34 +0000 (14:39 -0700)]
MetadataCrypt: remove unnecessary retry loop

As per the discussion at http://aosp/1456266, the retry loop in
create_crypto_blk_dev() doesn't appear to be needed.  Remove it.

For now don't bother removing the same retry loop in cryptfs.cpp, since
the FDE code isn't really being updated anymore and eventually will be
removed entirely.

Change-Id: Iba0b046f9cdd9723ea1a2ae70f4d4aed4355b97b

3 years agoAdd IVold::destroyDsuMetadataKey()
Yo Chiang [Wed, 7 Oct 2020 06:20:00 +0000 (14:20 +0800)]
Add IVold::destroyDsuMetadataKey()

destroyDsuMetadataKey() / destroy_dsu_metadata_key() calls
android::gsi::GetDsuMetadataKeyDir() to query the DSU metadata
encryption key dir and destroy the key.
This releases the resource and allows consecutive DSU installations to
use the same key *directory*, but not the same key *blob*.

Bug: 168571434
Test: 1. Install a DSU system.
  2. Boot the DSU system and reboot back to the host system.
  3. Wipe the DSU installation.
  4. DSU metadata key dir /metadata/vold/metadata_encryption/dsu/dsu is
     destroyed.
Change-Id: Ib851177315a5a266807f46ccfd446de1848232cf

3 years agoMerge "Use dm.CreateDevice() with a timeout." am: e9023dc7bb
Martijn Coenen [Mon, 12 Oct 2020 18:46:02 +0000 (18:46 +0000)]
Merge "Use dm.CreateDevice() with a timeout." am: e9023dc7bb

Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1456266

Change-Id: Id232a623d6aa3beaa3fdb5b31c722e96da6d75c9

3 years agoMerge "Use dm.CreateDevice() with a timeout."
Martijn Coenen [Mon, 12 Oct 2020 18:07:39 +0000 (18:07 +0000)]
Merge "Use dm.CreateDevice() with a timeout."

3 years agoUse dm.CreateDevice() with a timeout.
Martijn Coenen [Mon, 12 Oct 2020 11:26:52 +0000 (13:26 +0200)]
Use dm.CreateDevice() with a timeout.

Using the regular CreateDevice() variant with getDmDeviceByName() has a
race-condition that is documented in libdm/dm.h; instead, use the
variant with a timeout, which guarantees that the block device exists
when it returns.

Test: atest AdoptableHostTest
Bug: 150935323
Change-Id: Ic06cad9af7c44e23359d95b262f68dba27ddfb3a

3 years agoSkip ab/6749736 in stage.
Xin Li [Fri, 9 Oct 2020 00:24:08 +0000 (17:24 -0700)]
Skip ab/6749736 in stage.

Merged-In: I876aaf6bba933c964a3573d8053cc60829b3a5fa
Change-Id: I4c8616d3c17e3b9818bde3299fcc79f5444a95f5

3 years agoMerge "Enable vold to set level from user." am: dd66de13ea
Alan Stokes [Mon, 5 Oct 2020 08:38:49 +0000 (08:38 +0000)]
Merge "Enable vold to set level from user." am: dd66de13ea

Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1437215

Change-Id: I4e09204e7b0e2a0c3028ba38238bf65636144ad2

3 years agoMerge "Enable vold to set level from user."
Alan Stokes [Mon, 5 Oct 2020 08:23:08 +0000 (08:23 +0000)]
Merge "Enable vold to set level from user."

3 years agoEnable vold to set level from user.
Alan Stokes [Fri, 7 Feb 2020 09:29:38 +0000 (09:29 +0000)]
Enable vold to set level from user.

We want various per-user directories to have their SELinux MLS level
set to restrict access from other users, as an improvement to user
isolation.

We extend vold_prepare_subdirs to implement this if a flag is
set. vold itself then sets the flag based on a new property,
ro.vold.level_from_user. This is to allow testing of further
incremental work to ensure system apps correctly handle the new
restriction on different devices rather than causing immediate
breakage. Eventually this will go away and the restriction will apply
everywhere.

Bug: 141677108
Test: Manual, with and without propery set.
Change-Id: I8e2207bd94b487bdcc09fd4d80b031027dfea1e3

3 years agoMerge "vold: remove unused stop() methods" am: d70e2b4ea9
Treehugger Robot [Thu, 24 Sep 2020 16:25:43 +0000 (16:25 +0000)]
Merge "vold: remove unused stop() methods" am: d70e2b4ea9

Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1434595

Change-Id: Ifb529e76791d98c76c549bfb93c5abcf4096e685

3 years agoMerge "vold: remove unused stop() methods"
Treehugger Robot [Thu, 24 Sep 2020 16:06:58 +0000 (16:06 +0000)]
Merge "vold: remove unused stop() methods"

3 years agovold: remove unused stop() methods
Eric Biggers [Wed, 23 Sep 2020 17:00:40 +0000 (10:00 -0700)]
vold: remove unused stop() methods

NetlinkManager::stop() and VolumeManager::stop() are never called, so
remove them.

Change-Id: I868aa2ad24066d2830816984afcc10000cbabad1

3 years agoMerge "bench: Add fail-fast error path to inodeop_bench" am: 5a99d3cfbb
Treehugger Robot [Mon, 21 Sep 2020 10:07:55 +0000 (10:07 +0000)]
Merge "bench: Add fail-fast error path to inodeop_bench" am: 5a99d3cfbb

Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1429775

Change-Id: I6bd94ca9e8ec62660b716d319ae949cdc578f6a3

3 years agoMerge "bench: Add fail-fast error path to inodeop_bench"
Treehugger Robot [Mon, 21 Sep 2020 09:44:03 +0000 (09:44 +0000)]
Merge "bench: Add fail-fast error path to inodeop_bench"

3 years agobench: Add fail-fast error path to inodeop_bench
Stefano Duo [Fri, 18 Sep 2020 09:00:42 +0000 (09:00 +0000)]
bench: Add fail-fast error path to inodeop_bench

If one of the repeated operations specified by a command fails, report
the error to the user and don't export its metric.

Test: Manual run on physical device
Bug: 165903680
Signed-off-by: Stefano Duo <stefanoduo@google.com>
Change-Id: I3a8caeb6d878b004d89e425bc166c8505fda938a

3 years agoMerge "vold: remove unused code for CONFIG_HW_DISK_ENCRYPTION" am: 4e6e7e6c70
Treehugger Robot [Wed, 16 Sep 2020 02:04:55 +0000 (02:04 +0000)]
Merge "vold: remove unused code for CONFIG_HW_DISK_ENCRYPTION" am: 4e6e7e6c70

Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1427711

Change-Id: I0254ee7e493f98a78476f2e939884185b04d10c0

3 years agoMerge "vold: remove unused code for CONFIG_HW_DISK_ENCRYPTION"
Treehugger Robot [Wed, 16 Sep 2020 01:24:16 +0000 (01:24 +0000)]
Merge "vold: remove unused code for CONFIG_HW_DISK_ENCRYPTION"

3 years agovold: remove unused code for CONFIG_HW_DISK_ENCRYPTION
Eric Biggers [Tue, 15 Sep 2020 18:55:40 +0000 (11:55 -0700)]
vold: remove unused code for CONFIG_HW_DISK_ENCRYPTION

Nothing defines CONFIG_HW_DISK_ENCRYPTION, so remove the unused code
that's conditional on it being defined.

Change-Id: Ie435e138686eb4eac47d9aa762ae06f1645a117f

3 years agoMerge "secdiscard: use F2FS_IOC_SEC_TRIM_FILE for secure discard" am: c5ff520a01
Daeho Jeong [Tue, 15 Sep 2020 00:13:38 +0000 (00:13 +0000)]
Merge "secdiscard: use F2FS_IOC_SEC_TRIM_FILE for secure discard" am: c5ff520a01

Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1420895

Change-Id: I84cf17d8dd07c72a67beba46a814f51969a159ac

3 years agoMerge "secdiscard: use F2FS_IOC_SEC_TRIM_FILE for secure discard"
Daeho Jeong [Mon, 14 Sep 2020 23:50:17 +0000 (23:50 +0000)]
Merge "secdiscard: use F2FS_IOC_SEC_TRIM_FILE for secure discard"

3 years agosecdiscard: use F2FS_IOC_SEC_TRIM_FILE for secure discard
Daeho Jeong [Tue, 8 Sep 2020 03:59:28 +0000 (12:59 +0900)]
secdiscard: use F2FS_IOC_SEC_TRIM_FILE for secure discard

A new interface, F2FS_IOC_SEC_TRIM_FILE, has been added to F2FS
filesystem to send secure discard command to a specific file,
not to block device. We can use this interface for better discard
command handling on a file basis.

[how to use F2FS_IOC_SEC_TRIM_FILE]
start: start offset in byte (should be aligned with 4096)
len: length in byte (should be aligned with 4096, except designating EOF)
     -1 also means till EOF.
flags: F2FS_TRIM_FILE_DISCARD - sending secure discard command. If the
                                device doesn't support it, send normal
                                discard.
       F2FS_TRIM_FILE_ZEROOUT - overwrite zero data in the file.

Bug: 140759142
Test: execute "secdiscard -- <file_path>" and check the content of file
Signed-off-by: Daeho Jeong <daehojeong@google.com>
Change-Id: I6ee44a047d291274c9d70ae5e4ccccfc06a52f89

3 years agoMerge "Add '-unstable' to solve ODR violation" am: f7794b5dc1
Treehugger Robot [Fri, 11 Sep 2020 08:40:46 +0000 (08:40 +0000)]
Merge "Add '-unstable' to solve ODR violation" am: f7794b5dc1

Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1400407

Change-Id: I44aea35571e4dff7f9f1010325f51d0e98dc01f1

3 years agoMerge "Add '-unstable' to solve ODR violation"
Treehugger Robot [Fri, 11 Sep 2020 08:19:44 +0000 (08:19 +0000)]
Merge "Add '-unstable' to solve ODR violation"

3 years agoAdd '-unstable' to solve ODR violation
Jeongik Cha [Fri, 14 Aug 2020 14:51:36 +0000 (23:51 +0900)]
Add '-unstable' to solve ODR violation

The interface which is imported by an unstable interface is 'unstable'
as well. Until now, the ODR violation checker in aidl has omitted an
interface imported, but it will be checked, accordingly, fix the current
problem

Bug: 146436251
Test: m nothing
Change-Id: Id3c4bbc9149ba7c3e0a0d728026f02f60cb17424
Merged-In: Id3c4bbc9149ba7c3e0a0d728026f02f60cb17424
Exempt-From-Owner-Approval: cp from internal

3 years ago[automerger skipped] Merge "Merge Android R" am: 141c2027e2 -s ours
Xin Li [Fri, 11 Sep 2020 00:40:18 +0000 (00:40 +0000)]
[automerger skipped] Merge "Merge Android R" am: 141c2027e2 -s ours

am skip reason: Change-Id I477d2dfba05718c829fdb2099248a8baba1125ab with SHA-1 8743ef4ea6 is in history

Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1422563

Change-Id: I78dff452b759e863b082f44b76fb5ae9a83cb704

3 years agoMerge "Merge Android R"
Xin Li [Thu, 10 Sep 2020 17:22:31 +0000 (17:22 +0000)]
Merge "Merge Android R"

3 years agoMerge Android R
Xin Li [Thu, 10 Sep 2020 03:21:28 +0000 (20:21 -0700)]
Merge Android R

Bug: 168057903
Merged-In: I477d2dfba05718c829fdb2099248a8baba1125ab
Change-Id: Ib60b99425dc79ca4c5b23772f32036f4e17ad11f

3 years agoMerge "bench: Add inodeop_bench benchmark" am: e804806d79
Treehugger Robot [Wed, 9 Sep 2020 13:34:41 +0000 (13:34 +0000)]
Merge "bench: Add inodeop_bench benchmark" am: e804806d79

Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1421048

Change-Id: I477d2dfba05718c829fdb2099248a8baba1125ab

3 years agoMerge "bench: Add inodeop_bench benchmark"
Treehugger Robot [Wed, 9 Sep 2020 13:03:12 +0000 (13:03 +0000)]
Merge "bench: Add inodeop_bench benchmark"

3 years agobench: Add inodeop_bench benchmark
Stefano Duo [Mon, 7 Sep 2020 16:30:49 +0000 (16:30 +0000)]
bench: Add inodeop_bench benchmark

Add new benchmark capable of generating specific inode operations
workloads. Currently, it supports create, delete, move, hardlink and
symlink.

Test: Manual run on cuttlefish and physical device
Bug: 165903680
Signed-off-by: Stefano Duo <stefanoduo@google.com>
Change-Id: Ia47f259b7ccea5fe1665b272c3cbc9ec1bf2eb56

3 years agoMerge Android R (rvc-dev-plus-aosp-without-vendor@6692709)
Xin Li [Thu, 27 Aug 2020 17:17:42 +0000 (10:17 -0700)]
Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709)

Bug: 166295507
Merged-In: Id417587a550b0f4abf5a6a3e4b4535011b21f627
Change-Id: Ibb5e8cf5f36dad408cf047dd0498aba24249b695

3 years agoMerge "Add maco@ to vold OWNERS." am: 157a08bb92
Treehugger Robot [Tue, 11 Aug 2020 10:56:15 +0000 (10:56 +0000)]
Merge "Add maco@ to vold OWNERS." am: 157a08bb92

Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1396467

Change-Id: I0d0a8048465e190105f03dfe76fbf5c8393a4198

3 years agoMerge "Add maco@ to vold OWNERS."
Treehugger Robot [Tue, 11 Aug 2020 10:34:17 +0000 (10:34 +0000)]
Merge "Add maco@ to vold OWNERS."

3 years agoAdd maco@ to vold OWNERS.
Martijn Coenen [Tue, 11 Aug 2020 07:13:27 +0000 (09:13 +0200)]
Add maco@ to vold OWNERS.

Bug: N/A
Test: N/A
Change-Id: Ib00991eccbd33e719a64d55da932f7f2bfab7b71

3 years agoMerge "vold: use __ANDROID_API_Q__ instead of pre_gki_level" am: ee1a70c129
Eric Biggers [Mon, 10 Aug 2020 22:53:51 +0000 (22:53 +0000)]
Merge "vold: use __ANDROID_API_Q__ instead of pre_gki_level" am: ee1a70c129

Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1395128

Change-Id: Iacb41f3dba6c2a57943f766b749d87efe6f4e4b3

3 years agoMerge "vold: use __ANDROID_API_Q__ instead of pre_gki_level"
Eric Biggers [Mon, 10 Aug 2020 22:35:21 +0000 (22:35 +0000)]
Merge "vold: use __ANDROID_API_Q__ instead of pre_gki_level"

3 years agovold: use __ANDROID_API_Q__ instead of pre_gki_level
Eric Biggers [Mon, 10 Aug 2020 17:55:56 +0000 (10:55 -0700)]
vold: use __ANDROID_API_Q__ instead of pre_gki_level

The name "pre_gki_level" is causing some confusion because not all
devices launching with Android R are subject to the GKI requirement.
(See b/161563110#comment11.)  E.g., devices that use a 4.14-based kernel
are exempt from GKI.  However, the encryption requirements still apply.

Just use __ANDROID_API_Q__ directly instead.

No change in behavior.

Change-Id: Id02ae1140845ac1ae7cf78be4e57fe34da028abf

3 years agoMerge "EncryptInPlace: ensure that backup superblocks get encrypted" am: 213dbe30a1
Eric Biggers [Mon, 10 Aug 2020 18:04:57 +0000 (18:04 +0000)]
Merge "EncryptInPlace: ensure that backup superblocks get encrypted" am: 213dbe30a1

Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1385029

Change-Id: I29e6eab9571d4556883594049f4abc33d9ffa674

3 years agoMerge "EncryptInPlace: ensure that backup superblocks get encrypted"
Eric Biggers [Mon, 10 Aug 2020 17:52:39 +0000 (17:52 +0000)]
Merge "EncryptInPlace: ensure that backup superblocks get encrypted"

3 years agoEncryptInPlace: ensure that backup superblocks get encrypted
Will Shiu [Wed, 29 Jul 2020 09:03:17 +0000 (17:03 +0800)]
EncryptInPlace: ensure that backup superblocks get encrypted

Block groups with EXT4_BG_BLOCK_UNINIT still have backup superblocks
(and backup block group descriptors).  Fix EncryptInPlace to encrypt
these backup superblocks rather than leave them unencrypted.

Previously leaving the backup superblocks unencrypted didn't cause any
problems, but due to system/core commit 72abd7b246f7 ("Try to recover
corrupted ext4 /data with backup superblock") it is causing problems.

Bug: 162479411
Bug: 161871210
Change-Id: Ic090bf4e88193b289b04c5254ddf661ef40b037e

4 years agoMerge "vold: restore -D__ANDROID_DEBUGGABLE__" am: 5de675c93b am: bb92ff6591 am:...
Treehugger Robot [Fri, 17 Jul 2020 19:20:28 +0000 (19:20 +0000)]
Merge "vold: restore -D__ANDROID_DEBUGGABLE__" am: 5de675c93b am: bb92ff6591 am: dd8b695c61

Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1365586

Change-Id: I876aaf6bba933c964a3573d8053cc60829b3a5fa

4 years agoMerge "vold: restore -D__ANDROID_DEBUGGABLE__" am: 5de675c93b am: bb92ff6591
Treehugger Robot [Fri, 17 Jul 2020 19:02:45 +0000 (19:02 +0000)]
Merge "vold: restore -D__ANDROID_DEBUGGABLE__" am: 5de675c93b am: bb92ff6591

Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1365586

Change-Id: Id417587a550b0f4abf5a6a3e4b4535011b21f627

4 years agoMerge "vold: restore -D__ANDROID_DEBUGGABLE__" am: 5de675c93b
Treehugger Robot [Fri, 17 Jul 2020 18:38:05 +0000 (18:38 +0000)]
Merge "vold: restore -D__ANDROID_DEBUGGABLE__" am: 5de675c93b

Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1365586

Change-Id: Ibb6947f1fad7a31cf2a42c3604c76fcf45a7082a

4 years agoMerge "vold: restore -D__ANDROID_DEBUGGABLE__"
Treehugger Robot [Fri, 17 Jul 2020 18:24:51 +0000 (18:24 +0000)]
Merge "vold: restore -D__ANDROID_DEBUGGABLE__"

4 years agovold: restore -D__ANDROID_DEBUGGABLE__
Mark Salyzyn [Fri, 17 Jul 2020 15:17:50 +0000 (08:17 -0700)]
vold: restore -D__ANDROID_DEBUGGABLE__

Regression introduced by
commit 7ebcc2bcfde2cf6713e2975224034b06ba0943d8
("Revert "[Vold] Conditional dependency to ARC++ ObbVolume"")
errantly removed the product_variables support for
-D__ANDROID_DEBUGGABLE__ when built for userdebug builds.

Restore stanza.

Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 161454607
Test: adb-remount-test no longer reports a problem
Change-Id: Ia7e55d1174fa7fac2d934d4aac06d15e8be388af

4 years agoMerge "KeyUtil: use static local variable in isFsKeyringSupported()" am: 256b23b1c5...
Eric Biggers [Fri, 17 Jul 2020 02:03:01 +0000 (02:03 +0000)]
Merge "KeyUtil: use static local variable in isFsKeyringSupported()" am: 256b23b1c5 am: 350b5ae900 am: d0b2751e8f

Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1365220

Change-Id: Id61233aba34e8c67a2ab3860c4259eaeaefdab15

4 years agoMerge "vold: drop local fscrypt UAPI definitions" am: 47425d05a9 am: 83a3eecc03 am...
Eric Biggers [Fri, 17 Jul 2020 02:02:39 +0000 (02:02 +0000)]
Merge "vold: drop local fscrypt UAPI definitions" am: 47425d05a9 am: 83a3eecc03 am: 6b36554b38

Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1365221

Change-Id: I18cbddc92985f88d95dca71b05b9d07919134af9

4 years agoMerge "KeyUtil: use static local variable in isFsKeyringSupported()" am: 256b23b1c5...
Eric Biggers [Fri, 17 Jul 2020 01:50:24 +0000 (01:50 +0000)]
Merge "KeyUtil: use static local variable in isFsKeyringSupported()" am: 256b23b1c5 am: 350b5ae900

Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1365220

Change-Id: Ia7fca6e61c58317002271c8338bb01a12e8223a5

4 years agoMerge "vold: drop local fscrypt UAPI definitions" am: 47425d05a9 am: 83a3eecc03
Eric Biggers [Fri, 17 Jul 2020 01:50:07 +0000 (01:50 +0000)]
Merge "vold: drop local fscrypt UAPI definitions" am: 47425d05a9 am: 83a3eecc03

Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1365221

Change-Id: Iffa50e4c549469de6425134369e609856f1d7813

4 years agoMerge "KeyUtil: use static local variable in isFsKeyringSupported()" am: 256b23b1c5
Eric Biggers [Fri, 17 Jul 2020 01:38:51 +0000 (01:38 +0000)]
Merge "KeyUtil: use static local variable in isFsKeyringSupported()" am: 256b23b1c5

Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1365220

Change-Id: I94b778955b2ee5cd8c462050e94c39ce05c96179

4 years agoMerge "vold: drop local fscrypt UAPI definitions" am: 47425d05a9
Eric Biggers [Fri, 17 Jul 2020 01:38:44 +0000 (01:38 +0000)]
Merge "vold: drop local fscrypt UAPI definitions" am: 47425d05a9

Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1365221

Change-Id: If47e4ced3b37e44772d802fb8ebe2d9ad51c03e2

4 years agoMerge "KeyUtil: use static local variable in isFsKeyringSupported()"
Eric Biggers [Fri, 17 Jul 2020 01:20:43 +0000 (01:20 +0000)]
Merge "KeyUtil: use static local variable in isFsKeyringSupported()"

4 years agoMerge "vold: drop local fscrypt UAPI definitions"
Eric Biggers [Fri, 17 Jul 2020 01:19:39 +0000 (01:19 +0000)]
Merge "vold: drop local fscrypt UAPI definitions"

4 years agovold: drop local fscrypt UAPI definitions
Eric Biggers [Thu, 16 Jul 2020 23:31:00 +0000 (16:31 -0700)]
vold: drop local fscrypt UAPI definitions

Now that Bionic's copy of <linux/fscrypt.h> has been updated, there's no
need for vold to carry its own fscrypt_uapi.h.

Test: build
Change-Id: I61581ac74f7cf77bc8a835e64d96553a9d0c517a

4 years agoKeyUtil: use static local variable in isFsKeyringSupported()
Eric Biggers [Thu, 16 Jul 2020 21:29:59 +0000 (14:29 -0700)]
KeyUtil: use static local variable in isFsKeyringSupported()

Use C++'s built-in mechanism for one-time initialization rather than
implement it ourselves in a way that isn't thread-safe.

(It doesn't *actually* need to be thread-safe, since all callers of this
run under ACQUIRE_CRYPT_LOCK.  But that's not easy to verify.)

Test: booted Cuttlefish and checked log for the one-time message
      "Detected support for FS_IOC_ADD_ENCRYPTION_KEY"
Change-Id: I6ca5b143ca305fa95144e388efc9657e3507bf05

4 years agoMerge "vold: remove checkEncryption" am: 2d9777bfbf am: 15c0d3e5d0 am: 4cd238b900
Eric Biggers [Thu, 16 Jul 2020 21:16:12 +0000 (21:16 +0000)]
Merge "vold: remove checkEncryption" am: 2d9777bfbf am: 15c0d3e5d0 am: 4cd238b900

Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1363339

Change-Id: I862a51b219b0151c24d009921fa6cd509afa18b0

4 years agoMerge "vold: remove checkEncryption" am: 2d9777bfbf am: 15c0d3e5d0
Eric Biggers [Thu, 16 Jul 2020 21:00:33 +0000 (21:00 +0000)]
Merge "vold: remove checkEncryption" am: 2d9777bfbf am: 15c0d3e5d0

Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1363339

Change-Id: I23b9a01632b61a92896ae83e2152fa047dd85c48

4 years agoMerge "vold: remove checkEncryption" am: 2d9777bfbf
Eric Biggers [Thu, 16 Jul 2020 20:45:57 +0000 (20:45 +0000)]
Merge "vold: remove checkEncryption" am: 2d9777bfbf

Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1363339

Change-Id: I4ffa4a351292c18dce51247d926ffe7efdbd5bea

4 years agoMerge "vold: remove checkEncryption"
Eric Biggers [Thu, 16 Jul 2020 20:30:35 +0000 (20:30 +0000)]
Merge "vold: remove checkEncryption"

4 years agoMerge "Revert "[Vold] Conditional dependency to ARC++ ObbVolume"" am: 6e6fc6b8d3...
Treehugger Robot [Thu, 16 Jul 2020 12:16:19 +0000 (12:16 +0000)]
Merge "Revert "[Vold] Conditional dependency to ARC++ ObbVolume"" am: 6e6fc6b8d3 am: 11757842a3 am: 9afa4c65d8

Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1320919

Change-Id: Idf5736b15c3d1cd2d2dc994e7c5298605d45412a

4 years agoMerge "Revert "[Vold] Conditional dependency to ARC++ ObbVolume"" am: 6e6fc6b8d3...
Treehugger Robot [Thu, 16 Jul 2020 12:03:40 +0000 (12:03 +0000)]
Merge "Revert "[Vold] Conditional dependency to ARC++ ObbVolume"" am: 6e6fc6b8d3 am: 11757842a3

Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1320919

Change-Id: Iec0c1190443f1366a0f105bb3eba3967635ff544

4 years agoMerge "Revert "[Vold] Conditional dependency to ARC++ ObbVolume"" am: 6e6fc6b8d3
Treehugger Robot [Thu, 16 Jul 2020 11:51:01 +0000 (11:51 +0000)]
Merge "Revert "[Vold] Conditional dependency to ARC++ ObbVolume"" am: 6e6fc6b8d3

Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1320919

Change-Id: I6fb0ca30c54791549923099c1acf74667e06ae5b

4 years agoMerge "Revert "[Vold] Conditional dependency to ARC++ ObbVolume""
Treehugger Robot [Thu, 16 Jul 2020 11:04:04 +0000 (11:04 +0000)]
Merge "Revert "[Vold] Conditional dependency to ARC++ ObbVolume""

4 years agovold: remove checkEncryption
Eric Biggers [Wed, 15 Jul 2020 18:06:02 +0000 (11:06 -0700)]
vold: remove checkEncryption

The testing-only "checkEncryption" command has been replaced with
VtsKernelEncryptionTest [1].  In particular, the metadata encryption
documentation [2] no longer mentions checkEncryption but rather
recommends running VtsKernelEncryptionTest.  Also, checkEncryption
hasn't really been maintained, and it has some known bugs; it's unclear
that many people ever really used it.

So, just remove it.

[1] https://android.googlesource.com/platform/test/vts-testcase/kernel/+/refs/heads/master/encryption/
[2] https://source.android.com/security/encryption/metadata#tests

Bug: 155037012
Change-Id: I258829c60768fd11aafdf2faad956cecc1ae9826

4 years agoRevert "[Vold] Conditional dependency to ARC++ ObbVolume"
Satoshi Niwa [Mon, 1 Jun 2020 12:03:36 +0000 (21:03 +0900)]
Revert "[Vold] Conditional dependency to ARC++ ObbVolume"

This reverts commit aedae617fec702add64201534a2f514fa31c5965.

Reason for revert: ArcObbVolume is not needed by ARCVM R and above.

Bug: 157885448
Test: trybot
Change-Id: I16395ac8b6902cedea263f51e306b297d719043f

4 years agoMerge "[automerger skipped] vold: only allow emmc_optimized on eMMC storage am: 006ee...
Automerger Merge Worker [Wed, 8 Jul 2020 00:37:31 +0000 (00:37 +0000)]
Merge "[automerger skipped] vold: only allow emmc_optimized on eMMC storage am: 006eed8e3a -s ours am: 09b9cae24d -s ours" into rvc-d1-dev-plus-aosp

4 years ago[automerger skipped] vold: only allow emmc_optimized on eMMC storage am: 006eed8e3a...
Eric Biggers [Wed, 8 Jul 2020 00:37:22 +0000 (00:37 +0000)]
[automerger skipped] vold: only allow emmc_optimized on eMMC storage am: 006eed8e3a -s ours am: 09b9cae24d -s ours

am skip reason: Change-Id Ie27b80658db53b1a4207b3cbb4e309d05130812e with SHA-1 eb566d0a7c is in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/system/vold/+/12098822

Change-Id: I7d8f6f3fd29595721ee7dfbd7a2fcabf69bc041f

4 years ago[automerger skipped] vold: only allow emmc_optimized on eMMC storage am: 006eed8e3a...
Eric Biggers [Wed, 8 Jul 2020 00:37:21 +0000 (00:37 +0000)]
[automerger skipped] vold: only allow emmc_optimized on eMMC storage am: 006eed8e3a am: 65aa48c810 -s ours

am skip reason: Change-Id Ie27b80658db53b1a4207b3cbb4e309d05130812e with SHA-1 eb566d0a7c is in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/system/vold/+/12098822

Change-Id: Ifce40a4998e3fd5a116df5ed8b3ac3433eb6b83e

4 years agovold: only allow emmc_optimized on eMMC storage am: 006eed8e3a
Eric Biggers [Wed, 8 Jul 2020 00:23:19 +0000 (00:23 +0000)]
vold: only allow emmc_optimized on eMMC storage am: 006eed8e3a

Original change: https://googleplex-android-review.googlesource.com/c/platform/system/vold/+/12098822

Change-Id: Ib8656b4dbd8b39a594147aace686a3fcbd3bd0d4

4 years ago[automerger skipped] vold: only allow emmc_optimized on eMMC storage am: 006eed8e3a...
Eric Biggers [Wed, 8 Jul 2020 00:22:58 +0000 (00:22 +0000)]
[automerger skipped] vold: only allow emmc_optimized on eMMC storage am: 006eed8e3a -s ours

am skip reason: Change-Id Ie27b80658db53b1a4207b3cbb4e309d05130812e with SHA-1 eb566d0a7c is in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/system/vold/+/12098822

Change-Id: Id8c90f1833a171c12936a5f4aa2bf80574f5cb64

4 years agoMerge "vold: only allow emmc_optimized on eMMC storage" am: 428ae6e90a am: 7a1c4ccb96...
Eric Biggers [Tue, 7 Jul 2020 17:59:57 +0000 (17:59 +0000)]
Merge "vold: only allow emmc_optimized on eMMC storage" am: 428ae6e90a am: 7a1c4ccb96 am: 09f789e227

Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1356175

Change-Id: I277065540c289ff3a7633ebd7b0326da2da4e5a4

4 years agoMerge "vold: only allow emmc_optimized on eMMC storage" am: 428ae6e90a am: 7a1c4ccb96
Eric Biggers [Tue, 7 Jul 2020 17:37:34 +0000 (17:37 +0000)]
Merge "vold: only allow emmc_optimized on eMMC storage" am: 428ae6e90a am: 7a1c4ccb96

Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1356175

Change-Id: Ie124c2cec8e4235ae999463d5c03615880e0c01e

4 years agoMerge "vold: only allow emmc_optimized on eMMC storage" am: 428ae6e90a
Eric Biggers [Tue, 7 Jul 2020 17:24:35 +0000 (17:24 +0000)]
Merge "vold: only allow emmc_optimized on eMMC storage" am: 428ae6e90a

Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1356175

Change-Id: I95f471e6a2a96929b1ff854cac195b68e86309f3

4 years agovold: only allow emmc_optimized on eMMC storage
Eric Biggers [Mon, 6 Jul 2020 20:46:38 +0000 (13:46 -0700)]
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

4 years agoMerge "vold: only allow emmc_optimized on eMMC storage"
Eric Biggers [Tue, 7 Jul 2020 17:07:58 +0000 (17:07 +0000)]
Merge "vold: only allow emmc_optimized on eMMC storage"

4 years agovold: only allow emmc_optimized on eMMC storage
Eric Biggers [Mon, 6 Jul 2020 20:46:38 +0000 (13:46 -0700)]
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

4 years agoConfigure backing device max_ratio for FUSE filesystems. am: a485006ab1 am: bb8a543e43
Martijn Coenen [Tue, 30 Jun 2020 10:16:24 +0000 (10:16 +0000)]
Configure backing device max_ratio for FUSE filesystems. am: a485006ab1 am: bb8a543e43

Original change: https://googleplex-android-review.googlesource.com/c/platform/system/vold/+/12024019

Change-Id: I3ea6c81e33206ef2010af0d91456b0f78437c0ba