From dcc448f750af7a4db2bf6911bc29bffdf376fc08 Mon Sep 17 00:00:00 2001 From: chensihan Date: Tue, 29 Oct 2024 07:44:39 +0000 Subject: [PATCH 1/7] update frameworks/native/backup_ext/src/untar_file.cpp. Signed-off-by: chensihan --- frameworks/native/backup_ext/src/untar_file.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frameworks/native/backup_ext/src/untar_file.cpp b/frameworks/native/backup_ext/src/untar_file.cpp index 0eceb7765..b78a17d26 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); } } -- Gitee From a660a07a16995bb2d0429c13359c7ff9e63d7c56 Mon Sep 17 00:00:00 2001 From: chensihan Date: Tue, 29 Oct 2024 07:46:40 +0000 Subject: [PATCH 2/7] update bundle.json. Signed-off-by: chensihan --- bundle.json | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/bundle.json b/bundle.json index d81e5f73a..e3b274cd9 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": [ -- Gitee From dfcd67cf54161024e6c60d916b247c5b2da4d5a6 Mon Sep 17 00:00:00 2001 From: chensihan Date: Tue, 29 Oct 2024 07:48:18 +0000 Subject: [PATCH 3/7] update services/backup_sa/src/module_external/bms_adapter.cpp. Signed-off-by: chensihan --- services/backup_sa/src/module_external/bms_adapter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/backup_sa/src/module_external/bms_adapter.cpp b/services/backup_sa/src/module_external/bms_adapter.cpp index e1f415e89..8a7f95baa 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(), -- Gitee From 193431f5b1195a962f60ed1be35bd12b04cdb89e Mon Sep 17 00:00:00 2001 From: chensihan Date: Tue, 29 Oct 2024 07:49:32 +0000 Subject: [PATCH 4/7] update services/backup_sa/include/module_ipc/svc_session_manager.h. Signed-off-by: chensihan --- services/backup_sa/include/module_ipc/svc_session_manager.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 fd8aaf4d3..26cee6610 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; -- Gitee From e34e4bf412f12001267a47fe722627823793cca0 Mon Sep 17 00:00:00 2001 From: chensihan Date: Tue, 29 Oct 2024 07:51:54 +0000 Subject: [PATCH 5/7] update services/backup_sa/src/module_ipc/service_incremental.cpp. Signed-off-by: chensihan --- services/backup_sa/src/module_ipc/service_incremental.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/services/backup_sa/src/module_ipc/service_incremental.cpp b/services/backup_sa/src/module_ipc/service_incremental.cpp index 628ff6185..7f289644d 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) { -- Gitee From 6656d36e9a4af2ec0cb411d8e64c80c49aa6d1bd Mon Sep 17 00:00:00 2001 From: chensihan Date: Tue, 29 Oct 2024 07:52:57 +0000 Subject: [PATCH 6/7] update services/backup_sa/src/module_ipc/svc_restore_deps_manager.cpp. Signed-off-by: chensihan --- services/backup_sa/src/module_ipc/svc_restore_deps_manager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 70879196a..682b0a2b4 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 Date: Tue, 29 Oct 2024 08:01:06 +0000 Subject: [PATCH 7/7] update utils/include/b_jsonutil/b_jsonutil.h. Signed-off-by: chensihan --- utils/include/b_jsonutil/b_jsonutil.h | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/utils/include/b_jsonutil/b_jsonutil.h b/utils/include/b_jsonutil/b_jsonutil.h index 075816580..37c050a31 100644 --- a/utils/include/b_jsonutil/b_jsonutil.h +++ b/utils/include/b_jsonutil/b_jsonutil.h @@ -96,17 +96,7 @@ public: */ static bool BuildExtensionErrInfo(std::string &jsonStr, int errCode, std::string errMsg); - /** - * @brief 拼接包名和分身对应的索引 - * - * @param bundleName 包名 - * @param bundleIndex 索引 - * - * @return 拼接结果 - */ - static std::string BuildBundleNameIndexInfo(const std::string &bundleName, int bundleIndex); - - /** + /* * * @brief 组建恢复文件错误信息的json * * @param jsonStr 组建结果 @@ -117,9 +107,8 @@ public: */ static bool BuildExtensionErrInfo(std::string &jsonStr, std::map> 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进度返回的信息 * -- Gitee