Verify the package compatibility with libvintf.

verify_package_compatibility() is added to parse the compatibility entry
(compatibility.zip) in a given OTA package. If entry is present, the
information is sent to libvintf to check the compatibility.

This CL doesn't actually call libvintf, since the API there is not
available yet.

Bug: 36597505
Test: Doesn't break the install with existing packages (i.e. w/o the
      compatibility entry).
Test: recovery_component_test
Change-Id: I3903ffa5f6ba33a5c0d761602ade6290c6752596
(cherry picked from commit 62e0bc7586)
This commit is contained in:
Tao Bao
2017-04-10 16:55:57 -07:00
parent 1b28a27c33
commit 1d866050eb
6 changed files with 159 additions and 5 deletions
+2 -1
View File
@@ -22,7 +22,8 @@ enum ErrorCode {
kLowBattery = 20,
kZipVerificationFailure,
kZipOpenFailure,
kBootreasonInBlacklist
kBootreasonInBlacklist,
kPackageCompatibilityFailure,
};
enum CauseCode {