summaryrefslogtreecommitdiffstats
path: root/install.h
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2016-10-19 21:15:06 +0200
committerGerrit Code Review <noreply-gerritcodereview@google.com>2016-10-19 21:15:06 +0200
commitfd796317c309a9c2423d6de1b0c87d1004efbec4 (patch)
tree53388e66db91793598030067dea27790a7f2c0de /install.h
parentMerge "Add a unit test for applypatch_check" (diff)
parentVerify wipe package when wiping A/B device in recovery. (diff)
downloadandroid_bootable_recovery-fd796317c309a9c2423d6de1b0c87d1004efbec4.tar
android_bootable_recovery-fd796317c309a9c2423d6de1b0c87d1004efbec4.tar.gz
android_bootable_recovery-fd796317c309a9c2423d6de1b0c87d1004efbec4.tar.bz2
android_bootable_recovery-fd796317c309a9c2423d6de1b0c87d1004efbec4.tar.lz
android_bootable_recovery-fd796317c309a9c2423d6de1b0c87d1004efbec4.tar.xz
android_bootable_recovery-fd796317c309a9c2423d6de1b0c87d1004efbec4.tar.zst
android_bootable_recovery-fd796317c309a9c2423d6de1b0c87d1004efbec4.zip
Diffstat (limited to 'install.h')
-rw-r--r--install.h17
1 files changed, 10 insertions, 7 deletions
diff --git a/install.h b/install.h
index 66764f542..7f66a51ca 100644
--- a/install.h
+++ b/install.h
@@ -17,11 +17,10 @@
#ifndef RECOVERY_INSTALL_H_
#define RECOVERY_INSTALL_H_
-#include "common.h"
+#include <string>
+#include <ziparchive/zip_archive.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
+#include "common.h"
enum { INSTALL_SUCCESS, INSTALL_ERROR, INSTALL_CORRUPT, INSTALL_NONE, INSTALL_SKIPPED,
INSTALL_RETRY };
@@ -31,8 +30,12 @@ enum { INSTALL_SUCCESS, INSTALL_ERROR, INSTALL_CORRUPT, INSTALL_NONE, INSTALL_SK
int install_package(const char* root_path, bool* wipe_cache, const char* install_file,
bool needs_mount, int retry_count);
-#ifdef __cplusplus
-}
-#endif
+// Verify the package by ota keys. Return true if the package is verified successfully,
+// otherwise return false.
+bool verify_package(const unsigned char* package_data, size_t package_size);
+
+// Read meta data file of the package, write its content in the string pointed by meta_data.
+// Return true if succeed, otherwise return false.
+bool read_metadata_from_package(ZipArchiveHandle zip, std::string* meta_data);
#endif // RECOVERY_INSTALL_H_