aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTao Bao2017-04-10 18:55:57 -0500
committerTao Bao2017-04-13 00:46:09 -0500
commit1d866050eba7614109a1edec42529d4d80b0998f (patch)
tree36905d2bd8d5121a9ecb6d87996bc32fa480c009 /install.h
parent1b28a27c33e3f60fce661ddf4f2f0c5abefb63bc (diff)
downloadplatform-bootable-recovery-1d866050eba7614109a1edec42529d4d80b0998f.tar.gz
platform-bootable-recovery-1d866050eba7614109a1edec42529d4d80b0998f.tar.xz
platform-bootable-recovery-1d866050eba7614109a1edec42529d4d80b0998f.zip
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 62e0bc7586077b3bde82759fb34b51b982cea20f)
Diffstat (limited to 'install.h')
-rw-r--r--install.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/install.h b/install.h
index 1ec01e81..68f0a8d4 100644
--- a/install.h
+++ b/install.h
@@ -37,4 +37,8 @@ bool verify_package(const unsigned char* package_data, size_t package_size);
37// Return true if succeed, otherwise return false. 37// Return true if succeed, otherwise return false.
38bool read_metadata_from_package(ZipArchiveHandle zip, std::string* meta_data); 38bool read_metadata_from_package(ZipArchiveHandle zip, std::string* meta_data);
39 39
40// Verifes the compatibility info in a Treble-compatible package. Returns true directly if the
41// entry doesn't exist.
42bool verify_package_compatibility(ZipArchiveHandle package_zip);
43
40#endif // RECOVERY_INSTALL_H_ 44#endif // RECOVERY_INSTALL_H_