/foundation/bundlemanager/bundle_framework/services/bundlemgr/include/ |
H A D | app_privilege_capability.h | 37 return "[ allowMultiProcess = " + BundleUtil::GetBoolStrVal(allowMultiProcess)
in ToString() 38 + ", allowQueryPriority = " + BundleUtil::GetBoolStrVal(allowQueryPriority)
in ToString() 39 + ", allowExcludeFromMissions = " + BundleUtil::GetBoolStrVal(allowExcludeFromMissions)
in ToString() 40 + ", allowMissionNotCleared = " + BundleUtil::GetBoolStrVal(allowMissionNotCleared)
in ToString() 41 + ", allowUsePrivilegeExtension = " + BundleUtil::GetBoolStrVal(allowUsePrivilegeExtension)
in ToString() 42 + ", userDataClearable = " + BundleUtil::GetBoolStrVal(userDataClearable)
in ToString() 43 + ", hideDesktopIcon = " + BundleUtil::GetBoolStrVal(hideDesktopIcon)
in ToString() 44 + ", formVisibleNotify = " + BundleUtil::GetBoolStrVal(formVisibleNotify)
in ToString() 45 + ", appShareLibrary = " + BundleUtil::GetBoolStrVal(appShareLibrary)
in ToString() 46 + ", allowEnableNotification = " + BundleUtil in ToString() [all...] |
/foundation/bundlemanager/bundle_framework/services/bundlemgr/src/ |
H A D | bundle_stream_installer_host_impl.cpp | 44 std::string tempDir = BundleUtil::CreateInstallTempDir(installerId_, DirType::STREAM_INSTALL_DIR); in Init() 54 tempDir = BundleUtil::CreateSharedBundleTempDir(installerId_, i); in Init() 64 tempSignatureFileDir_ = BundleUtil::CreateInstallTempDir(installerId_, DirType::SIG_FILE_DIR); in Init() 70 tempPgoFileDir_ = BundleUtil::CreateInstallTempDir(installerId_, DirType::PGO_FILE_DIR); in Init() 83 BundleUtil::CloseFileDescriptor(streamFdVec_); in UnInit() 84 BundleUtil::DeleteDir(tempDir_); in UnInit() 86 BundleUtil::DeleteDir(path); in UnInit() 88 BundleUtil::DeleteDir(tempSignatureFileDir_); in UnInit() 89 BundleUtil::DeleteDir(tempPgoFileDir_); in UnInit() 120 if (!BundleUtil in CreateStream() [all...] |
H A D | bundle_util.cpp | 69 std::mutex BundleUtil::g_mutex; 71 ErrCode BundleUtil::CheckFilePath(const std::string &bundlePath, std::string &realPath) in CheckFilePath() 99 ErrCode BundleUtil::CheckFilePath(const std::vector<std::string> &bundlePaths, std::vector<std::string> &realPaths) in CheckFilePath() 146 bool BundleUtil::CheckFileType(const std::string &fileName, const std::string &extensionName) in CheckFileType() 163 bool BundleUtil::CheckFileName(const std::string &fileName) in CheckFileName() 176 bool BundleUtil::CheckFileSize(const std::string &bundlePath, const int64_t fileSize) in CheckFileSize() 190 bool BundleUtil::CheckSystemSize(const std::string &bundlePath, const std::string &diskPath) in CheckSystemSize() 210 bool BundleUtil::CheckSystemFreeSize(const std::string &path, int64_t size) in CheckSystemFreeSize() 221 bool BundleUtil::CheckSystemSizeAndHisysEvent(const std::string &path, const std::string &fileName) in CheckSystemSizeAndHisysEvent() 232 bool BundleUtil [all...] |
H A D | event_report.cpp | 77 eventInfo.timeStamp = BundleUtil::GetCurrentTimeMs(); in SendScanSysEvent() 84 eventInfo.timeStamp = BundleUtil::GetCurrentTimeMs(); in SendUserSysEvent() 170 eventInfo.timeStamp = BundleUtil::GetCurrentTimeMs(); in SendCpuSceneEvent()
|
/foundation/bundlemanager/bundle_framework_lite/services/bundlemgr_lite/src/ |
H A D | gt_bundle_installer.cpp | 54 if (!BundleUtil::IsFile(path)) { in PreCheckBundle() 58 fileSize = BundleUtil::GetFileSize(path); in PreCheckBundle() 79 if (!BundleUtil::StartWith(signatureInfo.appId, bundleName)) { in PreCheckBundle() 188 if (BundleUtil::StartWith(path, SYSTEM_BUNDLE_PATH)) { in Install() 190 } else if (BundleUtil::StartWith(path, THIRD_SYSTEM_BUNDLE_PATH)) { in Install() 196 BundleUtil::CreateRandStr(randStr, RADN_NUM); in Install() 277 char *tmpCodePath = BundleUtil::Strscat(tmpCodePathComp, sizeof(tmpCodePathComp) / sizeof(char *)); in ProcessBundleInstall() 333 char *srcRawFilePath = BundleUtil::Strscat(srcRawFilePathComp, sizeof(srcRawFilePathComp) / sizeof(char *)); in MoveRawFileToDataPath() 339 if (!BundleUtil::IsDir(srcRawFilePath)) { in MoveRawFileToDataPath() 346 char *dstRawFilePath = BundleUtil in MoveRawFileToDataPath() [all...] |
H A D | bundle_util.cpp | 76 bool BundleUtil::CheckRealPath(const char *path) in CheckRealPath() 106 bool BundleUtil::IsFile(const char *path) in IsFile() 130 bool BundleUtil::IsDir(const char *path) in IsDir() 152 bool BundleUtil::EndWith(const char *str, const char *subStr) in EndWith() 174 bool BundleUtil::StartWith(const char *str, const char *subStr) in StartWith() 196 bool BundleUtil::IsDigitStr(const char *str) in IsDigitStr() 204 uint32_t BundleUtil::GetFileSize(const char *filePath) in GetFileSize() 223 uint32_t BundleUtil::GetFileFolderSize(const char *filePath) in GetFileFolderSize() 260 uint32_t BundleUtil::GetCurrentFolderSize(const char *dirPath, List<char *>* list) in GetCurrentFolderSize() 302 void BundleUtil [all...] |
H A D | bundle_res_transform.cpp | 42 if (!BundleUtil::IsFile(resPath.c_str())) { in ConvertResInfoToBundleInfo() 81 if (!BundleUtil::IsFile(path.c_str())) { in ConvertIconResToBundleInfo() 93 if (!BundleUtil::IsFile(iconPath.c_str())) { in ConvertIconResToBundleInfo() 121 if (!BundleUtil::IsFile(path.c_str())) { in ConvertLableResToBundleInfo() 153 if (!BundleUtil::IsFile(path.c_str())) { in ConvertDesResIdToBundleInfo()
|
H A D | bundle_manager_service.cpp | 338 if (!BundleUtil::IsFile(systemAppPath.c_str()) || in InstallSystemBundle() 339 !BundleUtil::EndWith(systemAppPath.c_str(), INSTALL_FILE_SUFFIX)) { in InstallSystemBundle() 352 if (!BundleUtil::IsDir(JSON_PATH)) { in ScanPackages() 359 cJSON *uninstallRecord = BundleUtil::GetJsonStream(UNINSTALL_THIRD_SYSTEM_BUNDLE_JSON); in ScanPackages() 375 if (BundleUtil::IsDir(EXTEANAL_INSTALL_PATH)) { in ScanPackages() 400 if (!BundleUtil::IsDir(appPath.c_str())) { in ScanAppDir() 431 if (!BundleUtil::EndWith(appPath, INSTALL_FILE_SUFFIX)) { in CheckSystemBundleIsValid() 461 bool res = BundleUtil::CheckBundleJsonIsValid(bundleName, &codePath, &appId, oldVersionCode); in ReloadEntireBundleInfo() 498 int32_t uid = BundleUtil::GetValueFromBundleJson(bundleName, JSON_SUB_KEY_UID, INVALID_UID); in ReloadBundleInfo() 531 BundleUtil in ReloadBundleInfo() [all...] |
H A D | gt_bundle_manager_service.cpp | 94 (void) BundleUtil::RemoveDir(TMP_RESOURCE_DIR); in Install() 123 (void) BundleUtil::RemoveDir(TMP_RESOURCE_DIR); in Install() 164 (void) BundleUtil::RemoveDir(TMP_RESOURCE_DIR); in Install() 266 uint32_t codeBundleSize = BundleUtil::GetFileFolderSize(codePath); in GetBundleSize() 272 uint32_t dataBundleSize = BundleUtil::GetFileFolderSize(dataPath); in GetBundleSize() 425 if (!BundleUtil::IsDir(JSON_PATH_NO_SLASH_END)) { in InstallPreBundle() 426 BundleUtil::MkDirs(JSON_PATH_NO_SLASH_END); in InstallPreBundle() 432 cJSON *uninstallRecord = BundleUtil::GetJsonStream(UNINSTALL_THIRD_SYSTEM_BUNDLE_JSON); in InstallPreBundle() 456 if (!BundleUtil::IsFile(toBeInstalledApp->path) || in InstallPreBundle() 457 !BundleUtil in InstallPreBundle() [all...] |
H A D | bundle_info_creator.cpp | 131 if (bundleProfile.iconPath != nullptr && !BundleUtil::StartWith(bundleProfile.iconPath, in SetBundleInfo() 145 if ((bundleProfile.label != nullptr) && !BundleUtil::StartWith(bundleProfile.label, DEFAULT_LABEL_SETTING)) { in SetBundleInfo() 195 !BundleUtil::StartWith(bundleProfile.moduleInfo.description, DEFAULT_DESC_SETTING)) { in SetModuleInfos() 253 !BundleUtil::StartWith(bundleProfile.abilityInfos[index].iconPath, DEFAULT_ICON_SETTING_BEGIN)) { in SetAbilityInfo() 267 !BundleUtil::StartWith(bundleProfile.abilityInfos[index].description, DEFAULT_DESC_SETTING)) { in SetAbilityInfo() 275 !BundleUtil::StartWith(bundleProfile.abilityInfos[index].label, DEFAULT_LABEL_SETTING)) { in SetAbilityInfo()
|
H A D | gt_bundle_parser.cpp | 95 if (!BundleUtil::CheckRealPath(path)) { in ParseBundleAttr() 99 uint32_t totalFileSize = BundleUtil::GetFileSize(path); in ParseBundleAttr() 152 if (!BundleUtil::CheckRealPath(path) || bundleRes == nullptr) { in ParseHapProfile() 161 cJSON *root = BundleUtil::GetJsonStream(profilePath); in ParseHapProfile() 326 if (BundleUtil::StartWith(bundleProfile.label, DEFAULT_LABEL_SETTING)) { in ParseAbilityInfo() 614 jsPath = BundleUtil::Strscat(jsPathComp, sizeof(jsPathComp) / sizeof(char *)); in CreateBundleInfo() 617 jsPath = BundleUtil::Strscat(jsPathComp, sizeof(jsPathComp) / sizeof(char *)); in CreateBundleInfo() 653 char *resPath = BundleUtil::Strscat(resPathComp, sizeof(resPathComp) / sizeof(char *)); in ConvertResInfoToBundleInfo() 657 if (!BundleUtil::IsFile(resPath)) { in ConvertResInfoToBundleInfo() 710 char *bigIconPath = BundleUtil in ConvertIconResToBundleInfo() [all...] |
H A D | gt_bundle_extractor.cpp | 161 (!BundleUtil::StartWith(relativeFilePath, ASSET_JS_PATH) && in ExtractResourceFile() 162 !BundleUtil::StartWith(relativeFilePath, NEW_ASSET_JS_PATH))) { in ExtractResourceFile() 192 if (!BundleUtil::CheckRealPath(path)) { in ExtractInstallMsg() 202 int32_t totalFileSize = BundleUtil::GetFileSize(path); in ExtractInstallMsg() 282 if (!BundleUtil::CheckRealPath(path)) { in ExtractBundleParam()
|
H A D | bundle_installer.cpp | 96 if (BundleUtil::StartWith(path, SYSTEM_BUNDLE_PATH)) { in GetHapType() 98 } else if (BundleUtil::StartWith(path, THIRD_SYSTEM_BUNDLE_PATH)) { in GetHapType() 114 BundleUtil::CreateRandStr(randStr, RAND_NUM); in Install() 462 if (!BundleUtil::DeleteUidInfoFromJson(bundleName)) { in Uninstall() 482 cJSON *object = BundleUtil::ConvertUidAndGidToJson(record); in BackUpUidAndGidInfo() 508 if (!BundleUtil::EndWith(path, INSTALL_FILE_SUFFIX)) { in CheckInstallFileIsValid() 512 if (!BundleUtil::IsFile(path)) { in CheckInstallFileIsValid() 516 if (BundleUtil::GetFileSize(path) == 0) { in CheckInstallFileIsValid() 528 cJSON *root = BundleUtil::GetJsonStream(THIRD_SYSTEM_BUNDLE_JSON); in CheckIsThirdSystemBundle() 561 if (!BundleUtil in RecordThirdSystemBundle() [all...] |
H A D | bundle_parser.cpp | 179 if (!BundleUtil::CheckRealPath(path)) { in ParseBundleParam() 183 if (!BundleUtil::EndWith(path, INSTALL_FILE_SUFFIX)) { in ParseBundleParam() 187 if (!BundleUtil::IsFile(path)) { in ParseBundleParam() 228 if (!BundleUtil::CheckRealPath(path)) { in ParseHapProfile() 233 cJSON *root = BundleUtil::GetJsonStream(profilePath.c_str()); in ParseHapProfile() 263 if (BundleUtil::StartWith(path, INSTALL_PATH)) { in ParseHapProfile() 451 if (BundleUtil::StartWith(bundleProfile.moduleInfo.description, DEFAULT_DESC_SETTING)) { in ParseModuleDesc() 737 if (BundleUtil::StartWith(bundleProfile.abilityInfos[index].description, DEFAULT_DESC_SETTING)) { in ParseAbilityDesc() 761 if (BundleUtil::StartWith(bundleProfile.abilityInfos[index].iconPath, DEFAULT_ICON_SETTING_BEGIN)) { in ParseAbilityIcon() 781 if (BundleUtil in ParseAbilityLabel() [all...] |
H A D | gt_extractor_util.cpp | 215 if (!BundleUtil::MkDirs(destPath)) { in HasWrittenFile() 239 if (!BundleUtil::CheckRealPath(filePath)) { in HasCopiedData()
|
/foundation/bundlemanager/bundle_framework/services/bundlemgr/src/verify/ |
H A D | verify_manager_host_impl.cpp | 75 if (BundleUtil::StartWith(path, DATA_STORAGE_EL1_BASE)) { in GetDataDir() 82 if (BundleUtil::StartWith(path, DATA_STORAGE_EL1_DATABASE)) { in GetDataDir() 89 if (BundleUtil::StartWith(path, DATA_STORAGE_EL2_BASE)) { in GetDataDir() 96 if (BundleUtil::StartWith(path, DATA_STORAGE_EL2_DATABASE)) { in GetDataDir() 103 if (BundleUtil::StartWith(path, DATA_STORAGE_EL3_BASE)) { in GetDataDir() 110 if (BundleUtil::StartWith(path, DATA_STORAGE_EL3_DATABASE)) { in GetDataDir() 117 if (BundleUtil::StartWith(path, DATA_STORAGE_EL4_BASE)) { in GetDataDir() 124 if (BundleUtil::StartWith(path, DATA_STORAGE_EL4_DATABASE)) { in GetDataDir() 159 int32_t userId = BundleUtil::GetUserIdByCallingUid(); in Verify() 249 if (!BundleUtil in GetRealPath() [all...] |
/foundation/bundlemanager/bundle_framework_lite/services/bundlemgr_lite/include/ |
H A D | gt_bundle_installer.h | 84 BundleUtil::FreeStrArrayMemory(signatureInfo.restricPermission, signatureInfo.restricNum); \ 99 BundleUtil::RemoveDir(bundleInfo->codePath); \ 100 BundleUtil::RemoveDir(bundleInfo->dataPath); \ 108 BundleUtil::RemoveDir(path); \ 123 BundleUtil::DeleteJsonFile(bundleInfo->bundleName, randStr); \
|
H A D | bundle_util.h | 37 class BundleUtil { class 68 BundleUtil() = default; 69 ~BundleUtil() = default;
|
/foundation/bundlemanager/bundle_framework/services/bundlemgr/src/quick_fix/ |
H A D | quick_fix_manager_host_impl.cpp | 126 if (!BundleUtil::CheckFileType(fileName, ServiceConstants::QUICK_FIX_FILE_SUFFIX)) { in CreateFd() 134 std::string tmpDir = BundleUtil::CreateInstallTempDir(++id_, DirType::QUICK_FIX_DIR); in CreateFd() 140 if ((fd = BundleUtil::CreateFileDescriptor(path, 0)) < 0) { in CreateFd() 142 BundleUtil::DeleteDir(tmpDir); in CreateFd() 193 if (!BundleUtil::CreateDir(secureDir)) { in CopyHqfToSecurityDir() 198 if (!BundleUtil::CopyFile(path, securityPath)) { in CopyHqfToSecurityDir() 204 BundleUtil::DeleteDir(prefixStr); in CopyHqfToSecurityDir()
|
H A D | quick_fix_boot_scanner.cpp | 192 if (!BundleUtil::CreateDir(destinationDir)) { in ReprocessQuickFix() 293 BundleUtil::DeleteDir(tempInstallDir); in RemoveInvalidDir() 294 BundleUtil::DeleteDir(tempQuickFixDir); in RemoveInvalidDir() 295 BundleUtil::DeleteDir(tempSecureInstallDir); in RemoveInvalidDir() 296 BundleUtil::DeleteDir(tempSecureQuickFixDir); in RemoveInvalidDir() 297 BundleUtil::DeleteDir(tempSignatureFileDir); in RemoveInvalidDir() 298 BundleUtil::DeleteDir(tempSecureSignatureFileDir); in RemoveInvalidDir()
|
/foundation/bundlemanager/bundle_framework/services/bundlemgr/src/overlay/ |
H A D | bundle_overlay_manager_host_impl.cpp | 59 userId = BundleUtil::GetUserIdByCallingUid();
in GetAllOverlayModuleInfo() 82 userId = BundleUtil::GetUserIdByCallingUid();
in GetOverlayModuleInfo() 105 userId = BundleUtil::GetUserIdByCallingUid();
in GetOverlayModuleInfo() 130 userId = BundleUtil::GetUserIdByCallingUid();
in GetTargetOverlayModuleInfo() 156 userId = BundleUtil::GetUserIdByCallingUid();
in GetOverlayModuleInfoByBundleName() 196 userId = BundleUtil::GetUserIdByCallingUid();
in GetOverlayBundleInfoForTarget() 220 userId = BundleUtil::GetUserIdByCallingUid();
in GetOverlayModuleInfoForTarget() 248 userId = BundleUtil::GetUserIdByCallingUid();
in SetOverlayEnabledForSelf() 271 userId = BundleUtil::GetUserIdByCallingUid();
in SetOverlayEnabled()
|
/foundation/bundlemanager/bundle_framework/services/bundlemgr/src/extend_resource/ |
H A D | extend_resource_manager_host_impl.cpp | 145 if (!BundleUtil::CheckFileType(filePath, EXT_RESOURCE_FILE_SUFFIX)) { in CheckFileParam() 149 if (!BundleUtil::StartWith(filePath, ServiceConstants::HAP_COPY_PATH)) { in CheckFileParam() 650 if (!BundleUtil::CheckFileType(fileName, EXT_RESOURCE_FILE_SUFFIX)) { in CreateFd() 658 std::string tmpDir = BundleUtil::CreateInstallTempDir( in CreateFd() 665 if ((fd = BundleUtil::CreateFileDescriptor(path, 0)) < 0) { in CreateFd() 667 BundleUtil::DeleteDir(tmpDir); in CreateFd()
|
/foundation/bundlemanager/bundle_framework/services/bundlemgr/src/aging/ |
H A D | aging_util.cpp | 26 return BundleUtil::GetCurrentTimeMs(); in GetNowSysTimeMs()
|
/foundation/bundlemanager/bundle_framework/services/bundlemgr/src/default_app/ |
H A D | default_app_mgr.cpp | 124 LOG_I(BMS_TAG_DEFAULT, "normalized:%{public}s", BundleUtil::ToString(normalizedTypeVector).c_str()); in IsDefaultApplication() 193 LOG_I(BMS_TAG_DEFAULT, "normalized:%{public}s", BundleUtil::ToString(normalizedTypeVector).c_str()); in GetDefaultApplication() 234 LOG_I(BMS_TAG_DEFAULT, "normalized:%{public}s", BundleUtil::ToString(normalizedTypeVector).c_str()); in SetDefaultApplication() 309 LOG_I(BMS_TAG_DEFAULT, "normalized:%{public}s", BundleUtil::ToString(normalizedTypeVector).c_str()); in ResetDefaultApplication() 828 if (BundleUtil::IsUtd(param)) { in Normalize() 829 if (BundleUtil::IsSpecificUtd(param)) { in Normalize() 835 return BundleUtil::GetUtdVectorByMimeType(param); in Normalize()
|
/foundation/bundlemanager/bundle_framework/services/bundlemgr/src/shared/ |
H A D | inner_shared_bundle_installer.cpp | 43 BundleUtil::DeleteTempDirs(toDeleteTempHspPath_); in ~InnerSharedBundleInstaller() 53 result = BundleUtil::CheckFilePath({sharedBundlePath_}, inBundlePaths); in ParseFiles() 495 eventInfo.timeStamp = BundleUtil::GetCurrentTimeMs(); in GetInstallEventInfo() 536 auto destination = BundleUtil::CopyFileToSecurityDir(bundlePaths[index], DirType::STREAM_INSTALL_DIR, in CopyHspToSecurityDir() 555 if (!BundleUtil::EndWith(inBundlePaths[0], ServiceConstants::HSP_FILE_SUFFIX)) { in ObtainHspFileAndSignatureFilePath() 570 if (BundleUtil::EndWith(path, ServiceConstants::HSP_FILE_SUFFIX)) { in ObtainHspFileAndSignatureFilePath() 574 if (BundleUtil::EndWith(path, ServiceConstants::CODE_SIGNATURE_FILE_SUFFIX)) { in ObtainHspFileAndSignatureFilePath()
|