summaryrefslogtreecommitdiffstats
path: root/recovery.cpp
diff options
context:
space:
mode:
authorTianjie Xu <xunchang@google.com>2016-10-19 00:05:21 +0200
committerandroid-build-merger <android-build-merger@google.com>2016-10-19 00:05:21 +0200
commit434697f06b7432a2358550eadd74fb97d617035c (patch)
treec24e3fb0f24bd693e63bfed48e497730164df079 /recovery.cpp
parentMerge "Change StringValue to use std::string" am: 2b17b24ae5 (diff)
parentresolve merge conflicts of 6fba98c to stage-aosp-master (diff)
downloadandroid_bootable_recovery-434697f06b7432a2358550eadd74fb97d617035c.tar
android_bootable_recovery-434697f06b7432a2358550eadd74fb97d617035c.tar.gz
android_bootable_recovery-434697f06b7432a2358550eadd74fb97d617035c.tar.bz2
android_bootable_recovery-434697f06b7432a2358550eadd74fb97d617035c.tar.lz
android_bootable_recovery-434697f06b7432a2358550eadd74fb97d617035c.tar.xz
android_bootable_recovery-434697f06b7432a2358550eadd74fb97d617035c.tar.zst
android_bootable_recovery-434697f06b7432a2358550eadd74fb97d617035c.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");