/base/update/updater/services/ |
D | updater_preprocess.cpp | 39 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 …]
|
D | updater.cpp | 75 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 …]
|
D | updater_main.cpp | 123 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/ |
D | updater_unittest.cpp | 73 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/ |
D | update_partitions_unittest.cpp | 58 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);
|
D | update_image_block_test.cpp | 80 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);
|
D | updater_binary_unittest.cpp | 75 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()
|
D | update_binary_unittest.h | 25 …it UTestBinaryEnv(Hpackage::PkgManager::PkgManagerPtr pkgManager) : Uscript::UScriptEnv(pkgManager… in UTestBinaryEnv() argument
|
/base/update/updater/services/include/updater/ |
D | updater_preprocess.h | 23 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);
|
D | updater.h | 55 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/ |
D | ab_update.cpp | 40 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/ |
D | ptable_manager.cpp | 52 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 …]
|
D | ptable_manager.h | 34 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/ |
D | script_registercmd_unittest.cpp | 54 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()
|
D | script_updateprocesser_unittest.cpp | 34 …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()
|
D | script_loadscript_unittest.cpp | 53 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()
|
D | script_instruction_unittest.h | 21 explicit UTestScriptEnv(Hpackage::PkgManager::PkgManagerPtr pkgManager) : UScriptEnv(pkgManager) in UTestScriptEnv() argument
|
/base/update/updater/services/diffpatch/patch/ |
D | update_patch.cpp | 109 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 …]
|
D | image_patch.cpp | 134 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/ |
D | pkg_stream.h | 29 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/ |
D | update_processor.cpp | 190 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/ |
D | updater_env.h | 34 …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/ |
D | pkg_package_unittest.cpp | 44 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/ |
D | script_instruction.h | 32 UScriptEnv(Hpackage::PkgManager::PkgManagerPtr pkgManager) : pkgManager_(pkgManager) {} in UScriptEnv() argument
|
/base/update/updater/test/fuzztest/UpdaterStartUpdaterProc_fuzzer/ |
D | UpdaterStartUpdaterProc_fuzzer.cpp | 149 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()
|