Lines Matching refs:zip
76 bool ReadMetadataFromPackage(ZipArchiveHandle zip, std::map<std::string, std::string>* metadata) { in ReadMetadataFromPackage() argument
81 if (FindEntry(zip, METADATA_PATH, &entry) != 0) { in ReadMetadataFromPackage()
89 ExtractToMemory(zip, &entry, reinterpret_cast<uint8_t*>(&metadata_string[0]), length); in ReadMetadataFromPackage()
237 bool SetUpAbUpdateCommands(const std::string& package, ZipArchiveHandle zip, int status_fd, in SetUpAbUpdateCommands() argument
245 if (FindEntry(zip, AB_OTA_PAYLOAD_PROPERTIES, &properties_entry) != 0) { in SetUpAbUpdateCommands()
252 ExtractToMemory(zip, &properties_entry, payload_properties.data(), properties_entry_length); in SetUpAbUpdateCommands()
260 if (FindEntry(zip, AB_OTA_PAYLOAD, &payload_entry) != 0) { in SetUpAbUpdateCommands()
275 bool SetUpNonAbUpdateCommands(const std::string& package, ZipArchiveHandle zip, int retry_count, in SetUpNonAbUpdateCommands() argument
282 if (FindEntry(zip, UPDATE_BINARY_NAME, &binary_entry) != 0) { in SetUpNonAbUpdateCommands()
296 if (auto error = ExtractEntryToFile(zip, &binary_entry, fd); error != 0) { in SetUpNonAbUpdateCommands()
333 auto zip = package->GetZipArchiveHandle(); in TryUpdateBinary() local
334 if (!ReadMetadataFromPackage(zip, &metadata)) { in TryUpdateBinary()
408 ? SetUpAbUpdateCommands(package_path, zip, pipe_write.get(), &args) in TryUpdateBinary()
409 : SetUpNonAbUpdateCommands(package_path, zip, retry_count, pipe_write.get(), &args); in TryUpdateBinary()