summaryrefslogtreecommitdiffstats
path: root/install.h
diff options
context:
space:
mode:
authorEthan Yonker <dees_troy@teamw.in>2017-12-14 21:43:59 +0100
committerEthan Yonker <dees_troy@teamw.in>2017-12-15 19:48:49 +0100
commitecbd3e8ba9d84eca9d4fdea9b24717364f81a668 (patch)
treed3027aeb161e13673416d1684e6f4e47c85241d0 /install.h
parentFix build error in AOSP 8.1.0 r1 tree (diff)
parentMerge cherrypicks of [3156476, 3155698, 3156194, 3156639, 3156018, 3156477, 3156098, 3156099, 3156100, 3156101, 3156102, 3158393, 3155699, 3155700, 3156195, 3156196, 3156019, 3156020, 3158394] into oc-mr1-release (diff)
downloadandroid_bootable_recovery-ecbd3e8ba9d84eca9d4fdea9b24717364f81a668.tar
android_bootable_recovery-ecbd3e8ba9d84eca9d4fdea9b24717364f81a668.tar.gz
android_bootable_recovery-ecbd3e8ba9d84eca9d4fdea9b24717364f81a668.tar.bz2
android_bootable_recovery-ecbd3e8ba9d84eca9d4fdea9b24717364f81a668.tar.lz
android_bootable_recovery-ecbd3e8ba9d84eca9d4fdea9b24717364f81a668.tar.xz
android_bootable_recovery-ecbd3e8ba9d84eca9d4fdea9b24717364f81a668.tar.zst
android_bootable_recovery-ecbd3e8ba9d84eca9d4fdea9b24717364f81a668.zip
Diffstat (limited to '')
-rw-r--r--install.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/install.h b/install.h
index fd68c3a42..f3fda3051 100644
--- a/install.h
+++ b/install.h
@@ -20,10 +20,12 @@
#include <string>
#include <ziparchive/zip_archive.h>
-// Install the package specified by root_path. If INSTALL_SUCCESS is
-// returned and *wipe_cache is true on exit, caller should wipe the
-// cache partition.
-int install_package(const char* root_path, bool* wipe_cache, const char* install_file,
+enum { INSTALL_SUCCESS, INSTALL_ERROR, INSTALL_CORRUPT, INSTALL_NONE, INSTALL_SKIPPED,
+ INSTALL_RETRY };
+
+// Installs the given update package. If INSTALL_SUCCESS is returned and *wipe_cache is true on
+// exit, caller should wipe the cache partition.
+int install_package(const std::string& package, bool* wipe_cache, const std::string& install_file,
bool needs_mount, int retry_count);
// Verify the package by ota keys. Return true if the package is verified successfully,
@@ -32,9 +34,9 @@ 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);
+bool read_metadata_from_package(ZipArchiveHandle zip, std::string* metadata);
-// Verifes the compatibility info in a Treble-compatible package. Returns true directly if the
+// Verifies the compatibility info in a Treble-compatible package. Returns true directly if the
// entry doesn't exist.
bool verify_package_compatibility(ZipArchiveHandle package_zip);