Home
last modified time | relevance | path

Searched refs:packagePath (Results 1 – 25 of 71) sorted by relevance

123

/ohos5.0/base/update/updater/test/unittest/updater_test/
H A Dupdater_unittest.cpp72 std::string packagePath = "/data/updater/updater/updater_without_updater_binary.zip"; variable
75 status = StartUpdaterProc(pkgManager, packagePath, 0);
78 packagePath = "/data/updater/updater/updater_with_incorrect_binary.zip";
79 status = StartUpdaterProc(pkgManager, packagePath, 0);
82 packagePath = "/data/updater/updater/updater.zip";
84 int32_t ret = pkgManager->LoadPackage(packagePath, GetTestCertName(), components);
86 status = StartUpdaterProc(pkgManager, packagePath, 0);
90 status = StartUpdaterProc(pkgManager, packagePath, 1);
93 packagePath = "/data/updater/updater/updater_binary_abnormal.zip";
94 status = StartUpdaterProc(pkgManager, packagePath, 1);
/ohos5.0/base/update/updater/test/unittest/script/
H A Dscript_unittest.h40 int32_t VerifyPackage(const std::string &packagePath, const std::string &keyPath, in VerifyPackage() argument
45 int32_t LoadPackage(const std::string &packagePath, const std::string &keyPath, in LoadPackage() argument
50 int32_t VerifyOtaPackage(const std::string &packagePath) override in VerifyOtaPackage() argument
58 int32_t VerifyBinFile(const std::string &packagePath, const std::string &keyPath, in VerifyBinFile() argument
63 const PkgInfo *GetPackageInfo(const std::string &packagePath) override in GetPackageInfo() argument
98 int32_t LoadPackageWithoutUnPack(const std::string &packagePath, in LoadPackageWithoutUnPack() argument
109 int32_t LoadPackageWithStream(const std::string &packagePath, const std::string &keyPath, in LoadPackageWithStream() argument
127 …int32_t ParseComponents(const std::string &packagePath, std::vector<std::string> &fileName) overri… in ParseComponents() argument
131 int32_t LoadPackage(const std::string &packagePath, in LoadPackage() argument
136 int32_t VerifyAccPackage(const std::string &packagePath, const std::string &keyPath) override in VerifyAccPackage() argument
/ohos5.0/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"; variable
66 int32_t ret = ProcessUpdater(false, STDOUT_FILENO, packagePath, GetTestCertName());
74 const string packagePath = "/data/updater/updater/updater_write_diff_miscblock_img.zip"; variable
77 int32_t ret = ProcessUpdater(false, STDOUT_FILENO, packagePath, GetTestCertName());
85 const string packagePath = "/data/updater/updater/updater_write_diff_miscblock_img.zip"; variable
88 int32_t ret = ProcessUpdater(false, STDOUT_FILENO, packagePath, GetTestCertName());
H A Dupdate_processor_unittest.cpp74 const string packagePath = "/data/updater/updater/updater_write_misc_img.zip"; variable
77 int32_t ret = ProcessUpdater(false, STDOUT_FILENO, packagePath, GetTestCertName());
90 const string packagePath = "/data/updater/updater/updater_write_diff_misc_img.zip"; variable
93 ret = ProcessUpdater(false, STDOUT_FILENO, packagePath, GetTestCertName());
106 const string packagePath = "/data/updater/updater/updater_write_diff_misc_img.zip"; variable
109 ret = ProcessUpdater(false, STDOUT_FILENO, packagePath, GetTestCertName());
H A Dupdate_partitions_unittest.cpp57 const string packagePath = "/data/updater/updater/parts/updaterpart01.zip"; variable
61 int ret = pkgManager->LoadPackage(packagePath, GetTestCertName(), components);
81 const string packagePath = "/data/updater/updater/parts/updaterpart02.zip"; variable
85 int ret = pkgManager->LoadPackage(packagePath, GetTestCertName(), components);
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()
/ohos5.0/base/update/updater/services/package/pkg_manager/
H A Dpkg_managerImpl.cpp242 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()
281 if (access(packagePath.c_str(), 0) != 0) { in LoadPackage()
295 PkgFile::PkgType pkgType = GetPkgTypeByName(packagePath); in LoadPackage()
302 PKG_LOGE("Parse %s fail ", packagePath.c_str()); in LoadPackage()
310 PKG_LOGE("Unzip %s fail ", packagePath.c_str()); in LoadPackage()
694 PkgFile::PkgType type = GetPkgTypeByName(packagePath); in DoCreatePkgStream()
696 ret = VerifyOtaPackage(packagePath); in DoCreatePkgStream()
714 PKG_LOGI("Verify file %s success", packagePath.c_str()); in DoCreatePkgStream()
[all …]
H A Dpkg_manager_impl.h46 …int32_t VerifyPackage(const std::string &packagePath, const std::string &keyPath, const std::strin…
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…
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) overri…
99 int32_t LoadPackage(const std::string &packagePath,
[all …]
/ohos5.0/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()
/ohos5.0/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 = testPackagePath + "test_package.zip"; in TestUpdaterPreProcess() local
[all …]
H A Dpkg_manager_unittest.cpp138 std::string packagePath = TEST_PATH_TO; in TestPackagePack() local
139 packagePath += testPackageName; in TestPackagePack()
153 std::string packagePath = TEST_PATH_TO; in TestPackagePackFileNotExist() local
154 packagePath += testPackageName; in TestPackagePackFileNotExist()
167 std::string packagePath = TEST_PATH_TO; in TestPackagePackParamInvalid() local
168 packagePath += testPackageName; in TestPackagePackParamInvalid()
199 std::string packagePath = TEST_PATH_TO; in TestInvalidStream() local
200 packagePath += testPackageName; in TestInvalidStream()
259 std::string packagePath = TEST_PATH_TO; in TestCreatePackageInvalidFile() local
260 packagePath += testPackageName; in TestCreatePackageInvalidFile()
[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()
/ohos5.0/drivers/hdf_core/framework/tools/hdi-gen/util/
H A Doptions.cpp202 bool Options::AddPackagePath(const std::string &packagePath) in AddPackagePath() argument
204 size_t index = packagePath.find(":"); in AddPackagePath()
205 if (packagePath.size() == 0 || packagePath.size() >= SIZE_MAX) { in AddPackagePath()
206 Logger::E(TAG, "invalid parameters '%s'.", packagePath.c_str()); in AddPackagePath()
209 if (index == std::string::npos || index == packagePath.size() - 1) { in AddPackagePath()
210 Logger::E(TAG, "invalid option parameters '%s'.", packagePath.c_str()); in AddPackagePath()
214 std::string package = packagePath.substr(0, index); in AddPackagePath()
215 std::string path = File::AdapterRealPath(packagePath.substr(index + 1)); in AddPackagePath()
217 Logger::E(TAG, "invalid path '%s'.", packagePath.substr(index + 1).c_str()); in AddPackagePath()
/ohos5.0/base/update/updater/interfaces/kits/packages/
H A Dpackage.cpp175 int32_t VerifyPackage(const char *packagePath, in VerifyPackage() argument
181 if (packagePath == nullptr || keyPath == nullptr || version == nullptr) { in VerifyPackage()
192 int32_t ret = manager->VerifyPackage(packagePath, keyPath, version, digestBuffer, in VerifyPackage()
198 int32_t VerifyPackageWithCallback(const std::string &packagePath, in VerifyPackageWithCallback() argument
201 if (packagePath.empty() || keyPath.empty() || cb == nullptr) { in VerifyPackageWithCallback()
212 int32_t ret = manager->VerifyPackage(packagePath, keyPath, version, digestBuffer, cb); in VerifyPackageWithCallback()
220 int32_t ExtraPackageDir(const char *packagePath, [[maybe_unused]] const char *keyPath, const char *…
223 if (packagePath == nullptr || outPath == nullptr) {
234 int32_t ret = manager->LoadPackageWithoutUnPack(std::string(packagePath), components);
262 if (packagePath == nullptr || outPath == nullptr || file == nullptr) {
[all …]
/ohos5.0/base/update/updater/services/include/package/
H A Dpkg_manager.h247 virtual int32_t VerifyPackage(const std::string &packagePath, const std::string &keyPath,
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,
276 virtual const PkgInfo *GetPackageInfo(const std::string &packagePath) = 0;
350 virtual int32_t LoadPackageWithoutUnPack(const std::string &packagePath,
353 … virtual int32_t LoadPackageWithStream(const std::string &packagePath, const std::string &keyPath,
364 …virtual int32_t ParseComponents(const std::string &packagePath, std::vector<std::string> &fileName…
374 virtual int32_t LoadPackage(const std::string &packagePath,
/ohos5.0/base/update/updater/interfaces/kits/include/package/
H A Dpackage.h123 int32_t VerifyPackage(const char *packagePath, const char *keyPath,
134 int32_t VerifyPackageWithCallback(const std::string &packagePath, const std::string &keyPath,
146 int32_t ExtraPackageDir(const char *packagePath, const char *keyPath, const char *dir,
158 int32_t ExtraPackageFile(const char *packagePath, const char *keyPath, const char *file,
/ohos5.0/foundation/arkui/ace_engine/adapter/ohos/entrance/
H A Dfile_asset_provider_impl.cpp29 bool FileAssetProviderImpl::Initialize(const std::string& packagePath, const std::vector<std::strin… in Initialize() argument
37 if (!packagePath.empty() && packagePath.back() != '/') { in Initialize()
38 packagePath_ = packagePath + "/"; in Initialize()
40 packagePath_ = packagePath; in Initialize()
/ohos5.0/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_Rea… 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()
/ohos5.0/base/update/updater/test/fuzztest/fuzz_src_data/
H A DTestDecompressGzip.new.gz1/* 2 * Copyright (c) 2021 Huawei Device Co., Ltd. 3 * ...
/ohos5.0/base/update/updater/test/unittest/test_data/applypatch/
H A DTestDecompressGzip.new.gz1/* 2 * Copyright (c) 2021 Huawei Device Co., Ltd. 3 * ...
/ohos5.0/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()
/ohos5.0/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()
/ohos5.0/base/update/updateservice/services/engine/src/
H A Dupdate_service_local_updater.cpp43 int32_t UpdateServiceLocalUpdater::VerifyUpgradePackage(const std::string &packagePath, const std::… 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()
/ohos5.0/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()

123