summaryrefslogtreecommitdiffstats
path: root/install.h
diff options
context:
space:
mode:
authorYabin Cui <yabinc@google.com>2016-06-21 20:00:44 +0200
committerYabin Cui <yabinc@google.com>2016-06-21 20:09:38 +0200
commitbf049bffe2ea70e788e5c54ca307839232eb2f5d (patch)
treefc7c54a8c23f5849d29d11ffa09c3e641997dc02 /install.h
parentMerge \\"Import translations. DO NOT MERGE\\" into stage-aosp-master am: 2c709ccef9 -s ours (diff)
parentMerge "Verify wipe package when wiping A/B device in recovery." into nyc-mr1-dev (diff)
downloadandroid_bootable_recovery-bf049bffe2ea70e788e5c54ca307839232eb2f5d.tar
android_bootable_recovery-bf049bffe2ea70e788e5c54ca307839232eb2f5d.tar.gz
android_bootable_recovery-bf049bffe2ea70e788e5c54ca307839232eb2f5d.tar.bz2
android_bootable_recovery-bf049bffe2ea70e788e5c54ca307839232eb2f5d.tar.lz
android_bootable_recovery-bf049bffe2ea70e788e5c54ca307839232eb2f5d.tar.xz
android_bootable_recovery-bf049bffe2ea70e788e5c54ca307839232eb2f5d.tar.zst
android_bootable_recovery-bf049bffe2ea70e788e5c54ca307839232eb2f5d.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..14de22556 100644
--- a/install.h
+++ b/install.h
@@ -17,11 +17,10 @@
#ifndef RECOVERY_INSTALL_H_
#define RECOVERY_INSTALL_H_
-#include "common.h"
+#include <string>
-#ifdef __cplusplus
-extern "C" {
-#endif
+#include "common.h"
+#include "minzip/Zip.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(ZipArchive* zip, std::string* meta_data);
#endif // RECOVERY_INSTALL_H_