android_system_core/fs_mgr
Bowgo Tsai 95c966a859 fs_mgr_avb: refactors how vbmeta is loaded
Adds two classes FsManagerAvbhandle and FsManagerAvbVerifier to replace the
following functions or struct:

    - fs_mgr_load_vbmeta_images() -> FsManagerAvbhandle::Open()
    - fs_mgr_unload_vbmeta_images() -> deleted
    - fs_mgr_setup_avb() -> FsManagerAvbhandle::SetUpAvb()

    - androidboot_vbmeta -> FsManagerAvbVerifier
    - load_vbmeta_prop() -> FsManagerAvbVerifier::Create()
    - verify_vbmeta_images() -> FsManagerAvbVerifier::VerifyVbmetaImages()

And only invokes FsManagerAvbhandle::Open() when there is a fstab entry having
'avb' flag (need HASHTREE descriptor). fs_mgr_is_avb_used() can be
removed as it only checks system property "ro.boot.vbmeta.hash_alg" to
decide whether vbmeta needs to be loaded, which might not be accurate.

For example, there are only HASH descriptors in the verified chain but
no HASHTREE descriptors. In this case, the fs_mgr doesn't have to do
anything because it only takes care of HASHTREE descriptors.

Also adds a new class FsManagerAvbOps to provide the C++ binding
FsManagerAvbOps::AvbSlotVerify() for libavb->avb_slot_verify().

Bug: 33254008
Test: test AVB on bullhead
Change-Id: I8fe15ba01c277152630a2a5c1c5c7f25fbf34030
2017-04-13 18:28:53 +08:00
..
include fs_mgr: adding fs_mgr_get_slot_suffix() public API 2017-04-13 18:28:48 +08:00
.clang-format Fix-up coding style 2017-02-18 12:33:36 +08:00
Android.mk fs_mgr: make is_device_secure() work even in the absence of properties. 2017-02-27 12:46:18 -08:00
fs_mgr.cpp fs_mgr_avb: refactors how vbmeta is loaded 2017-04-13 18:28:53 +08:00
fs_mgr_avb.cpp fs_mgr_avb: refactors how vbmeta is loaded 2017-04-13 18:28:53 +08:00
fs_mgr_avb_ops.cpp fs_mgr_avb: refactors how vbmeta is loaded 2017-04-13 18:28:53 +08:00
fs_mgr_avb_ops.h fs_mgr_avb: refactors how vbmeta is loaded 2017-04-13 18:28:53 +08:00
fs_mgr_boot_config.cpp fs_mgr: change the log level in fs_mgr_get_boot_config() 2017-03-28 18:52:04 +08:00
fs_mgr_dm_ioctl.cpp Fix-up coding style 2017-02-18 12:33:36 +08:00
fs_mgr_format.cpp fs_mgr: Switch to LOG()/PLOG() defined in <android-base/logging.h> 2017-01-26 21:47:55 +08:00
fs_mgr_fstab.cpp fs_mgr: adding fs_mgr_get_slot_suffix() public API 2017-04-13 18:28:48 +08:00
fs_mgr_main.cpp fs_mgr: Switch to LOG()/PLOG() defined in <android-base/logging.h> 2017-01-26 21:47:55 +08:00
fs_mgr_priv.h fs_mgr: adding fs_mgr_get_slot_suffix() public API 2017-04-13 18:28:48 +08:00
fs_mgr_priv_avb.h fs_mgr_avb: refactors how vbmeta is loaded 2017-04-13 18:28:53 +08:00
fs_mgr_priv_boot_config.h early_mount: fs_mgr: move all fstab logic into fs_mgr 2017-02-23 16:48:43 -08:00
fs_mgr_priv_dm_ioctl.h Fix-up coding style 2017-02-18 12:33:36 +08:00
fs_mgr_priv_sha.h fs_mgr_avb: refactors how vbmeta is loaded 2017-04-13 18:28:53 +08:00
fs_mgr_slotselect.cpp fs_mgr: adding fs_mgr_get_slot_suffix() public API 2017-04-13 18:28:48 +08:00
fs_mgr_verity.cpp fs_mgr: remove private/android_filesystem_config.h 2017-03-20 14:30:48 -07:00