diff --git a/twrpinstall/ZipUtil.cpp b/twrpinstall/ZipUtil.cpp index f8134bc4..f073a229 100755 --- a/twrpinstall/ZipUtil.cpp +++ b/twrpinstall/ZipUtil.cpp @@ -63,7 +63,7 @@ bool ExtractPackageRecursive(ZipArchiveHandle zip, const std::string& zip_path, } std::unique_ptr guard(cookie, EndIteration); - ZipEntry entry; + ZipEntry64 entry; ZipString name; int extractCount = 0; while (Next(cookie, &entry, &name) == 0) { diff --git a/twrpinstall/install.cpp b/twrpinstall/install.cpp index 5295405f..d270d26d 100755 --- a/twrpinstall/install.cpp +++ b/twrpinstall/install.cpp @@ -72,7 +72,7 @@ bool ReadMetadataFromPackage(ZipArchiveHandle zip, std::map guard(cookie, EndIteration); // std::vector compatibility_info; -// ZipEntry info_entry; +// ZipEntry64 info_entry; // ZipString info_name; // while (Next(cookie, &info_entry, &info_name) == 0) { // std::string content(info_entry.uncompressed_length, '\0'); diff --git a/twrpinstall/installcommand.cpp b/twrpinstall/installcommand.cpp index 98360141..ad7a7727 100755 --- a/twrpinstall/installcommand.cpp +++ b/twrpinstall/installcommand.cpp @@ -55,7 +55,7 @@ static int parse_build_number(std::string str) { bool read_metadata_from_package(ZipArchiveHandle zip, std::string* meta_data) { std::string binary_name(METADATA_PATH); - ZipEntry binary_entry; + ZipEntry64 binary_entry; if (FindEntry(zip, binary_name, &binary_entry) == 0) { long size = binary_entry.uncompressed_length; if (size <= 0) @@ -201,7 +201,7 @@ abupdate_binary_command(const char* path, int retry_count __unused, // the RAW payload offset in the zip file. // if (!Zip->EntryExists(AB_OTA_PAYLOAD_PROPERTIES)) { std::string binary_name(AB_OTA_PAYLOAD_PROPERTIES); - ZipEntry binary_entry; + ZipEntry64 binary_entry; if (FindEntry(Zip, binary_name, &binary_entry) != 0) { printf("Can't find %s\n", AB_OTA_PAYLOAD_PROPERTIES); return INSTALL_CORRUPT; @@ -216,7 +216,7 @@ abupdate_binary_command(const char* path, int retry_count __unused, } std::string ab_ota_payload(AB_OTA_PAYLOAD); - ZipEntry ab_ota_payload_entry; + ZipEntry64 ab_ota_payload_entry; if (FindEntry(Zip, ab_ota_payload, &ab_ota_payload_entry) != 0) { printf("Can't find %s\n", AB_OTA_PAYLOAD); return INSTALL_CORRUPT; @@ -277,7 +277,7 @@ bool verify_package_compatibility(ZipArchiveHandle zw) { static constexpr const char* COMPATIBILITY_ZIP_ENTRY = "compatibility.zip"; std::string compatibility_entry_name(COMPATIBILITY_ZIP_ENTRY); - ZipEntry compatibility_entry; + ZipEntry64 compatibility_entry; if (FindEntry(zw, compatibility_entry_name, &compatibility_entry) != 0) { printf("Package doesn't contain %s entry\n", COMPATIBILITY_ZIP_ENTRY); return true; @@ -311,7 +311,7 @@ bool verify_package_compatibility(ZipArchiveHandle zw) { std::unique_ptr guard(cookie, EndIteration); std::vector compatibility_info; - ZipEntry info_entry; + ZipEntry64 info_entry; std::string info_name; while (Next(cookie, &info_entry, &info_name) == 0) { std::string content(info_entry.uncompressed_length, '\0'); diff --git a/twrpinstall/twinstall.cpp b/twrpinstall/twinstall.cpp index 93164e19..e1f84150 100755 --- a/twrpinstall/twinstall.cpp +++ b/twrpinstall/twinstall.cpp @@ -74,7 +74,7 @@ static int Install_Theme(const char* path, ZipArchiveHandle Zip) { return INSTALL_CORRUPT; #else std::string binary_name("ui.xml"); - ZipEntry binary_entry; + ZipEntry64 binary_entry; if (FindEntry(Zip, binary_name, &binary_entry) != 0) { return INSTALL_CORRUPT; } @@ -106,7 +106,7 @@ static int Prepare_Update_Binary(ZipArchiveHandle Zip) { std::vector::iterator arch; std::string base_name = UPDATE_BINARY_NAME; base_name += "-"; - ZipEntry binary_entry; + ZipEntry64 binary_entry; std::string update_binary_string(UPDATE_BINARY_NAME); if (FindEntry(Zip, update_binary_string, &binary_entry) != 0) { for (arch = split.begin(); arch != split.end(); arch++) { @@ -133,7 +133,7 @@ static int Prepare_Update_Binary(ZipArchiveHandle Zip) { // If exists, extract file_contexts from the zip file std::string file_contexts("file_contexts"); - ZipEntry file_contexts_entry; + ZipEntry64 file_contexts_entry; if (FindEntry(Zip, file_contexts, &file_contexts_entry) != 0) { LOGINFO("Zip does not contain SELinux file_contexts file in its root.\n"); } else { @@ -309,7 +309,7 @@ int TWinstall_zip(const char* path, int* wipe_cache, bool check_for_digest) { time(&start); std::string update_binary_name(UPDATE_BINARY_NAME); - ZipEntry update_binary_entry; + ZipEntry64 update_binary_entry; if (FindEntry(Zip, update_binary_name, &update_binary_entry) == 0) { LOGINFO("Update binary zip\n"); // Additionally verify the compatibility of the package. @@ -323,7 +323,7 @@ int TWinstall_zip(const char* path, int* wipe_cache, bool check_for_digest) { } } else { std::string ab_binary_name(AB_OTA); - ZipEntry ab_binary_entry; + ZipEntry64 ab_binary_entry; if (FindEntry(Zip, ab_binary_name, &ab_binary_entry) == 0) { LOGINFO("AB zip\n"); gui_msg(Msg(msg::kHighlight, "flash_ab_inactive=Flashing A/B zip to inactive slot: {1}")(PartitionManager.Get_Active_Slot_Display()=="A"?"B":"A")); @@ -353,7 +353,7 @@ int TWinstall_zip(const char* path, int* wipe_cache, bool check_for_digest) { } } else { std::string binary_name("ui.xml"); - ZipEntry binary_entry; + ZipEntry64 binary_entry; if (FindEntry(Zip, binary_name, &binary_entry) != 0) { LOGINFO("TWRP theme zip\n"); ret_val = Install_Theme(path, Zip); diff --git a/twrpinstall/verifier.cpp b/twrpinstall/verifier.cpp index 1fa8279a..02ec987d 100755 --- a/twrpinstall/verifier.cpp +++ b/twrpinstall/verifier.cpp @@ -328,7 +328,7 @@ static std::vector IterateZipEntriesAndSearchForKeys(const ZipArchi std::vector result; std::string_view name; - ZipEntry entry; + ZipEntry64 entry; while ((iter_status = Next(cookie, &entry, &name)) == 0) { std::vector pem_content(entry.uncompressed_length); if (int32_t extract_status =