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

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

fastboot: fix --disable-verifiation error message

There is an unclear error message if we run
`fastboot --disable-verification flash boot boot.img` on a
AVB-disabled device without a /vbmeta partition.

Error message:
  terminating with uncaught exception of type std::out_of_range: basic_string
  Aborted

This is because the buf->fd of the loaded boot.img is not reset,
before returning from function copy_boot_avb_footer().

Also reset some changes in copy_boot_avb_footer() from commit
If83f785e235569ee8ef0de2b37f11dbd2a9a71f4, to prevent the
unnecessary read of the boot vbmeta if no need to copy the
boot image avb footer.

Bug: 191903922
Test: `fastboot --disable-verification flash boot boot.img` on a device
      without /vbmeta and without setting BOARD_AVB_ENABLE to true.
Change-Id: If84f08f1b2e12c4c6ded5cafda2bd1d30e75c662
parent 6e3f64e7
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