diff options
author | Ethan Yonker <dees_troy@teamw.in> | 2014-11-07 17:38:51 +0100 |
---|---|---|
committer | Ethan Yonker <dees_troy@teamw.in> | 2014-11-07 17:38:51 +0100 |
commit | f96087e68f81a8bf50b6c8ca7e947b24b678415c (patch) | |
tree | add1aac9cc66984694f1d7eae40871f3fcdd2ce0 | |
parent | Fix up tw_reboot function (diff) | |
download | android_bootable_recovery-f96087e68f81a8bf50b6c8ca7e947b24b678415c.tar android_bootable_recovery-f96087e68f81a8bf50b6c8ca7e947b24b678415c.tar.gz android_bootable_recovery-f96087e68f81a8bf50b6c8ca7e947b24b678415c.tar.bz2 android_bootable_recovery-f96087e68f81a8bf50b6c8ca7e947b24b678415c.tar.lz android_bootable_recovery-f96087e68f81a8bf50b6c8ca7e947b24b678415c.tar.xz android_bootable_recovery-f96087e68f81a8bf50b6c8ca7e947b24b678415c.tar.zst android_bootable_recovery-f96087e68f81a8bf50b6c8ca7e947b24b678415c.zip |
Diffstat (limited to '')
-rw-r--r-- | twinstall.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/twinstall.cpp b/twinstall.cpp index 4247cf7d8..595c4d2a6 100644 --- a/twinstall.cpp +++ b/twinstall.cpp @@ -269,15 +269,22 @@ extern "C" int TWinstall_zip(const char* path, int* wipe_cache) { DataManager::GetValue(TW_SIGNED_ZIP_VERIFY_VAR, zip_verify); #endif DataManager::SetProgress(0); + + MemMapping map; + if (sysMapFile(path, &map) != 0) { + LOGERR("Failed to sysMapFile '%s'\n", path); + return -1; + } + if (zip_verify) { gui_print("Verifying zip signature...\n"); - ret_val = verify_file(path); + ret_val = verify_file(map.addr, map.length); if (ret_val != VERIFY_SUCCESS) { LOGERR("Zip signature verification failed: %i\n", ret_val); return -1; } } - ret_val = mzOpenZipArchive(path, &Zip); + ret_val = mzOpenZipArchive(map.addr, map.length, &Zip); if (ret_val != 0) { LOGERR("Zip file is corrupt!\n", path); return INSTALL_CORRUPT; |