summaryrefslogtreecommitdiffstats
path: root/recovery.cpp
diff options
context:
space:
mode:
authorTianjie Xu <xunchang@google.com>2016-10-19 00:33:23 +0200
committerTianjie Xu <xunchang@google.com>2016-10-19 00:33:23 +0200
commit81e54eddd4132895d70ab8b2307c693311799e05 (patch)
tree7487e2ea808f9702854bd95f5befefef55ef1c45 /recovery.cpp
parentMerge "Change StringValue to use std::string" am: 2b17b24ae5 am: 430b7ae469 (diff)
parentresolve merge conflicts of 6fba98c to stage-aosp-master (diff)
downloadandroid_bootable_recovery-81e54eddd4132895d70ab8b2307c693311799e05.tar
android_bootable_recovery-81e54eddd4132895d70ab8b2307c693311799e05.tar.gz
android_bootable_recovery-81e54eddd4132895d70ab8b2307c693311799e05.tar.bz2
android_bootable_recovery-81e54eddd4132895d70ab8b2307c693311799e05.tar.lz
android_bootable_recovery-81e54eddd4132895d70ab8b2307c693311799e05.tar.xz
android_bootable_recovery-81e54eddd4132895d70ab8b2307c693311799e05.tar.zst
android_bootable_recovery-81e54eddd4132895d70ab8b2307c693311799e05.zip
Diffstat (limited to 'recovery.cpp')
-rw-r--r--recovery.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/recovery.cpp b/recovery.cpp
index 3b1305e61..88c77d2f8 100644
--- a/recovery.cpp
+++ b/recovery.cpp
@@ -53,6 +53,7 @@
#include <private/android_logger.h> /* private pmsg functions */
#include <selinux/label.h>
#include <selinux/selinux.h>
+#include <ziparchive/zip_archive.h>
#include "adb_install.h"
#include "common.h"
@@ -63,8 +64,7 @@
#include "install.h"
#include "minadbd/minadbd.h"
#include "minui/minui.h"
-#include "minzip/DirUtil.h"
-#include "minzip/Zip.h"
+#include "otautil/DirUtil.h"
#include "roots.h"
#include "ui.h"
#include "screen_ui.h"
@@ -936,19 +936,19 @@ static bool check_wipe_package(size_t wipe_package_size) {
}
// Extract metadata
- ZipArchive zip;
- int err = mzOpenZipArchive(reinterpret_cast<unsigned char*>(&wipe_package[0]),
- wipe_package.size(), &zip);
+ ZipArchiveHandle zip;
+ int err = OpenArchiveFromMemory(reinterpret_cast<void*>(&wipe_package[0]),
+ wipe_package.size(), "wipe_package", &zip);
if (err != 0) {
- LOG(ERROR) << "Can't open wipe package";
+ LOG(ERROR) << "Can't open wipe package : " << ErrorCodeString(err);
return false;
}
std::string metadata;
if (!read_metadata_from_package(&zip, &metadata)) {
- mzCloseZipArchive(&zip);
+ CloseArchive(zip);
return false;
}
- mzCloseZipArchive(&zip);
+ CloseArchive(zip);
// Check metadata
std::vector<std::string> lines = android::base::Split(metadata, "\n");