c20c0c2cdd
With init parsing fstab fragments from kernel separately, the fs_mgr would completely miss the device tree entries. That leads to things like 'adb remount' to go through without warning for verity even if /system is verified. This happens because 'verity_update_state' completely misses the partitions passed to android through the device tree. solution is to teach fs_mgr about device tree fstab entries and add 2 new public APIs. 1. fs_mgr_read_fstab_dt() - reads device tree and returns fstab generated from it. 2. fs_mgr_read_fstab_default() - reads both device tree fstab and /fstab.{ro.hardware} and returns the combined table. This also reduces the hardcoded /fstab.{ro.hardware} occurence only to fs_mgr and for eveyone who wants to read the "default" fstab must be changed to call fs_mgr_read_fstab_default() instead. e.g. adb. b/27805372 Test: Angler was used since it has 2 early mounted partitions instead of one. 1 verified and 1 unverified. - Boot angler successfully without early mount - Boot angler successfully with /vendor early mount and test if 'adb remount' warns us about verity - Boot angler successfully with both /system and /vendor early mounted and ensure 'adb remount' warns us about verity. - check partitions.system.verified status after /system early mount ot ensure it is set to VERITY_MODE_DEFAULT. - 'adb disable-verity' with early mounted /system doesn't work due to missing changes in adb TODO: change adb to use the new fs_mgr_read_fstab_default() API Change-Id: I82038d87c7a44488e938acce2cc1082c08f6f73a Signed-off-by: Sandeep Patil <sspatil@google.com> |
||
---|---|---|
.. | ||
include | ||
.clang-format | ||
Android.mk | ||
fs_mgr.cpp | ||
fs_mgr_avb.cpp | ||
fs_mgr_avb_ops.cpp | ||
fs_mgr_avb_ops.h | ||
fs_mgr_boot_config.cpp | ||
fs_mgr_dm_ioctl.cpp | ||
fs_mgr_format.cpp | ||
fs_mgr_fstab.cpp | ||
fs_mgr_main.cpp | ||
fs_mgr_priv.h | ||
fs_mgr_priv_avb.h | ||
fs_mgr_priv_boot_config.h | ||
fs_mgr_priv_dm_ioctl.h | ||
fs_mgr_priv_sha.h | ||
fs_mgr_slotselect.cpp | ||
fs_mgr_verity.cpp |