Home
last modified time | relevance | path

Searched refs:packagePath (Results 1 - 25 of 41) sorted by relevance

12

/base/update/updater/services/updater_binary/
H A Dmain.cpp37 std::string packagePath; in main() local
39 packagePath = argv[0]; in main()
45 packagePath = argv[0]; in main()
48 packagePath = argv[1]; in main()
55 return ProcessUpdater(retry, pipeFd, packagePath, Utils::GetCertName()); in main()
/base/update/updater/test/unittest/updater_binary/
H A Dupdate_image_block_test.cpp63 const string packagePath = "/data/updater/updater/updater_write_miscblock_img.zip"; in HWTEST_F() local
66 int32_t ret = ProcessUpdater(false, STDOUT_FILENO, packagePath, GetTestCertName()); in HWTEST_F()
74 const string packagePath = "/data/updater/updater/updater_write_diff_miscblock_img.zip"; in HWTEST_F() local
77 int32_t ret = ProcessUpdater(false, STDOUT_FILENO, packagePath, GetTestCertName()); in HWTEST_F()
85 const string packagePath = "/data/updater/updater/updater_write_diff_miscblock_img.zip"; in HWTEST_F() local
88 int32_t ret = ProcessUpdater(false, STDOUT_FILENO, packagePath, GetTestCertName()); in HWTEST_F()
H A Dupdate_processor_unittest.cpp74 const string packagePath = "/data/updater/updater/updater_write_misc_img.zip"; in HWTEST_F() local
77 int32_t ret = ProcessUpdater(false, STDOUT_FILENO, packagePath, GetTestCertName()); in HWTEST_F()
90 const string packagePath = "/data/updater/updater/updater_write_diff_misc_img.zip"; in HWTEST_F() local
93 ret = ProcessUpdater(false, STDOUT_FILENO, packagePath, GetTestCertName()); in HWTEST_F()
106 const string packagePath = "/data/updater/updater/updater_write_diff_misc_img.zip"; in HWTEST_F() local
109 ret = ProcessUpdater(false, STDOUT_FILENO, packagePath, GetTestCertName()); in HWTEST_F()
H A Dupdate_partitions_unittest.cpp57 const string packagePath = "/data/updater/updater/parts/updaterpart01.zip"; in HWTEST_F() local
61 int ret = pkgManager->LoadPackage(packagePath, GetTestCertName(), components); in HWTEST_F()
81 const string packagePath = "/data/updater/updater/parts/updaterpart02.zip"; in HWTEST_F() local
85 int ret = pkgManager->LoadPackage(packagePath, GetTestCertName(), components); in HWTEST_F()
H A Dupdater_binary_unittest.cpp71 int32_t BuildFileDigest(uint8_t &digest, size_t size, const std::string &packagePath) const in BuildFileDigest()
75 int32_t ret = pkgManager->CreatePkgStream(stream, packagePath, 0, PkgStream::PkgStreamType_Read); in BuildFileDigest()
77 LOG(ERROR) << "Create input stream fail " << packagePath; in BuildFileDigest()
157 std::string packagePath = TEST_PATH_TO; in CreatePackageBin() local
158 packagePath += testPackageName; in CreatePackageBin()
159 ret = CreatePackage(&pkgInfo, comp, packagePath.c_str(), GetTestPrivateKeyName().c_str()); in CreatePackageBin()
/base/update/updater/test/unittest/updater_test/
H A Dupdater_unittest.cpp72 std::string packagePath = "/data/updater/updater/updater_without_updater_binary.zip"; in HWTEST_F() local
75 status = StartUpdaterProc(pkgManager, packagePath, 0); in HWTEST_F()
78 packagePath = "/data/updater/updater/updater_with_incorrect_binary.zip"; in HWTEST_F()
79 status = StartUpdaterProc(pkgManager, packagePath, 0); in HWTEST_F()
82 packagePath = "/data/updater/updater/updater.zip"; in HWTEST_F()
84 int32_t ret = pkgManager->LoadPackage(packagePath, GetTestCertName(), components); in HWTEST_F()
86 status = StartUpdaterProc(pkgManager, packagePath, 0); in HWTEST_F()
90 status = StartUpdaterProc(pkgManager, packagePath, 1); in HWTEST_F()
93 packagePath = "/data/updater/updater/updater_binary_abnormal.zip"; in HWTEST_F()
94 status = StartUpdaterProc(pkgManager, packagePath, in HWTEST_F()
[all...]
/base/update/updater/test/unittest/script/
H A Dscript_unittest.h40 int32_t VerifyPackage(const std::string &packagePath, const std::string &keyPath,
45 int32_t LoadPackage(const std::string &packagePath, const std::string &keyPath,
50 int32_t VerifyOtaPackage(const std::string &packagePath) override
58 int32_t VerifyBinFile(const std::string &packagePath, const std::string &keyPath,
63 const PkgInfo *GetPackageInfo(const std::string &packagePath) override
98 int32_t LoadPackageWithoutUnPack(const std::string &packagePath,
109 int32_t LoadPackageWithStream(const std::string &packagePath, const std::string &keyPath,
127 int32_t ParseComponents(const std::string &packagePath, std::vector<std::string> &fileName) override
131 int32_t LoadPackage(const std::string &packagePath,
136 int32_t VerifyAccPackage(const std::string &packagePath, cons
[all...]
/base/update/updateservice/services/engine/src/
H A Dupdate_service_local_updater.cpp43 int32_t UpdateServiceLocalUpdater::VerifyUpgradePackage(const std::string &packagePath, const std::string &keyPath, in VerifyUpgradePackage() argument
47 int32_t ret = ::VerifyPackageWithCallback(packagePath.c_str(), keyPath.c_str(), in VerifyUpgradePackage()
49 ENGINE_LOGI("VerifyUpgradePackage %s, %s, %{public}d", packagePath.c_str(), keyPath.c_str(), ret); in VerifyUpgradePackage()
/base/update/updater/test/fuzztest/binflow_fuzzer/
H A Dbinflow_fuzzer.cpp28 std::string packagePath = std::string(reinterpret_cast<const char*>(data), size); in TestBinFlowUpdater() local
36 int32_t ret = pkgManager->LoadPackage(packagePath, Utils::GetCertName(), components); in TestBinFlowUpdater()
43 ret = Updater::ExecUpdate(pkgManager, false, packagePath, in TestBinFlowUpdater()
/base/update/updater/services/package/pkg_manager/
H A Dpkg_managerImpl.cpp239 int32_t PkgManagerImpl::LoadPackageWithoutUnPack(const std::string &packagePath, in LoadPackageWithoutUnPack() argument
242 PkgFile::PkgType pkgType = GetPkgTypeByName(packagePath); in LoadPackageWithoutUnPack()
243 int32_t ret = LoadPackage(packagePath, fileIds, pkgType); in LoadPackageWithoutUnPack()
245 PKG_LOGE("Parse %s fail ", packagePath.c_str()); in LoadPackageWithoutUnPack()
278 int32_t PkgManagerImpl::LoadPackage(const std::string &packagePath, const std::string &keyPath, in LoadPackage() argument
281 if (access(packagePath.c_str(), 0) != 0) { in LoadPackage()
291 if (iter != nullptr && iter->GetPkgStream()->GetFileName().compare(packagePath) == 0) { in LoadPackage()
295 PkgFile::PkgType pkgType = GetPkgTypeByName(packagePath); in LoadPackage()
298 int32_t ret = LoadPackage(packagePath, fileIds, pkgType); in LoadPackage()
302 PKG_LOGE("Parse %s fail ", packagePath in LoadPackage()
382 LoadPackage(const std::string &packagePath, std::vector<std::string> &fileIds, PkgFile::PkgType type) LoadPackage() argument
395 LoadPackageWithStream(const std::string &packagePath, const std::string &keyPath, std::vector<std::string> &fileIds, uint8_t type, StreamPtr stream) LoadPackageWithStream() argument
408 LoadPackageWithStream(const std::string &packagePath, std::vector<std::string> &fileIds, PkgFile::PkgType type, PkgStreamPtr stream) LoadPackageWithStream() argument
451 ParseComponents(const std::string &packagePath, std::vector<std::string> &fileName) ParseComponents() argument
463 GetPackageInfo(const std::string &packagePath) GetPackageInfo() argument
685 VerifyPackage(const std::string &packagePath, const std::string &keyPath, const std::string &version, const PkgBuffer &digest, VerifyCallback cb) DoCreatePkgStream() argument
968 VerifyAccPackage(const std::string &packagePath, const std::string &keyPath) DoCreatePkgStream() argument
1044 VerifyOtaPackage(const std::string &packagePath) DoCreatePkgStream() argument
1067 VerifyBinFile(const std::string &packagePath, const std::string &keyPath, const std::string &version, const PkgBuffer &digest) DoCreatePkgStream() argument
[all...]
H A Dpkg_manager_impl.h46 int32_t VerifyPackage(const std::string &packagePath, const std::string &keyPath, const std::string &version,
49 int32_t LoadPackage(const std::string &packagePath, const std::string &keyPath,
56 const PkgInfo *GetPackageInfo(const std::string &packagePath) override;
64 int32_t LoadPackageWithoutUnPack(const std::string &packagePath, std::vector<std::string> &fileIds) override;
66 int32_t LoadPackageWithStream(const std::string &packagePath, const std::string &keyPath,
78 int32_t VerifyAccPackage(const std::string &packagePath, const std::string &keyPath) override;
79 int32_t VerifyOtaPackage(const std::string &packagePath) override;
81 int32_t VerifyBinFile(const std::string &packagePath, const std::string &keyPath,
97 int32_t ParseComponents(const std::string &packagePath, std::vector<std::string> &fileName) override;
99 int32_t LoadPackage(const std::string &packagePath,
[all...]
/base/update/updater/interfaces/kits/include/package/
H A Dpackage.h116 * @param packagePath path of the update package
123 int32_t VerifyPackage(const char *packagePath, const char *keyPath,
129 * @param packagePath 包文件的文件名
134 int32_t VerifyPackageWithCallback(const std::string &packagePath, const std::string &keyPath,
140 * @param packagePath path of the update package
146 int32_t ExtraPackageDir(const char *packagePath, const char *keyPath, const char *dir,
152 * @param packagePath path of the update package
158 int32_t ExtraPackageFile(const char *packagePath, const char *keyPath, const char *file,
/base/update/updater/test/unittest/package/
H A Dpkg_package_unittest.cpp78 std::string packagePath = TEST_PATH_TO; in TestPkgFile() local
79 packagePath += testPackageName; in TestPkgFile()
80 int ret = pkgManager_->CreatePkgStream(stream, packagePath, 0, PkgStream::PkgStreamType_Read); in TestPkgFile()
100 std::string packagePath = TEST_PATH_TO; in TestPkgFileInvalid() local
101 packagePath += testPackageName; in TestPkgFileInvalid()
102 int ret = pkgManager_->CreatePkgStream(stream, packagePath, 0, PkgStream::PkgStreamType_Read); in TestPkgFileInvalid()
119 std::string packagePath = TEST_PATH_TO; in TestBigZipEntry() local
121 packagePath += testPackageName; in TestBigZipEntry()
122 pkgManager_->CreatePkgStream(stream, packagePath, 0, PkgStream::PkgStreamType_Read); in TestBigZipEntry()
192 std::string packagePath in TestUpdaterPreProcess() local
[all...]
H A Dpkg_manager_unittest.cpp138 std::string packagePath = TEST_PATH_TO; in TestPackagePack() local
139 packagePath += testPackageName; in TestPackagePack()
140 int32_t ret = pkgManager_->CreatePackage(packagePath, "", &pkgInfo.pkgInfo, files); in TestPackagePack()
142 ret = pkgManager_->CreatePackage(packagePath, GetTestPrivateKeyName(0), &pkgInfo.pkgInfo, files); in TestPackagePack()
153 std::string packagePath = TEST_PATH_TO; in TestPackagePackFileNotExist() local
154 packagePath += testPackageName; in TestPackagePackFileNotExist()
158 int32_t ret = pkgManager_->CreatePackage(packagePath, GetTestPrivateKeyName(0), &pkgInfo.pkgInfo, files); in TestPackagePackFileNotExist()
167 std::string packagePath = TEST_PATH_TO; in TestPackagePackParamInvalid() local
168 packagePath += testPackageName; in TestPackagePackParamInvalid()
169 int32_t ret = pkgManager_->CreatePackage(packagePath, GetTestPrivateKeyNam in TestPackagePackParamInvalid()
199 std::string packagePath = TEST_PATH_TO; TestInvalidStream() local
259 std::string packagePath = TEST_PATH_TO; TestCreatePackageInvalidFile() local
272 std::string packagePath = TEST_PATH_TO; TestCreatePackageInvalidSignMethod() local
[all...]
H A Dpackage_unittest.cpp57 std::string packagePath = TEST_PATH_TO + testPackageName; in TestInvalidCreatePackage() local
59 ret = CreatePackage(&pkgInfoExt, compInfo, packagePath.c_str(), GetTestPrivateKeyName(0).c_str()); in TestInvalidCreatePackage()
64 ret = CreatePackage(&pkgInfoExt, compInfo, packagePath.c_str(), GetTestPrivateKeyName(0).c_str()); in TestInvalidCreatePackage()
69 ret = CreatePackage(&pkgInfoExt, compInfo, packagePath.c_str(), GetTestPrivateKeyName(0).c_str()); in TestInvalidCreatePackage()
74 ret = CreatePackage(&pkgInfoExt, compInfo, packagePath.c_str(), GetTestPrivateKeyName(0).c_str()); in TestInvalidCreatePackage()
79 ret = CreatePackage(&pkgInfoExt, compInfo, packagePath.c_str(), GetTestPrivateKeyName(0).c_str()); in TestInvalidCreatePackage()
118 std::string packagePath = TEST_PATH_TO; in TestPackagePack() local
119 packagePath += testPackageName; in TestPackagePack()
120 ret = CreatePackage(&pkgInfo, comp, packagePath.c_str(), in TestPackagePack()
H A Dpkg_verify_unittest.cpp58 std::string packagePath = "invalid_path"; in TestExtraPackageFile() local
62 ret = ExtraPackageFile(packagePath.c_str(), keyPath.c_str(), file.c_str(), outPath.c_str()); in TestExtraPackageFile()
65 packagePath = testPackagePath + "test_package.zip"; in TestExtraPackageFile()
68 ret = ExtraPackageFile(packagePath.c_str(), keyPath.c_str(), file.c_str(), testPackagePath.c_str()); in TestExtraPackageFile()
78 std::string packagePath = "invalid_path"; in TestExtraPackageDir() local
81 ret = ExtraPackageDir(packagePath.c_str(), keyPath.c_str(), nullptr, outPath.c_str()); in TestExtraPackageDir()
84 packagePath = testPackagePath + "test_package.zip"; in TestExtraPackageDir()
86 ret = ExtraPackageDir(packagePath.c_str(), keyPath.c_str(), nullptr, testPackagePath.c_str()); in TestExtraPackageDir()
/base/update/updater/test/unittest/flow_update/update_bin/
H A Dbin_flow_update_unittest.cpp45 std::string packagePath = "/data/updater/package/updater_flow.zip"; in TestBinFlowUpdater() local
53 int32_t ret = pkgManager->LoadPackage(packagePath, Utils::GetCertName(), components); in TestBinFlowUpdater()
60 ret = Updater::ExecUpdate(pkgManager, false, packagePath, in TestBinFlowUpdater()
/base/update/updater/test/fuzztest/UpdaterStartUpdaterProc_fuzzer/
H A DUpdaterStartUpdaterProc_fuzzer.cpp49 static int32_t BuildFileDigest(uint8_t &digest, size_t size, const std::string &packagePath) in BuildFileDigest() argument
54 int32_t ret = packageManager->CreatePkgStream(stream, packagePath, 0, PkgStream::PkgStreamType_Read); in BuildFileDigest()
56 PKG_LOGE("Create input stream fail %s", packagePath.c_str()); in BuildFileDigest()
141 std::string packagePath = TEST_PATH_TO; in CreatePackageZip() local
142 packagePath += testPackageName; in CreatePackageZip()
143 ret = CreatePackage(&pkgInfo, comp, packagePath.c_str(), GetTestPrivateKeyName().c_str()); in CreatePackageZip()
/base/update/updater/interfaces/kits/packages/
H A Dpackage.cpp191 int32_t VerifyPackage(const char *packagePath, in VerifyPackage() argument
197 if (packagePath == nullptr || keyPath == nullptr || version == nullptr) { in VerifyPackage()
208 int32_t ret = manager->VerifyPackage(packagePath, keyPath, version, digestBuffer, in VerifyPackage()
214 int32_t VerifyPackageWithCallback(const std::string &packagePath, in VerifyPackageWithCallback() argument
217 if (packagePath.empty() || keyPath.empty() || cb == nullptr) { in VerifyPackageWithCallback()
228 int32_t ret = manager->VerifyPackage(packagePath, keyPath, version, digestBuffer, cb); in VerifyPackageWithCallback()
236 int32_t ExtraPackageDir(const char *packagePath, [[maybe_unused]] const char *keyPath, const char *dir, in ExtraPackageDir() argument
239 if (packagePath == nullptr || outPath == nullptr) { in ExtraPackageDir()
250 int32_t ret = manager->LoadPackageWithoutUnPack(std::string(packagePath), components); in ExtraPackageDir()
275 int32_t ExtraPackageFile(const char *packagePath, [[maybe_unuse argument
[all...]
/base/update/updater/services/include/package/
H A Dpkg_manager.h240 * @param packagePath file name of the update package
247 virtual int32_t VerifyPackage(const std::string &packagePath, const std::string &keyPath,
253 * @param packagePath file name of the update package
258 virtual int32_t LoadPackage(const std::string &packagePath, const std::string &keyPath,
261 virtual int32_t VerifyAccPackage(const std::string &packagePath, const std::string &keyPath) = 0;
265 virtual int32_t VerifyOtaPackage(const std::string &packagePath) = 0;
267 virtual int32_t VerifyBinFile(const std::string &packagePath, const std::string &keyPath,
273 * @param packagePath file name of the update package
276 virtual const PkgInfo *GetPackageInfo(const std::string &packagePath) = 0;
350 virtual int32_t LoadPackageWithoutUnPack(const std::string &packagePath,
[all...]
/base/update/updater/services/diffpatch/patch_shared/
H A Dpatch_shared.h22 extern "C" int RestoreOriginalFile(const std::string &packagePath,
H A Dpatch_shared.cpp86 static int GetUpdateBlockInfo(UpdateBlockInfo &infos, const std::string &packagePath, in GetUpdateBlockInfo() argument
89 if (!UpdatePathCheck(packagePath, packagePath.length())) { in GetUpdateBlockInfo()
90 LOG(ERROR) << packagePath << " is empty."; in GetUpdateBlockInfo()
412 int RestoreOriginalFile(const std::string &packagePath, const std::string &srcImage, const std::string &targetPath) in RestoreOriginalFile() argument
415 if (GetUpdateBlockInfo(infos, packagePath, srcImage, targetPath) != 0) { in RestoreOriginalFile()
428 std::string pckPath = packagePath; in RestoreOriginalFile()
446 (void)Utils::DeleteFile(packagePath); in RestoreOriginalFile()
/base/update/updater/test/fuzztest/package_fuzzer/
H A Dpackage_fuzzer.cpp58 std::string packagePath = TEST_PATH_TO + testPackageName; in TestInvalidCreatePackage() local
60 ret = CreatePackage(&pkgInfoExt, info, packagePath.c_str(), GetFuzzPrivateKeyName(0).c_str()); in TestInvalidCreatePackage()
64 ret = CreatePackage(&pkgInfoExt, info, packagePath.c_str(), GetFuzzPrivateKeyName(0).c_str()); in TestInvalidCreatePackage()
68 ret = CreatePackage(&pkgInfoExt, info, packagePath.c_str(), GetFuzzPrivateKeyName(0).c_str()); in TestInvalidCreatePackage()
72 ret = CreatePackage(&pkgInfoExt, info, packagePath.c_str(), GetFuzzPrivateKeyName(0).c_str()); in TestInvalidCreatePackage()
76 ret = CreatePackage(&pkgInfoExt, info, packagePath.c_str(), GetFuzzPrivateKeyName(0).c_str()); in TestInvalidCreatePackage()
113 std::string packagePath = TEST_PATH_TO; in TestPackagePack() local
114 packagePath += testPackageName; in TestPackagePack()
115 ret = CreatePackage(&pkgInfo, comp, packagePath.c_str(), in TestPackagePack()
/base/update/updater/test/fuzztest/extractandexecutescript_fuzzer/
H A Dextractandexecutescript_fuzzer.cpp186 int32_t BuildFileDigest(uint8_t &digest, size_t size, const std::string &packagePath) in BuildFileDigest() argument
189 int32_t ret = packageManager->CreatePkgStream(stream, packagePath, 0, PkgStream::PkgStreamType_Read); in BuildFileDigest()
191 PKG_LOGE("Create input stream fail %s", packagePath.c_str()); in BuildFileDigest()
274 std::string packagePath = TEST_PATH_TO; in CreatePackageBin() local
275 packagePath += testPackageName; in CreatePackageBin()
276 ret = CreatePackage(&pkgInfo, comp, packagePath.c_str(), GetTestPrivateKeyName().c_str()); in CreatePackageBin()
/base/update/updateservice/interfaces/inner_api/feature/update/api/local_updater/
H A Diservice_local_updater.h32 virtual int32_t VerifyUpgradePackage(const std::string &packagePath, const std::string &keyPath,

Completed in 11 milliseconds

12