Commit Graph

459 Commits

Author SHA1 Message Date
Bowgo Tsai 8301fcfcf5 Merge "first stage mount: removing the requirement of by-name prefix for AVB" am: cdad92fdad am: c82235ebbd am: fec0b13902
am: acef4a9a09

Change-Id: I51e8a7df3db76a7cd626ee2ad2960abc5ec2256d
2017-05-10 03:20:12 +00:00
Bowgo Tsai acef4a9a09 Merge "first stage mount: removing the requirement of by-name prefix for AVB" am: cdad92fdad am: c82235ebbd
am: fec0b13902

Change-Id: I7dec7f517b5b1c601b4372a431789aba1375fbee
2017-05-10 02:11:06 +00:00
Treehugger Robot cdad92fdad Merge "first stage mount: removing the requirement of by-name prefix for AVB" 2017-05-10 01:37:28 +00:00
Bowgo Tsai 20651f62d0 first stage mount: removing the requirement of by-name prefix for AVB
Current first stage mount for AVB requires specifying a common prefix of
by-name symlink for all AVB partitions. It limits all AVB partitions to be on
the same block device.

firmware {
    android {
        compatible = "android,firmware";
        vbmeta {
            compatible = "android,vbmeta";
            parts = "vbmeta,boot,system,vendor";
            by_name_prefix="/dev/block/platform/soc.0/f9824900.sdhci/by-name"  <-- *removing this*
        };
        fstab {
            compatible = "android,fstab";
            vendor {
                compatible = "android,vendor";
                dev = "/dev/block/platform/soc.0/f9824900.sdhci/by-name/vendor";
                type = "ext4";
                mnt_flags = "ro,barrier=1,inode_readahead_blks=8";
                fsmgr_flags = "wait,avb";
            };
        };
    };
};

For normal mount with AVB, it extracts the by-name prefix of /misc
partition and use it as the prefix for all other partitions:
    - /dev/block/platform/soc.0/f9824900.sdhci/by-name/misc ->
    - /dev/block/platform/soc.0/f9824900.sdhci/by-name/vendor_a

Fix this by adding an internal map in FsManagerAvbOps to record the mapping
from partition name to its by-name symlink:

    ByNameSymlinkMap["vendor_a"] = "/dev/block/platform/soc.0/f9824900.sdhci/by-name/vendor_a"

Two overloaded factory methods are then provided for FsManagerAvbUniquePtr:
    - FsManagerAvbUniquePtr Open(ByNameSymlinkMap&& by_name_symlink_map):
      for first stage mount, where the by-name symlink map will be
      constructed externally, from the uevents processed by init, before
      invoking this factory method.

    - FsManagerAvbUniquePtr Open(const fstab& fstab): for normal mount,
      where the by-name symlink map will be constructed from the input fstab
      internally.

Bug: 37552224
Test: first stage mount /vendor with vboot 1.0
Test: first stage mount /vendor with vboot 2.0 (AVB)
Test: normal mount /vendor with vboot 2.0 (AVB)
Change-Id: Id17e8566da87ea22b8923fcd6e47db8d45bc7d6a
2017-05-09 11:03:49 +08:00
Bowgo Tsai edba521fed Merge "fs_mgr_verity: fix androidboot.veritymode=enforcing doesn't work" am: 6019991c6e am: 4dd17998ed am: d6576491fe
am: 18e92c342a

Change-Id: I7c81797ad4684b6e23350694b84525c12d5cf958
2017-05-08 15:41:16 +00:00
Bowgo Tsai 18e92c342a Merge "fs_mgr_verity: fix androidboot.veritymode=enforcing doesn't work" am: 6019991c6e am: 4dd17998ed
am: d6576491fe

Change-Id: Id86ee7f84251e4fd4884dae7fab5677bed2c0501
2017-05-08 15:37:45 +00:00
Bowgo Tsai 77cbfd6341 fs_mgr_verity: fix androidboot.veritymode=enforcing doesn't work
Should set verity mode to VERITY_MODE_DEFAULT when
androidboot.veritymode=enforcing.

Bug: 38103331
Test: `adb shell getprop partition.system.verified` returns 2 when veritymode=enforcing
Test: `adb shell getprop partition.vendor.verified` returns 2 when veritymode=enforcing
Change-Id: I2f34eb6509f91989ce726e540cf2c0d353347ede
2017-05-08 17:22:52 +08:00
Thierry Strudel 24e0e03f9c Merge "fs_mgr_avb: allow verification error when the device is unlocked" am: 7245ab6a11 am: 140d1f51a1 am: 5e953b0397
am: cd0ece0752

Change-Id: Ie57e55897a81cefa0dd47668ad91d831ef3d4b5e
2017-05-05 17:12:54 +00:00
Thierry Strudel cd0ece0752 Merge "fs_mgr_avb: allow verification error when the device is unlocked" am: 7245ab6a11 am: 140d1f51a1
am: 5e953b0397

Change-Id: I50144f63c2f1b7c517f5cc7d9ac0d8b437f5848d
2017-05-05 16:51:21 +00:00
Bowgo Tsai 1140954877 fs_mgr_avb: allow verification error when the device is unlocked
Current AVB flow in fs_mgr doesn't allow verification error even if the
device is unlocked. This makes first stage mount fail when the device
is flashed with a different-sized boot.img because there is verification
error (HASH_MISMATCH) for the boot partition.

Fix this by allowing verification error only when the device is
unlocked. Whether to enable dm-verity for HASHTREE partitions is still
controlled by the HASHTREE_DISABLED flag in the top-level vbmeta.

Bug: 37985430
Test: First stage mount /vendor with AVB on a device.
      Check dm-verity is enabled on /vendor.
Test: Unlock device, flash a different-sized boot.img. Boot device and check
      dm-verity is still enabled on /vendor.
Test: First stage mount /vendor with AVB on a device with HASHTREE_DISABLED
      is set on the top-level vbmeta, check dm-verity is not enable on /vendor.

Change-Id: I709431bc1c37e4f86133d171cee8e90621cdb857
2017-05-05 22:36:40 +08:00
Keun-young Park eb73fcdcb8 Merge "use passed blk dev name for quota / super block check" am: 7b706c5b9e am: 2f3718c472 am: d31f3a0e9b
am: f7aacf81fa

Change-Id: Ib818fb98b6c01ef041cf6339c590b3f3185553ca
2017-05-05 03:50:20 +00:00
Keun-young Park f7aacf81fa Merge "use passed blk dev name for quota / super block check" am: 7b706c5b9e am: 2f3718c472
am: d31f3a0e9b

Change-Id: I0031690605466dcf7600c162565be5f6d6fd44cf
2017-05-05 03:47:34 +00:00
Keun-young Park 9519688411 use passed blk dev name for quota / super block check
- It was using blk dev name from fstab and quota / super block check was always
  failing for FDE

bug: 37913441
Test: reboot and confirm quota
Change-Id: I8a9e890ef2787f2959e6a0225c6b21d35602f19e
2017-05-04 18:31:06 -07:00
David Zeuthen 6019363ccf Merge "fs_mgr: Clear AvbOps struct." am: 6ea4f213d8 am: 983d542d49 am: 86da4a42e8
am: 91a0f9e970

Change-Id: Ib243c4ad35eb104370b76f4308c3feee1682353a
2017-05-02 16:06:46 +00:00
David Zeuthen 91a0f9e970 Merge "fs_mgr: Clear AvbOps struct." am: 6ea4f213d8 am: 983d542d49
am: 86da4a42e8

Change-Id: I3ef678bce70cca718fdb9be28f570b58f1da8f40
2017-05-02 13:44:21 +00:00
David Zeuthen 16c6fd1da7 fs_mgr: Clear AvbOps struct.
This ensures that future operations (e.g. function pointers in the
AvbOps struct) added to AvbOps are set to NULL.

Bug: 37709309
Test: Manually tested on UEFI-based bootloader.
Change-Id: If83ea57b7abad94e472768c594efa210e3351a4d
2017-05-01 13:25:20 -04:00
Bowgo Tsai 7fe58ba5b6 Merge "fs_mgr: code clean up" am: 0914d2bdff am: 0bb2ebbe74 am: f7cc23bf3a
am: 1bd2d1c3a5

Change-Id: Id37b33ccb4f5127bd0e5b16bff2c79a1819623ed
2017-04-29 03:37:02 +00:00
Bowgo Tsai 1bd2d1c3a5 Merge "fs_mgr: code clean up" am: 0914d2bdff am: 0bb2ebbe74
am: f7cc23bf3a

Change-Id: I553d18ef489e067eca013d460efc842daa8a50f2
2017-04-29 03:35:31 +00:00
Treehugger Robot 0914d2bdff Merge "fs_mgr: code clean up" 2017-04-29 03:21:33 +00:00
Bowgo Tsai 359bed3615 fs_mgr: code clean up
- Returns FS_MGR_MNTALL_FAIL for failure paths in fs_mgr_mount_all()
- Removes the 'goto out' in fs_mgr_do_mount() as there is nothing to do in
  the 'out' label now. Also removes the "ret = FS_MGR_DOMNT_FAILED;" and
  just return FS_MGR_DOMNT_FAILED directly for the default failure path.
- Changes some LERROR to PERROR

Test: Use fs_mgr_do_mount() to mount /system with AVB
Change-Id: I126a0124a5c9d61302f40ab9db16989500d9777e
2017-04-28 12:47:18 +08:00
Bowgo Tsai 92e5f2d912 Merge "fs_mgr: set "partition.system.verified" when AVB is used in a A/B device" am: 5c7543569a am: b66306c7c1 am: 50f7d4a1ab
am: 5547de8f8e

Change-Id: I86c4cf36fd6390a4af111d59f58327c801c4c267
2017-04-28 03:37:28 +00:00
Bowgo Tsai 5547de8f8e Merge "fs_mgr: set "partition.system.verified" when AVB is used in a A/B device" am: 5c7543569a am: b66306c7c1
am: 50f7d4a1ab

Change-Id: I9afed4e5551a4403696e6635127667e45a031635
2017-04-28 03:34:46 +00:00
Bowgo Tsai 48fdc292f9 fs_mgr: set "partition.system.verified" when AVB is used in a A/B device
In a A/B device, system partition is mounted by kernel as root.
In vboot 1.0, the dm device name of system partition is "system" with
the following configuration in kernel command line:
    - dm="system none ro,0 1 android-verity /dev/sda34"

In AVB, the dm device name is switched to vroot as:
    - dm="1 vroot none ro 1,0 5201456 verity 1 ..."

When sending ioctl DM_TABLE_STATUS to query status, we should use "vroot" as the
dm device name for AVB. But still pass "system" for the callback function to set
property [partition.system.verified] instead of [partition.vroot.verified].

Bug: 36900078
Test: Use AVB to mount system in a A/B device, checks the property exists
      [partition.system.verified]
Test: Use vboot 1.0 to mount system in a A/B device, checks the property exists
      [partition.system.verified]
Test: Checks 'adb remount' will output warning message:
        - dm_verity is enabled on the system and vendor partitions.
        - Use "adb disable-verity" to disable verity.

Change-Id: Iaee7eb2b00b03729bc07fa24f1b449488716d2ea
2017-04-27 18:58:29 +08:00
TreeHugger Robot 95154312c0 Merge "Support metadata encryption" 2017-04-21 23:17:21 +00:00
Paul Lawrence 9dbe97b4d5 Support metadata encryption
Bug: 29189559
Test: Angler, Marlin build and boot
Change-Id: Ia7b070781f5f16ff8bfd934569a2209c80c28385
2017-04-21 14:26:00 -07:00
Sandeep Patil 3b15a40c2e Merge "fs_mgr: remove the repetitive and annoying bootconfig error print" am: 515e7a4fc4 am: d1078c42ce
am: dba5e13593

Change-Id: Ibb02e12de4a525f3d7a412db96eaa0feb777fb10
2017-04-21 16:48:56 +00:00
Sandeep Patil 73fbf0ee16 fs_mgr: remove the repetitive and annoying bootconfig error print
The new changes to slotselect() call makes it try to find the
"slot" config before trying "slot_suffix" and that causes fs_mgr to
print the needless error and spam the kernel logs for no reason.
Remove the print.

Test: Builds for sailfish

Change-Id: I020575d70f4cd6e137e82c127b5d5234d709d0e3
Signed-off-by: Sandeep Patil <sspatil@google.com>
2017-04-20 14:41:23 -07:00
Keun-young Park 4ba7f8e005 Merge "run e2fsck -f selectively with mount retry" am: 380a3bb4c2 am: 3794d11454
am: 7536c043fc

Change-Id: Ia9a79422b465c3a20134be1029824ef12bbb4c4c
2017-04-19 17:19:53 +00:00
Keun-young Park 40db04d640 run e2fsck -f selectively with mount retry
- Do not use -f if it was cleanly shutdown.
- For unclean shutdown or other operation failures like
  mount, tune2fs failure, run full check.
- Still old image will run full check once in 5 reboots
  while new image will not run full check unless something
  fails.
- Add retry for final mount. If mount fails once, run full fsck
  once and try again.

bug: 32246772
bug: 35366616
Test: many reboots
Change-Id: I86949732ffe1955636ac179d553c91e52910f73e
2017-04-18 19:28:55 -07:00
Steven Moreland fc5d4345fa Merge "libcutils: compile with BOARD_VNDK_VERSION current" into oc-dev
am: 64639fd7dc

Change-Id: Ic30e207a89cf80f6f509f64f92ec9ee32cfaf3c1
2017-04-17 23:19:28 +00:00
Steven Moreland d73be1b96b libcutils: compile with BOARD_VNDK_VERSION current
- moved __android_log_is_debuggable to a new public header
    (log_properties.h)
- vendor version of sched_policy uses ALOG* instead SLOG*

Test: (sanity) liblog-unit-tests
Test: (sanity) libcutils_test (noting b/b/32972117, two tests continue
  to fail)
Test: system/core as a whole makes with BOARD_VNDK_VERSION := current
  now with no problems.
Test: boots/works on internal marlin
Bug: 33241851

(cherry picked from commit 1f83aa424f)

Merged-In: I5bc1f348dc0f0c8814bec5b5c3d2c52c825ab640
Change-Id: I5bc1f348dc0f0c8814bec5b5c3d2c52c825ab640
2017-04-17 14:44:17 -07:00
Steven Moreland 1f83aa424f libcutils: compile with BOARD_VNDK_VERSION current
- moved __android_log_is_debuggable to a new public header
    (log_properties.h)
- vendor version of sched_policy uses ALOG* instead SLOG*

Test: (sanity) liblog-unit-tests
Test: (sanity) libcutils_test (noting b/b/32972117, two tests continue
  to fail)
Test: system/core as a whole makes with BOARD_VNDK_VERSION := current
  now with no problems.
Test: boots/works on internal marlin
Bug: 33241851

Change-Id: I5bc1f348dc0f0c8814bec5b5c3d2c52c825ab640
2017-04-17 12:18:36 -07:00
Keun-young Park 421067e040 Merge "check ext4 magic before running next steps" into oc-dev 2017-04-17 19:03:57 +00:00
Bowgo Tsai 6e69b2ea2a Merge "Set libavb version into system property for Treble OTA" am: e8311491da am: 7b08869382
am: 6f3ec3d759

Change-Id: I2c97b605e75c479e485ac36e1e90c039467df04e
2017-04-15 06:07:10 +00:00
Bowgo Tsai 1a898c25f9 Set libavb version into system property for Treble OTA
Set ro.boot.avb_version to "AVB_VERSION_MAJOR.AVB_VERSION_MINOR".
During Treble OTA match, the major version must be the same as that in
the avb metadata on disk, while the minor version can be equal or
greater to that in the avb metadata on disk.

See how avb versioning work on the following link:

  https://android-review.googlesource.com/#/c/342757/

Also renames AvbHashtreeDisabled() -> hashtree_disabled().

Bug: 35322304
Test: Early mount with AVB, checks [ro.boot.avb_version]: [1.0] exists.
Test: Not enable AVB, checks [ro.boot.avb_version] doesn't exists.

Change-Id: I5aaf476ca53c4fe817779518ba14b68ebcfdc6d6
2017-04-15 09:47:31 +08:00
Keun-young Park ab389288ad Merge "check ext4 magic before running next steps" am: 82bd278dc4 am: 9183d0701d
am: 8a8ac86cf6

Change-Id: I98e37f994cf08f92cada289f64dda9530c64b4f3
2017-04-15 00:35:39 +00:00
Keun-young Park 835239a2c2 check ext4 magic before running next steps
- mount, e2fsck, tune2fs will all fail if magic number does not match.
- mismatch always happen for FDE and is wasting boot-up time to try
  all and fail always.
- skip mount steps if it has invalid magic number and do not record
  fs_stat either.
- For ext4 fs with corrupt superblock, e2fsck refuses to do anything if
  superblock magic is invalid. So simply running e2fsck does not help
  anyway.

bug: 36231950
Test: reboot ane check fs_mgr log from dmesg

(cherry picked from commit 6000a3f657)

Change-Id: Ia7120a188c316262da5fdb986c7d9c76db86aa7b
2017-04-14 17:33:25 -07:00
Keun-young Park 82bd278dc4 Merge "check ext4 magic before running next steps" 2017-04-15 00:26:32 +00:00
Bowgo Tsai 92ca58b5bd fs_mgr: support AVB in fs_mgr_update_verity_state()
fs_mgr_update_verity_state() is invoked by 'verity_update_state' in
init.rc. It will then set property "partition.system.verified" and
"partition.vendor.verified" to verify_mode. We should support this for
AVB as well.

Also change the order of static libs in init to fix the build error
after this change:
  system/extras/ext4_utils/ext4_crypt.cpp:69: error: undefined reference to 'property_get'

Bug: 35416769
Test: Mount /system and /vendor with vboot 2.0 (AVB), check the following properties exist.
      - [partition.system.verified]: [2]
      - [partition.vendor.verified]: [2]
Test: Mount /system and /vendor with vboot 1.0, check the following properties exist.
      - [partition.system.verified]: [0]
      - [partition.vendor.verified]: [0]

Change-Id: I4328d66a8cb93f26e7960e620a0b2292d5f15900
Merged-In: I4328d66a8cb93f26e7960e620a0b2292d5f15900
(cherry picked from commit aaf70e77dc)
2017-04-14 21:53:49 +08:00
Bowgo Tsai a01f2f68ec fs_mgr: adds/changes some public APIs for early mount in init
Several changes in this CL:
  - Moves class FsManagerAvbHandle to public API
  - Adds a parameter 'wait_for_verity_dev' for FsManagerAvbHandle::SetUpAvb()
    to allow not to wait for verity device gets created
  - Adds FsManagerAvbHandle::AvbHashtreeDisabled() to query whether AVB is disabled
  - Adds fs_mgr_is_avb() to query whether a fstab_rec has MF_AVB flag

Bug: 33254008
Test: test AVB on bullhead
Change-Id: I89c43ca574ae632db8a700fc2590a1f80212c993
Merged-In: I89c43ca574ae632db8a700fc2590a1f80212c993
(cherry picked from commit 80d1ad17ed)
2017-04-14 21:51:26 +08:00
Bowgo Tsai 4ae3e510b3 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
Merged-In: I8fe15ba01c277152630a2a5c1c5c7f25fbf34030
(cherry picked from commit 95c966a859)
2017-04-14 21:50:55 +08:00
Bowgo Tsai c1f9cbaf8d fs_mgr: adding fs_mgr_get_slot_suffix() public API
The function returns "_a" or "_b" based on two possible values in
kernel cmdline:

  - androidboot.slot = a or b OR
  - androidboot.slot_suffix = _a or _b

Bug: 33254008
Bug: 36533366
Test: boot sailfish
Change-Id: Ia0a524e4145ebf61af5821f42ecad212c95ed748
Merged-In: Ia0a524e4145ebf61af5821f42ecad212c95ed748
(cherry picked from commit 87d0836cda)
2017-04-14 21:49:33 +08:00
Bowgo Tsai 4d70aa5541 Merge changes from topic 'avb-early-mount' am: d7381375bb am: 04989a7a4b
am: 0b2d83a64b

Change-Id: I3911b1be010b7f79f2b3975a9264eb914044392f
2017-04-14 06:40:58 +00:00
Bowgo Tsai aaf70e77dc fs_mgr: support AVB in fs_mgr_update_verity_state()
fs_mgr_update_verity_state() is invoked by 'verity_update_state' in
init.rc. It will then set property "partition.system.verified" and
"partition.vendor.verified" to verify_mode. We should support this for
AVB as well.

Also change the order of static libs in init to fix the build error
after this change:
  system/extras/ext4_utils/ext4_crypt.cpp:69: error: undefined reference to 'property_get'

Bug: 35416769
Test: Mount /system and /vendor with vboot 2.0 (AVB), check the following properties exist.
      - [partition.system.verified]: [2]
      - [partition.vendor.verified]: [2]
Test: Mount /system and /vendor with vboot 1.0, check the following properties exist.
      - [partition.system.verified]: [0]
      - [partition.vendor.verified]: [0]

Change-Id: I4328d66a8cb93f26e7960e620a0b2292d5f15900
2017-04-14 12:10:49 +08:00
Bowgo Tsai 9ec99028d2 Merge "fs_mgr: adds/changes some public APIs for early mount in init" am: d9b45c5811 am: 951427906d
am: 947210be92

Change-Id: I377a388beaa8816b322d10e8fc033d702ba61397
2017-04-14 00:31:25 +00:00
Keun-young Park 6000a3f657 check ext4 magic before running next steps
- mount, e2fsck, tune2fs will all fail if magic number does not match.
- mismatch always happen for FDE and is wasting boot-up time to try
  all and fail always.
- skip mount steps if it has invalid magic number and do not record
  fs_stat either.
- For ext4 fs with corrupt superblock, e2fsck refuses to do anything if
  superblock magic is invalid. So simply running e2fsck does not help
  anyway.

bug: 36231950
Test: reboot ane check fs_mgr log from dmesg
Change-Id: I9ad9e0cd30fd074b3bbf8f450bd401b133d5771a
2017-04-13 17:11:11 -07:00
Bowgo Tsai 40ead9f41c Merge "fs_mgr_avb: refactors how vbmeta is loaded" am: fc500ddb52 am: a6db40c7cd
am: 0265f55b44

Change-Id: I4389b2d95fe1a7216e36422359311f23d6a0e768
2017-04-13 20:21:11 +00:00
Keun-young Park 1c438c1baa use s_max_mnt_count to detect mke2fs generated partition
- Old tool will set it to 10 while mke2fs will set it to -1.
- For now, only tag it.
- TODO: possibly add different policy per image tool version.

bug: 32246772
Test: check dmesg after reboot

(cherry picked from commit 95e233f9ff)

Change-Id: Icd4758e240009d7b37df2d8a0e2a20d5ddbe4906
2017-04-13 11:32:53 -07:00
Bowgo Tsai 08d996678c Merge "fs_mgr: adding fs_mgr_get_slot_suffix() public API" am: b26f48f135 am: 4c96971cee
am: e203dbb2f6

Change-Id: Icca6f2dac8c9bef0d3b1d0d2202371f3e101be19
2017-04-13 13:56:54 +00:00
Bowgo Tsai 80d1ad17ed fs_mgr: adds/changes some public APIs for early mount in init
Several changes in this CL:
  - Moves class FsManagerAvbHandle to public API
  - Adds a parameter 'wait_for_verity_dev' for FsManagerAvbHandle::SetUpAvb()
    to allow not to wait for verity device gets created
  - Adds FsManagerAvbHandle::AvbHashtreeDisabled() to query whether AVB is disabled
  - Adds fs_mgr_is_avb() to query whether a fstab_rec has MF_AVB flag

Bug: 33254008
Test: test AVB on bullhead
Change-Id: I89c43ca574ae632db8a700fc2590a1f80212c993
2017-04-13 18:29:10 +08:00