Home
last modified time | relevance | path

Searched refs:pkgManager (Results 1 – 25 of 35) sorted by relevance

12

/base/update/updater/services/
Dupdater_preprocess.cpp39 int32_t PreProcess::DoUpdatePreProcess(PkgManager::PkgManagerPtr pkgManager) in DoUpdatePreProcess() argument
45 return helper_(pkgManager); in DoUpdatePreProcess()
48 int CheckVersion(PkgManager::PkgManagerPtr pkgManager, PackagesInfoPtr pkginfomanager) in CheckVersion() argument
51 if (pkgManager == nullptr || pkginfomanager == nullptr) { in CheckVersion()
61 …std::vector<std::string> targetVersions = pkginfomanager->GetOTAVersion(pkgManager, "/version_list… in CheckVersion()
72 int CheckBoardId(PkgManager::PkgManagerPtr pkgManager, PackagesInfoPtr pkginfomanager) in CheckBoardId() argument
75 if (pkgManager == nullptr || pkginfomanager == nullptr) { in CheckBoardId()
82 … std::vector<std::string> boardIdList = pkginfomanager->GetBoardID(pkgManager, "/board_list", ""); in CheckBoardId()
93 int32_t UpdatePreProcess(PkgManager::PkgManagerPtr pkgManager) in UpdatePreProcess() argument
96 if (pkgManager == nullptr) { in UpdatePreProcess()
[all …]
Dupdater.cpp75 int GetUpdatePackageInfo(PkgManager::PkgManagerPtr pkgManager, const std::string &path) in GetUpdatePackageInfo() argument
78 if (pkgManager == nullptr) { in GetUpdatePackageInfo()
82 int32_t ret = pkgManager->LoadPackage(path, Utils::GetCertName(), components); in GetUpdatePackageInfo()
94 PkgManager::PkgManagerPtr pkgManager = Hpackage::PkgManager::CreatePackageInstance(); in IsSpaceCapacitySufficient() local
95 if (pkgManager == nullptr) { in IsSpaceCapacitySufficient()
100 int ret = pkgManager->LoadPackageWithoutUnPack(path, fileIds); in IsSpaceCapacitySufficient()
103 PkgManager::ReleasePackageInstance(pkgManager); in IsSpaceCapacitySufficient()
107 const FileInfo *info = pkgManager->GetFileInfo("update.bin"); in IsSpaceCapacitySufficient()
110 PkgManager::ReleasePackageInstance(pkgManager); in IsSpaceCapacitySufficient()
113 PkgManager::ReleasePackageInstance(pkgManager); in IsSpaceCapacitySufficient()
[all …]
Dupdater_main.cpp123 static int OtaUpdatePreCheck(PkgManager::PkgManagerPtr pkgManager, const std::string &packagePath) in OtaUpdatePreCheck() argument
126 if (pkgManager == nullptr) { in OtaUpdatePreCheck()
143 int32_t ret = pkgManager->VerifyOtaPackage(packagePath); in OtaUpdatePreCheck()
204 PkgManager::PkgManagerPtr pkgManager = PkgManager::GetPackageInstance(); in UpdaterFromSdcard() local
205 if (pkgManager == nullptr) { in UpdaterFromSdcard()
214 PkgManager::ReleasePackageInstance(pkgManager); in UpdaterFromSdcard()
222 UpdaterStatus updateRet = DoInstallUpdaterPackage(pkgManager, upParams, SDCARD_UPDATE); in UpdaterFromSdcard()
231 PkgManager::ReleasePackageInstance(pkgManager); in UpdaterFromSdcard()
/base/update/updater/test/unittest/updater_test/
Dupdater_unittest.cpp73 PkgManager::PkgManagerPtr pkgManager = PkgManager::GetPackageInstance(); variable
76 status = StartUpdaterProc(pkgManager, packagePath, 0, maxTemperature);
80 status = StartUpdaterProc(pkgManager, packagePath, 0, maxTemperature);
85 int32_t ret = pkgManager->LoadPackage(packagePath, GetTestCertName(), components);
87 status = StartUpdaterProc(pkgManager, packagePath, 0, maxTemperature);
91 status = StartUpdaterProc(pkgManager, packagePath, 1, maxTemperature);
95 status = StartUpdaterProc(pkgManager, packagePath, 1, maxTemperature);
96 PkgManager::ReleasePackageInstance(pkgManager);
103 PkgManager::PkgManagerPtr pkgManager = PkgManager::GetPackageInstance(); variable
105 int ret = GetUpdatePackageInfo(pkgManager, nonExistPackagePath);
[all …]
/base/update/updater/test/unittest/updater_binary/
Dupdate_partitions_unittest.cpp58 PkgManager::PkgManagerPtr pkgManager = PkgManager::GetPackageInstance(); variable
61 int ret = pkgManager->LoadPackage(packagePath, GetTestCertName(), components);
63 UpdaterEnv* env = new UpdaterEnv(pkgManager, nullptr, false);
74 PkgManager::ReleasePackageInstance(pkgManager);
81 PkgManager::PkgManagerPtr pkgManager = PkgManager::GetPackageInstance(); variable
84 int ret = pkgManager->LoadPackage(packagePath, GetTestCertName(), components);
86 UpdaterEnv* env = new UpdaterEnv(pkgManager, nullptr, false);
97 PkgManager::ReleasePackageInstance(pkgManager);
Dupdate_image_block_test.cpp80 PkgManager::PkgManagerPtr pkgManager = PkgManager::GetPackageInstance(); variable
82 ret = pkgManager->LoadPackage(packagePath, GetTestCertName(), components);
84 UpdaterEnv* env = new UpdaterEnv(pkgManager, nullptr, false); // retry
92 PkgManager::ReleasePackageInstance(pkgManager);
114 PkgManager::PkgManagerPtr pkgManager = PkgManager::GetPackageInstance(); variable
116 ret = pkgManager->LoadPackage(packagePath, GetTestCertName(), components);
118 UpdaterEnv* env = new UpdaterEnv(pkgManager, nullptr, true);
126 PkgManager::ReleasePackageInstance(pkgManager);
Dupdater_binary_unittest.cpp75 PkgManager::PkgManagerPtr pkgManager = PkgManager::GetPackageInstance(); in BuildFileDigest() local
77 … int32_t ret = pkgManager->CreatePkgStream(stream, packagePath, 0, PkgStream::PkgStreamType_Read); in BuildFileDigest()
78 PKG_CHECK(ret == PKG_SUCCESS, pkgManager->ClosePkgStream(stream); in BuildFileDigest()
81 …PKG_CHECK(fileLen > 0, pkgManager->ClosePkgStream(stream); return PKG_INVALID_FILE, "invalid file … in BuildFileDigest()
82 PKG_CHECK(fileLen <= SIZE_MAX, pkgManager->ClosePkgStream(stream); return PKG_INVALID_FILE, in BuildFileDigest()
89 …PKG_CHECK(algorithm != nullptr, pkgManager->ClosePkgStream(stream); return PKG_NOT_EXIST_ALGORITHM, in BuildFileDigest()
98 pkgManager->ClosePkgStream(stream); return ret, in BuildFileDigest()
107 pkgManager->ClosePkgStream(stream); in BuildFileDigest()
Dupdate_binary_unittest.h25 …it UTestBinaryEnv(Hpackage::PkgManager::PkgManagerPtr pkgManager) : Uscript::UScriptEnv(pkgManager in UTestBinaryEnv() argument
/base/update/updater/services/include/updater/
Dupdater_preprocess.h23 typedef int32_t (*PreProcessFunc)(Hpackage::PkgManager::PkgManagerPtr pkgManager);
25 int CheckBoardId(Hpackage::PkgManager::PkgManagerPtr pkgManager, PackagesInfoPtr pkginfomanager);
26 int CheckVersion(Hpackage::PkgManager::PkgManagerPtr pkgManager, PackagesInfoPtr pkginfomanager);
27 int32_t UpdatePreProcess(Hpackage::PkgManager::PkgManagerPtr pkgManager);
34 int32_t DoUpdatePreProcess(Hpackage::PkgManager::PkgManagerPtr pkgManager);
Dupdater.h55 UpdaterStatus DoInstallUpdaterPackage(Hpackage::PkgManager::PkgManagerPtr pkgManager,
58 UpdaterStatus StartUpdaterProc(Hpackage::PkgManager::PkgManagerPtr pkgManager,
61 int GetUpdatePackageInfo(Hpackage::PkgManager::PkgManagerPtr pkgManager, const std::string& path);
64 bool PtableProcess(Hpackage::PkgManager::PkgManagerPtr pkgManager, PackageUpdateMode updateMode);
67 int ExecUpdate(Hpackage::PkgManager::PkgManagerPtr pkgManager, int retry, PostMessageFunction postM…
/base/update/sys_installer/services/ab_update/src/
Dab_update.cpp40 Hpackage::PkgManager::PkgManagerPtr pkgManager = Hpackage::PkgManager::GetPackageInstance(); in StartABUpdate() local
41 if (pkgManager == nullptr) { in StartABUpdate()
53 UpdaterStatus updateRet = DoInstallUpdaterPackage(pkgManager, upParams, HOTA_UPDATE); in StartABUpdate()
58 Hpackage::PkgManager::ReleasePackageInstance(pkgManager); in StartABUpdate()
65 Hpackage::PkgManager::ReleasePackageInstance(pkgManager); in StartABUpdate()
/base/update/updater/services/ptable_parse/
Dptable_manager.cpp52 void PtableManager::ReloadDevicePartition(Hpackage::PkgManager *pkgManager) in ReloadDevicePartition() argument
54 return LoadPartitionInfo(pkgManager); in ReloadDevicePartition()
226 void PackagePtable::LoadPartitionInfo([[maybe_unused]] Hpackage::PkgManager *pkgManager) in LoadPartitionInfo() argument
228 if (pkgManager == nullptr) { in LoadPartitionInfo()
248 if (!GetPtableBufferFromPkg(pkgManager, imageBuf, imgBufSize)) { in LoadPartitionInfo()
265 bool PackagePtable::GetPtableBufferFromPkg(Hpackage::PkgManager *pkgManager, uint8_t *&imageBuf, ui… in GetPtableBufferFromPkg() argument
267 if (pkgManager == nullptr) { in GetPtableBufferFromPkg()
273 const Hpackage::FileInfo *info = pkgManager->GetFileInfo(ptableName); in GetPtableBufferFromPkg()
279 (void)pkgManager->CreatePkgStream(outStream, ptableName, info->unpackedSize, in GetPtableBufferFromPkg()
286 if (pkgManager->ExtractFile(ptableName, outStream) != Hpackage::PKG_SUCCESS) { in GetPtableBufferFromPkg()
[all …]
Dptable_manager.h34 virtual void LoadPartitionInfo([[maybe_unused]] Hpackage::PkgManager *pkgManager = nullptr) = 0;
35 void ReloadDevicePartition(Hpackage::PkgManager *pkgManager);
70 void LoadPartitionInfo([[maybe_unused]] Hpackage::PkgManager *pkgManager = nullptr) override;
74 … bool GetPtableBufferFromPkg(Hpackage::PkgManager *pkgManager, uint8_t *&imageBuf, uint32_t size);
88 void LoadPartitionInfo([[maybe_unused]] Hpackage::PkgManager *pkgManager = nullptr) override;
/base/update/updater/test/unittest/script/script_instruction/
Dscript_registercmd_unittest.cpp54 TestPkgManager pkgManager; in TestRegisterCmd01() local
55 UTestScriptEnv env {&pkgManager}; in TestRegisterCmd01()
67 TestPkgManager pkgManager; in TestRegisterCmd02() local
68 UTestScriptEnv env {&pkgManager}; in TestRegisterCmd02()
81 TestPkgManager pkgManager; in TestRegisterCmd03() local
82 UTestScriptEnv env {&pkgManager}; in TestRegisterCmd03()
Dscript_updateprocesser_unittest.cpp34 …TestProcessorScriptEnv(Hpackage::PkgManager::PkgManagerPtr pkgManager) : UTestScriptEnv(pkgManager) in UTestProcessorScriptEnv() argument
73 TestPkgManager pkgManager; in TestUpdateProcesserSetProcess() local
74 UTestProcessorScriptEnv env {&pkgManager}; in TestUpdateProcesserSetProcess()
86 TestPkgManager pkgManager; in TestUpdateProcesserSetProcess() local
87 UTestProcessorScriptEnv env {&pkgManager}; in TestUpdateProcesserSetProcess()
106 TestPkgManager pkgManager; in TestUpdateProcesserShowProcess() local
107 UTestProcessorScriptEnv env {&pkgManager}; in TestUpdateProcesserShowProcess()
146 TestPkgManager pkgManager; in TestUpdateProcesserPrint() local
147 UTestProcessorScriptEnv env {&pkgManager}; in TestUpdateProcesserPrint()
Dscript_loadscript_unittest.cpp53 TestPkgManager pkgManager; in TestLoadScript01() local
54 UTestScriptEnv env {&pkgManager}; in TestLoadScript01()
67 TestPkgManager pkgManager; in TestLoadScript02() local
68 UTestScriptEnv env {&pkgManager}; in TestLoadScript02()
82 TestPkgManager pkgManager; in TestLoadScript03() local
83 UTestScriptEnv env {&pkgManager}; in TestLoadScript03()
Dscript_instruction_unittest.h21 explicit UTestScriptEnv(Hpackage::PkgManager::PkgManagerPtr pkgManager) : UScriptEnv(pkgManager) in UTestScriptEnv() argument
/base/update/updater/services/diffpatch/patch/
Dupdate_patch.cpp109 PkgManager* pkgManager = Hpackage::PkgManager::GetPackageInstance(); in ApplyBlockPatch() local
110 if (pkgManager == nullptr) { in ApplyBlockPatch()
116 int32_t ret = pkgManager->CreatePkgStream(stream, "", {oldInfo.buffer, oldInfo.length}); in ApplyBlockPatch()
119 pkgManager->ClosePkgStream(stream); in ApplyBlockPatch()
126 pkgManager->ClosePkgStream(stream); in ApplyBlockPatch()
130 pkgManager->ClosePkgStream(stream); in ApplyBlockPatch()
152 PkgManager* pkgManager = Hpackage::PkgManager::GetPackageInstance(); in ApplyBlockPatch() local
153 if (pkgManager == nullptr) { in ApplyBlockPatch()
159 ret = pkgManager->CreatePkgStream(stream, "", {oldInfo.buffer, oldInfo.length}); in ApplyBlockPatch()
162 pkgManager->ClosePkgStream(stream); in ApplyBlockPatch()
[all …]
Dimage_patch.cpp134 PkgManager* pkgManager = Hpackage::PkgManager::GetPackageInstance(); in DecompressData() local
135 PATCH_CHECK(pkgManager != nullptr, return -1, "Failed to get pkg manager"); in DecompressData()
145 ret = pkgManager->CreatePkgStream(stream, info->identity, in DecompressData()
149 ret = pkgManager->DecompressBuffer(info.get(), buffer, stream); in DecompressData()
150 PATCH_CHECK(ret == 0, pkgManager->ClosePkgStream(stream); return -1, "Can not decompress buff"); in DecompressData()
159 … PATCH_CHECK(ret == 0, pkgManager->ClosePkgStream(stream); return -1, "Can not get memory buff"); in DecompressData()
/base/update/updater/services/package/pkg_manager/
Dpkg_stream.h29 explicit PkgStreamImpl(PkgManager::PkgManagerPtr pkgManager, const std::string fileName) in PkgStreamImpl() argument
30 : fileName_(fileName), refCount_(0), pkgManager_(pkgManager) {} in PkgStreamImpl()
82 …FileStream(PkgManager::PkgManagerPtr pkgManager, const std::string fileName, FILE *stream, int32_t… in FileStream() argument
83 … : PkgStreamImpl(pkgManager, fileName), stream_(stream), fileLength_(0), streamType_(streamType) {} in FileStream()
110 …MemoryMapStream(PkgManager::PkgManagerPtr pkgManager, const std::string fileName, const PkgBuffer …
111 …int32_t streamType = PkgStreamType_MemoryMap) : PkgStreamImpl(pkgManager, fileName), memMap_(buffe… in PkgStreamImpl() argument
159 ProcessorStream(PkgManager::PkgManagerPtr pkgManager, const std::string fileName, in ProcessorStream() argument
161 : PkgStreamImpl(pkgManager, fileName), processor_(processor), context_(context) {} in ProcessorStream()
/base/update/updater/services/updater_binary/
Dupdate_processor.cpp190 int ExecUpdate(PkgManager::PkgManagerPtr pkgManager, int retry, PostMessageFunction postMessage) in ExecUpdate() argument
192 UpdaterEnv* env = new UpdaterEnv(pkgManager, postMessage, retry); in ExecUpdate()
271 PkgManager::PkgManagerPtr pkgManager = PkgManager::GetPackageInstance(); in ProcessUpdater() local
272 if (pkgManager == nullptr) { in ProcessUpdater()
281 int32_t ret = pkgManager->LoadPackage(packagePath, keyPath, components); in ProcessUpdater()
286 PkgManager::ReleasePackageInstance(pkgManager); in ProcessUpdater()
292 packagePtb.LoadPartitionInfo(pkgManager); in ProcessUpdater()
295 ret = Updater::ExecUpdate(pkgManager, retry, in ProcessUpdater()
301 PkgManager::ReleasePackageInstance(pkgManager); in ProcessUpdater()
/base/update/updater/services/include/applypatch/
Dupdater_env.h34 …UpdaterEnv(Hpackage::PkgManager::PkgManagerPtr pkgManager, PostMessageFunction postMessage, bool r… in UpdaterEnv() argument
35 : UScriptEnv(pkgManager), postMessage_(postMessage), isRetry_(retry) {} in UpdaterEnv()
/base/update/updater/test/unittest/package/
Dpkg_package_unittest.cpp44 explicit TestFile(PkgManager::PkgManagerPtr pkgManager, PkgStreamPtr stream) in TestFile() argument
45 : PkgFile(pkgManager, stream, PKG_TYPE_MAX) {} in TestFile()
193 PkgManager::PkgManagerPtr pkgManager = PkgManager::GetPackageInstance(); in TestUpdaterPreProcess() local
196 int32_t ret = pkgManager->LoadPackage(packagePath, Utils::GetCertName(), components); in TestUpdaterPreProcess()
202 pkgManager, "/version_list", "/data/updater/package/"); in TestUpdaterPreProcess()
205 … std::vector<std::string> boardIdList = pkginfomanager->GetBoardID(pkgManager, "/board_list", ""); in TestUpdaterPreProcess()
/base/update/updater/services/include/script/
Dscript_instruction.h32 UScriptEnv(Hpackage::PkgManager::PkgManagerPtr pkgManager) : pkgManager_(pkgManager) {} in UScriptEnv() argument
/base/update/updater/test/fuzztest/UpdaterStartUpdaterProc_fuzzer/
DUpdaterStartUpdaterProc_fuzzer.cpp149 PkgManager::PkgManagerPtr pkgManager = PkgManager::GetPackageInstance(); in StartUpdaterProcFun() local
151 pkgManager->LoadPackage(patch, GetTestCertName(), components); in StartUpdaterProcFun()
152 status = StartUpdaterProc(pkgManager, patch, 0, maxTemperature); in StartUpdaterProcFun()

12