diff --git a/bundle.json b/bundle.json index d81e5f73a9067cf8bbc51de3e9539ff9991670e6..e3b274cd9bb99a12abdf0386bb94e1c9f543a33f 100644 --- a/bundle.json +++ b/bundle.json @@ -37,6 +37,7 @@ "ipc", "init", "napi", + "os_account", "safwk", "samgr", "storage_service", @@ -49,10 +50,7 @@ "openssl" ] }, - "adapted_system_type": [ - "small", - "standard" - ], + "adapted_system_type": [ "small", "standard" ], "rom": "1024KB", "ram": "1024KB", "hisysevent_config": [ diff --git a/frameworks/native/backup_ext/src/untar_file.cpp b/frameworks/native/backup_ext/src/untar_file.cpp index 0eceb77654e578e01a9c35d288e635771ec49d83..b78a17d26503dd15632cd2726a3308a9ba42fed0 100644 --- a/frameworks/native/backup_ext/src/untar_file.cpp +++ b/frameworks/native/backup_ext/src/untar_file.cpp @@ -516,7 +516,7 @@ bool UntarFile::IsValidTarBlock(TarHeader &header) if (strncmp(header.magic, TMAGIC.c_str(), TMAGIC_LEN - 1) == 0 && VerifyChecksum(header)) { return true; } - HILOGW("Invalid tar block"); + HILOGE("Invalid tar block"); return false; } @@ -548,7 +548,7 @@ ErrFileInfo UntarFile::CreateDir(string &path, mode_t mode) path[len - 1] = '\0'; } if (access(path.c_str(), F_OK) != 0) { - HILOGW("directory does not exist, path:%{public}s, err = %{public}d", path.c_str(), errno); + HILOGE("directory does not exist, path:%{public}s, err = %{public}d", path.c_str(), errno); if (!ForceCreateDirectoryWithMode(path, mode)) { HILOGE("Failed to force create directory %{public}s, err = %{public}d", path.c_str(), errno); errFileInfo[path].push_back(errno); @@ -570,7 +570,7 @@ FILE *UntarFile::CreateFile(string &filePath) } uint32_t len = filePath.length(); - HILOGW("Failed to open file %{public}d, %{public}s, err = %{public}d", len, + HILOGE("Failed to open file %{public}d, %{public}s, err = %{public}d", len, GetAnonyPath(filePath).c_str(), errno); size_t pos = filePath.rfind('/'); if (pos == string::npos) { @@ -585,7 +585,7 @@ FILE *UntarFile::CreateFile(string &filePath) } f = fopen(filePath.c_str(), "wb+"); if (f == nullptr) { - HILOGE("Failed to create file %{public}s, err = %{public}d", GetAnonyPath(filePath).c_str(), errno); + HILOGE("Failed to open file %{public}s, err = %{public}d", GetAnonyPath(filePath).c_str(), errno); } } diff --git a/services/backup_sa/include/module_ipc/svc_session_manager.h b/services/backup_sa/include/module_ipc/svc_session_manager.h index fd8aaf4d3e794eddb885d07ca87dbbb50cb9369b..26cee6610ba54190efe2114d0dbb26890e091914 100644 --- a/services/backup_sa/include/module_ipc/svc_session_manager.h +++ b/services/backup_sa/include/module_ipc/svc_session_manager.h @@ -60,7 +60,7 @@ struct BackupExtInfo { /* Timer Status: true is start & false is stop */ bool extTimerStatus {false}; bool fwkTimerStatus {false}; - uint32_t timeout; + uint32_t timeout = BConstants::TIMEOUT_INVALID; uint32_t startTime; int64_t dataSize; int64_t lastIncrementalTime; diff --git a/services/backup_sa/src/module_external/bms_adapter.cpp b/services/backup_sa/src/module_external/bms_adapter.cpp index e1f415e89dfa100823f36734360d015f3d1f25f8..8a7f95baae8639348ed122a63020f7270a3a9c79 100644 --- a/services/backup_sa/src/module_external/bms_adapter.cpp +++ b/services/backup_sa/src/module_external/bms_adapter.cpp @@ -353,8 +353,8 @@ vector BundleMgrAdapter::GetBundleInfosForIncrement GetAllowAndExtName(installedBundle.extensionInfos); if (!allToBackup) { bundleInfos.emplace_back(BJsonEntityCaps::BundleInfo {installedBundle.name, installedBundle.appIndex, - installedBundle.versionCode, installedBundle.versionName, 0, 0, allToBackup, fullBackupOnly, extName, - restoreDeps, supportScene, extraInfo}); + installedBundle.versionCode, installedBundle.versionName, 0, 0, allToBackup, fullBackupOnly, + extName, restoreDeps, supportScene, extraInfo}); continue; } auto it = std::find_if(extraIncreData.begin(), extraIncreData.end(), diff --git a/services/backup_sa/src/module_ipc/service_incremental.cpp b/services/backup_sa/src/module_ipc/service_incremental.cpp index 628ff6185014b90881aaa510e6ef54be77d50ed8..7f289644d976ecd03fd8b1d92a20b7100683dccf 100644 --- a/services/backup_sa/src/module_ipc/service_incremental.cpp +++ b/services/backup_sa/src/module_ipc/service_incremental.cpp @@ -547,6 +547,7 @@ ErrCode Service::GetIncrementalFileHandle(const std::string &bundleName, const s { HITRACE_METER_NAME(HITRACE_TAG_FILEMANAGEMENT, __PRETTY_FUNCTION__); try { + HILOGI("Begin get incrementalFileHandle"); VerifyCaller(IServiceReverse::Scenario::RESTORE); auto action = session_->GetServiceSchedAction(bundleName); if (action == BConstants::ServiceSchedAction::RUNNING) { diff --git a/services/backup_sa/src/module_ipc/svc_restore_deps_manager.cpp b/services/backup_sa/src/module_ipc/svc_restore_deps_manager.cpp index 70879196a310d2eff12400e017c4bb4832d96ab4..682b0a2b4ecc6514ba7244c64fa014bf618c17cb 100644 --- a/services/backup_sa/src/module_ipc/svc_restore_deps_manager.cpp +++ b/services/backup_sa/src/module_ipc/svc_restore_deps_manager.cpp @@ -33,7 +33,7 @@ vector SvcRestoreDepsManager::GetRestoreBundleNames(const vector> errFileInfo); - /** + /* * * @brief 组建App进度返回的信息 - * * @param jsonStr 组建结果 * @param onProcessRet onProcess接口返回值 * @@ -128,6 +117,15 @@ public: */ static bool BuildOnProcessRetInfo(std::string &jsonStr, std::string onProcessRet); + /* * + * @brief 拼接包名和分身对应的索引 + * + * @param bundleName 包名 + * @param bundleIndex 索引 + * + * @return 拼接结果 + */ + static std::string BuildBundleNameIndexInfo(const std::string &bundleName, int bundleIndex); /** * @brief 组建App进度返回的信息 *