Commit graph

5 commits

Author SHA1 Message Date
Daniel Rosenberg
15f22bddfb Defer marking boot successful when checkpointing
This moves actually marking the slot as successful to a later point
so that on devices with checkpointing enabled we can still roll back to
the previous version if we fail to boot to the point that the checkpoint
is marked as successful.

Test: When taking an update on a checkpoint enabled device, it
      defers marking the slot as successful instead of directly
      marking it. Visible in logs.
Bug: 123260515

Change-Id: I7ed3595c1b0904ddbfe20d1cad4f69ecbf1ea351
2019-02-07 13:26:05 -08:00
Tianjie Xu
446b64b659 Refactor update_verifier into a class
The refactor separates out the parsing of care_map and the actual
verification of the partitions. Moreover, it skips the verification in case
of a format error in the care map.

Also, the parsing of care_map now uses the suffix of the file to
tell if it has the protobuf format or the plain text format.

Bug: 115740187
Test: unit test pass
Change-Id: I7aa32004db02af1deb7bfdc6f5bd7921eb7883e5
2018-09-20 15:10:52 -07:00
Tianjie Xu
7e520d24fe Add a python binary to generate the protobuf for care_map
This binary parses the legacy care_map text in the input file and writes
the generated protobuf message into the output file. For test purpose,
it also has a "--parse_proto" option to reverse the process and convert
a protobuf message file into plain text.

The build script will then call the binary to generate the care_map.txt
in the new format.

Bug: 77867897
Test: Run the binary to convert a care_map.txt, run update_verifier
Change-Id: I3ca65e19027404806132aa8d51e9bff766630c99
2018-08-16 15:09:32 -07:00
Tianjie Xu
4d9e62d8a0 Add proto3 support for care_map
Switching to the protobuf format helps to make the care_map more
extensible. As we have such plans in the future, add the support to
parse the protobuf message in the update_verifier.

Bug: 77867897
Test: unit tests pass, update_verifier successfully verifies a care_map.pb
Change-Id: I9fe83cb4dd3cc8d6fd0260f2a47338fe142d3938
2018-07-25 14:15:22 -07:00
Tao Bao
afb9fc29a2 update_verifier: Move to Soong.
Test: mmma -j bootable/recovery
Change-Id: I3a3574c89318304231c01f7633d32ece31df098c
2018-04-20 14:26:38 -07:00