Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit defe1cb5 authored by Bowgo Tsai's avatar Bowgo Tsai
Browse files

libfs_avb: support enable verity for a standalone partition

The following static function has been added into class AvbHandle to
support loading the AVB hashtree descriptor to enable dm-verity for
a FstabEntry.

  static AvbHashtreeResult SetUpStandaloneAvbHashtree(FstabEntry* fstab_entry);

Bug: 112103720
Bug: 117960205
Test: atest libfs_avb_test
Test: atest libfs_avb_internal_test
Test: Add /system/etc/system_other.avbpubkey, then add
      avb_key=/system/etc/system_other.avbpubkey into /system/etc/fstab.postinstall.
      factory reset, boot a device and checks that system_other is
      mounted with verity (see the serial log below)

Serial log:
-----------
init: [libfs_avb]Built verity table: '1 /dev/block/by-name/system_a
    /dev/block/by-name/system_a 4096 4096 8521
    8521 sha1 895ba03023a35172b393429fadad9ee228b39203
    3405d16fec2cd12ad9e6b36d3bc983e1e83b5e09 10 use_fec_from_device
    /dev/block/by-name/system_a fec_roots 2 fec_blocks 8589 fec_start 8589
    restart_on_corruption ignore_zero_blocks'

init: [libfs_mgr]superblock s_max_mnt_count:65535,/dev/block/dm-7

init: [libfs_mgr]__mount(source=/dev/block/dm-7,target=/postinstall,type=ext4)=0:
Success

Change-Id: Ie339a43ff9c6a7d170e12ef466df666b98ddec19
parent 47a4082f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment