diff --git a/OAT.xml b/OAT.xml
index 9705a1cbe38d1ac277d21d688189b738b49a37d6..b2d6cd8c0c930f42958053099d8b01e13d469b4d 100644
--- a/OAT.xml
+++ b/OAT.xml
@@ -1325,6 +1325,11 @@ Note:If the text contains special characters, please escape them according to th
+
+
+
+
+
diff --git a/code/DocsSample/Account/ManageDistributedAccount/.gitignore b/code/DocsSample/Account/ManageDistributedAccount/.gitignore
new file mode 100755
index 0000000000000000000000000000000000000000..d2ff20141ceed86d87c0ea5d99481973005bab2b
--- /dev/null
+++ b/code/DocsSample/Account/ManageDistributedAccount/.gitignore
@@ -0,0 +1,12 @@
+/node_modules
+/oh_modules
+/local.properties
+/.idea
+**/build
+/.hvigor
+.cxx
+/.clangd
+/.clang-format
+/.clang-tidy
+**/.test
+/.appanalyzer
\ No newline at end of file
diff --git a/code/DocsSample/Account/ManageDistributedAccount/AppScope/app.json5 b/code/DocsSample/Account/ManageDistributedAccount/AppScope/app.json5
new file mode 100755
index 0000000000000000000000000000000000000000..d29a0bbcc3b700667e271dd826559159548776a1
--- /dev/null
+++ b/code/DocsSample/Account/ManageDistributedAccount/AppScope/app.json5
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 2025 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+{
+ "app": {
+ "bundleName": "com.sample.managedistributedaccount",
+ "vendor": "example",
+ "versionCode": 1000000,
+ "versionName": "1.0.0",
+ "icon": "$media:app_icon",
+ "label": "$string:app_name"
+ }
+}
diff --git a/code/DocsSample/Account/ManageDistributedAccount/AppScope/resources/base/element/string.json b/code/DocsSample/Account/ManageDistributedAccount/AppScope/resources/base/element/string.json
new file mode 100755
index 0000000000000000000000000000000000000000..975d8e8814253333cdc926c9c61809fb63ef2808
--- /dev/null
+++ b/code/DocsSample/Account/ManageDistributedAccount/AppScope/resources/base/element/string.json
@@ -0,0 +1,8 @@
+{
+ "string": [
+ {
+ "name": "app_name",
+ "value": "ManageDistributedAccount"
+ }
+ ]
+}
diff --git a/code/DocsSample/Account/ManageDistributedAccount/AppScope/resources/base/media/app_icon.png b/code/DocsSample/Account/ManageDistributedAccount/AppScope/resources/base/media/app_icon.png
new file mode 100755
index 0000000000000000000000000000000000000000..a39445dc87828b76fed6d2ec470dd455c45319e3
Binary files /dev/null and b/code/DocsSample/Account/ManageDistributedAccount/AppScope/resources/base/media/app_icon.png differ
diff --git a/code/DocsSample/Account/ManageDistributedAccount/README.md b/code/DocsSample/Account/ManageDistributedAccount/README.md
new file mode 100755
index 0000000000000000000000000000000000000000..6bcc151f9f88d2e532770af8c46006975994b43f
--- /dev/null
+++ b/code/DocsSample/Account/ManageDistributedAccount/README.md
@@ -0,0 +1,71 @@
+# 管理分布式账号(仅对系统应用开放)
+
+### 介绍
+
+1.OEM厂商可以通过[分布式账号SDK](https://gitee.com/openharmony/docs/blob/OpenHarmony-5.0.1-Release/zh-cn/application-dev/reference/apis-basic-services-kit/js-apis-distributed-account.md)将自有账号与本地系统账号建立关联关系。
+
+2.实现对以下指南文档中 [zh-cn/application-dev/basic-services/account/manage-distributed-account.md · OpenHarmony/docs - Gitee.com](https://gitee.com/openharmony/docs/blob/OpenHarmony-5.0.1-Release/zh-cn/application-dev/basic-services/account/manage-distributed-account.md) 示例代码片段的工程化,保证指南中示例代码与sample工程文件同源。
+
+### 效果预览
+
+| 首页 | 执行在当前系统账号上登录绑定分布式账号 |
+| :----------------------------------------------------------: | :----------------------------------------------------------: |
+|
|
|
+| **执行在当前系统账号上登出解绑分布式账号** | **执行在指定的系统账号上登录绑定分布式账号** |
+|
|
|
+| **执行在指定系统账号上登出解绑分布式账号** | |
+|
| |
+
+### 使用说明
+
+1. 在主界面,点击'在当前系统账号上登录绑定分布式账号',执行在当前系统账号上登录绑定分布式账号。
+2. 点击'在当前系统账号上登出解绑分布式账号',执行在当前系统账号上登出解绑分布式账号。
+3. 点击'在指定的系统账号上登录绑定分布式账号',执行在指定的系统账号上登录绑定分布式账号。
+4. 点击'在指定系统账号上登出解绑分布式账号',执行在指定系统账号上登出解绑分布式账号。
+5. 执行结果会即时反馈在屏幕中央,并在控制台打印log。
+
+### 工程目录
+
+```
+entry/src/
+ ├── main
+ │ ├── ets
+ │ │ ├── entryability
+ │ │ ├── entrybackupability
+ │ │ └── pages
+ │ │ └── Index.ets // 管理分布式账号示例代码
+ │ ├── module.json5
+ │ └── resources
+ ├── ohosTest
+ │ ├── ets
+ │ │ └── test
+ │ │ └── Ability.test.ets // 自动化测试代码
+```
+
+### 相关权限
+
+ohos.permission.MANAGE_DISTRIBUTED_ACCOUNTS
+
+### 依赖
+
+不涉及。
+
+### 约束与限制
+
+1.本示例仅支持标准系统上运行, 支持设备:RK3568。
+
+2.本示例为Stage模型,支持API14版本SDK,版本号:5.0.2.57,镜像版本号:OpenHarmony_5.0.2.58。
+
+3.本示例需要使用DevEco Studio 5.0.1 Release (Build Version: 5.0.5.306, built on December 6, 2024)及以上版本才可编译运行。
+
+### 下载
+
+如需单独下载本工程,执行如下命令:
+
+````
+git init
+git config core.sparsecheckout true
+echo code/DocsSample/Account/ManageDistributedAccount > .git/info/sparse-checkout
+git remote add origin https://gitee.com/openharmony/applications_app_samples.git
+git pull origin master
+````
\ No newline at end of file
diff --git a/code/DocsSample/Account/ManageDistributedAccount/build-profile.json5 b/code/DocsSample/Account/ManageDistributedAccount/build-profile.json5
new file mode 100755
index 0000000000000000000000000000000000000000..3c1dc3a4c625f2ec0629fbb2c33a841fa39111e6
--- /dev/null
+++ b/code/DocsSample/Account/ManageDistributedAccount/build-profile.json5
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2025 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+{
+ "app": {
+ "signingConfigs": [],
+ "products": [
+ {
+ "name": "default",
+ "signingConfig": "default",
+ "compatibleSdkVersion": 14,
+ "compileSdkVersion": 14,
+ "targetSdkVersion": 14,
+ "runtimeOS": "OpenHarmony",
+ }
+ ],
+ "buildModeSet": [
+ {
+ "name": "debug",
+ },
+ {
+ "name": "release"
+ }
+ ]
+ },
+ "modules": [
+ {
+ "name": "entry",
+ "srcPath": "./entry",
+ "targets": [
+ {
+ "name": "default",
+ "applyToProducts": [
+ "default"
+ ]
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file
diff --git a/code/DocsSample/Account/ManageDistributedAccount/code-linter.json5 b/code/DocsSample/Account/ManageDistributedAccount/code-linter.json5
new file mode 100755
index 0000000000000000000000000000000000000000..28586467ee7a761c737d8654a73aed6fddbc3c71
--- /dev/null
+++ b/code/DocsSample/Account/ManageDistributedAccount/code-linter.json5
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2025 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+{
+ "files": [
+ "**/*.ets"
+ ],
+ "ignore": [
+ "**/src/ohosTest/**/*",
+ "**/src/test/**/*",
+ "**/src/mock/**/*",
+ "**/node_modules/**/*",
+ "**/oh_modules/**/*",
+ "**/build/**/*",
+ "**/.preview/**/*"
+ ],
+ "ruleSet": [
+ "plugin:@performance/recommended",
+ "plugin:@typescript-eslint/recommended"
+ ],
+ "rules": {
+ }
+}
\ No newline at end of file
diff --git a/code/DocsSample/Account/ManageDistributedAccount/entry/.gitignore b/code/DocsSample/Account/ManageDistributedAccount/entry/.gitignore
new file mode 100755
index 0000000000000000000000000000000000000000..e2713a2779c5a3e0eb879efe6115455592caeea5
--- /dev/null
+++ b/code/DocsSample/Account/ManageDistributedAccount/entry/.gitignore
@@ -0,0 +1,6 @@
+/node_modules
+/oh_modules
+/.preview
+/build
+/.cxx
+/.test
\ No newline at end of file
diff --git a/code/DocsSample/Account/ManageDistributedAccount/entry/build-profile.json5 b/code/DocsSample/Account/ManageDistributedAccount/entry/build-profile.json5
new file mode 100755
index 0000000000000000000000000000000000000000..b4d65d490ef6cbe22d933b9231555210f1555786
--- /dev/null
+++ b/code/DocsSample/Account/ManageDistributedAccount/entry/build-profile.json5
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2025 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+{
+ "apiType": "stageMode",
+ "buildOption": {
+ },
+ "buildOptionSet": [
+ {
+ "name": "release",
+ "arkOptions": {
+ "obfuscation": {
+ "ruleOptions": {
+ "enable": false,
+ "files": [
+ "./obfuscation-rules.txt"
+ ]
+ }
+ }
+ }
+ },
+ ],
+ "targets": [
+ {
+ "name": "default"
+ },
+ {
+ "name": "ohosTest",
+ }
+ ]
+}
\ No newline at end of file
diff --git a/code/DocsSample/Account/ManageDistributedAccount/entry/hvigorfile.ts b/code/DocsSample/Account/ManageDistributedAccount/entry/hvigorfile.ts
new file mode 100755
index 0000000000000000000000000000000000000000..e4f43d54667f8327c367c8096bd08bb8c75aff54
--- /dev/null
+++ b/code/DocsSample/Account/ManageDistributedAccount/entry/hvigorfile.ts
@@ -0,0 +1,21 @@
+/*
+ * Copyright (c) 2025 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { hapTasks } from '@ohos/hvigor-ohos-plugin';
+
+export default {
+ system: hapTasks, /* Built-in plugin of Hvigor. It cannot be modified. */
+ plugins:[] /* Custom plugin to extend the functionality of Hvigor. */
+}
diff --git a/code/DocsSample/Account/ManageDistributedAccount/entry/obfuscation-rules.txt b/code/DocsSample/Account/ManageDistributedAccount/entry/obfuscation-rules.txt
new file mode 100755
index 0000000000000000000000000000000000000000..272efb6ca3f240859091bbbfc7c5802d52793b0b
--- /dev/null
+++ b/code/DocsSample/Account/ManageDistributedAccount/entry/obfuscation-rules.txt
@@ -0,0 +1,23 @@
+# Define project specific obfuscation rules here.
+# You can include the obfuscation configuration files in the current module's build-profile.json5.
+#
+# For more details, see
+# https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/source-obfuscation-V5
+
+# Obfuscation options:
+# -disable-obfuscation: disable all obfuscations
+# -enable-property-obfuscation: obfuscate the property names
+# -enable-toplevel-obfuscation: obfuscate the names in the global scope
+# -compact: remove unnecessary blank spaces and all line feeds
+# -remove-log: remove all console.* statements
+# -print-namecache: print the name cache that contains the mapping from the old names to new names
+# -apply-namecache: reuse the given cache file
+
+# Keep options:
+# -keep-property-name: specifies property names that you want to keep
+# -keep-global-name: specifies names that you want to keep in the global scope
+
+-enable-property-obfuscation
+-enable-toplevel-obfuscation
+-enable-filename-obfuscation
+-enable-export-obfuscation
\ No newline at end of file
diff --git a/code/DocsSample/Account/ManageDistributedAccount/entry/oh-package.json5 b/code/DocsSample/Account/ManageDistributedAccount/entry/oh-package.json5
new file mode 100755
index 0000000000000000000000000000000000000000..4bf3e2a9b1ae7381cf9363dff1cbcc1861a41e7b
--- /dev/null
+++ b/code/DocsSample/Account/ManageDistributedAccount/entry/oh-package.json5
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 2025 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+{
+ "name": "entry",
+ "version": "1.0.0",
+ "description": "Please describe the basic information.",
+ "main": "",
+ "author": "",
+ "license": "",
+ "dependencies": {}
+}
+
diff --git a/code/DocsSample/Account/ManageDistributedAccount/entry/src/main/ets/entryability/EntryAbility.ets b/code/DocsSample/Account/ManageDistributedAccount/entry/src/main/ets/entryability/EntryAbility.ets
new file mode 100755
index 0000000000000000000000000000000000000000..3e77e4b9f7946d80aa77e6b2dcfe40b23ccf6178
--- /dev/null
+++ b/code/DocsSample/Account/ManageDistributedAccount/entry/src/main/ets/entryability/EntryAbility.ets
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 2025 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { AbilityConstant, ConfigurationConstant, UIAbility, Want } from '@kit.AbilityKit';
+import { hilog } from '@kit.PerformanceAnalysisKit';
+import { window } from '@kit.ArkUI';
+
+export default class EntryAbility extends UIAbility {
+ onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void {
+ this.context.getApplicationContext().setColorMode(ConfigurationConstant.ColorMode.COLOR_MODE_NOT_SET);
+ hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onCreate');
+ }
+
+ onDestroy(): void {
+ hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onDestroy');
+ }
+
+ onWindowStageCreate(windowStage: window.WindowStage): void {
+ // Main window is created, set main page for this ability
+ hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageCreate');
+
+ windowStage.loadContent('pages/Index', (err) => {
+ if (err.code) {
+ hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? '');
+ return;
+ }
+ hilog.info(0x0000, 'testTag', 'Succeeded in loading the content.');
+ });
+ }
+
+ onWindowStageDestroy(): void {
+ // Main window is destroyed, release UI related resources
+ hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageDestroy');
+ }
+
+ onForeground(): void {
+ // Ability has brought to foreground
+ hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onForeground');
+ }
+
+ onBackground(): void {
+ // Ability has back to background
+ hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onBackground');
+ }
+}
\ No newline at end of file
diff --git a/code/DocsSample/Account/ManageDistributedAccount/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets b/code/DocsSample/Account/ManageDistributedAccount/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets
new file mode 100755
index 0000000000000000000000000000000000000000..1504a74f09dfdcfae408be979f99369a2c5affab
--- /dev/null
+++ b/code/DocsSample/Account/ManageDistributedAccount/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2025 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { hilog } from '@kit.PerformanceAnalysisKit';
+import { BackupExtensionAbility, BundleVersion } from '@kit.CoreFileKit';
+
+export default class EntryBackupAbility extends BackupExtensionAbility {
+ async onBackup() {
+ hilog.info(0x0000, 'testTag', 'onBackup ok');
+ }
+
+ async onRestore(bundleVersion: BundleVersion) {
+ hilog.info(0x0000, 'testTag', 'onRestore ok %{public}s', JSON.stringify(bundleVersion));
+ }
+}
\ No newline at end of file
diff --git a/code/DocsSample/Account/ManageDistributedAccount/entry/src/main/ets/pages/Index.ets b/code/DocsSample/Account/ManageDistributedAccount/entry/src/main/ets/pages/Index.ets
new file mode 100755
index 0000000000000000000000000000000000000000..1214f4b83e7e9f57fc9429196b3b5d586d7bfae6
--- /dev/null
+++ b/code/DocsSample/Account/ManageDistributedAccount/entry/src/main/ets/pages/Index.ets
@@ -0,0 +1,122 @@
+/*
+ * Copyright (c) 2025 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { distributedAccount, BusinessError } from '@kit.BasicServicesKit';
+
+const distributedAccountAbility = distributedAccount.getDistributedAccountAbility();
+
+@Entry
+@Component
+struct SystemAccount {
+ @State accountsName: string = 'No Name';
+
+ private async bindCurrentManageDistributedAccounts(): Promise {
+ let distributedInfo: distributedAccount.DistributedInfo = {
+ name: 'ZhangSan',
+ id: '12345',
+ event: 'Ohos.account.event.LOGIN',
+ };
+ distributedAccountAbility.setOsAccountDistributedInfo(distributedInfo).then(() => {
+ console.log('setOsAccountDistributedInfo successfully');
+ }).catch((err: BusinessError) => {
+ console.log('setOsAccountDistributedInfo exception: ' + JSON.stringify(err));
+ });
+ distributedAccountAbility.getOsAccountDistributedInfo().then((data: distributedAccount.DistributedInfo) => {
+ console.log('distributed information: ' + JSON.stringify(data));
+ this.accountsName = '绑定分布式账号: ' + data.name;
+ }).catch((err: BusinessError) => {
+ console.log('getOsAccountDistributedInfo exception: ' + JSON.stringify(err));
+ });
+ }
+
+ private async unbindCurrentManageDistributedAccounts(): Promise {
+ let distributedInfo: distributedAccount.DistributedInfo = {
+ name: 'ZhangSan',
+ id: '12345',
+ event: 'Ohos.account.event.LOGOUT',
+ };
+ distributedAccountAbility.setOsAccountDistributedInfo(distributedInfo).then(() => {
+ console.log('setOsAccountDistributedInfo successfully');
+ this.accountsName = '解绑分布式账号成功'
+ }).catch((err: BusinessError) => {
+ console.log('setOsAccountDistributedInfo exception: ' + JSON.stringify(err));
+ this.accountsName = '解绑分布式账号失败'
+ });
+ }
+
+ private async bindSpecifyManageDistributedAccounts(): Promise {
+ let localId: number = 100;
+ let distributedInfo: distributedAccount.DistributedInfo = {
+ name: 'ZhangSan',
+ id: '12345',
+ event: 'Ohos.account.event.LOGIN',
+ };
+ distributedAccountAbility.setOsAccountDistributedInfoByLocalId(localId, distributedInfo).then(() => {
+ console.log('setOsAccountDistributedInfoByLocalId successfully');
+ }).catch((err: BusinessError) => {
+ console.log('setOsAccountDistributedInfoByLocalId exception: ' + JSON.stringify(err));
+ });
+ distributedAccountAbility.getOsAccountDistributedInfoByLocalId(localId)
+ .then((data: distributedAccount.DistributedInfo) => {
+ console.log('distributed information: ' + JSON.stringify(data));
+ this.accountsName = '指定的系统账号上绑定分布式账号: ' + data.name;
+ }).catch((err: BusinessError) => {
+ console.log('getOsAccountDistributedInfoByLocalId exception: ' + JSON.stringify(err));
+ });
+ }
+
+ private async unbindSpecifyManageDistributedAccounts(): Promise {
+ let localId: number = 100;
+ let distributedInfo: distributedAccount.DistributedInfo = {
+ name: 'ZhangSan',
+ id: '12345',
+ event: 'Ohos.account.event.LOGOUT',
+ };
+ distributedAccountAbility.setOsAccountDistributedInfoByLocalId(localId, distributedInfo).then(() => {
+ console.log('setOsAccountDistributedInfoByLocalId successfully');
+ this.accountsName = '指定系统账号上登出解绑分布式账号成功'
+ }).catch((err: BusinessError) => {
+ console.log('setOsAccountDistributedInfoByLocalId exception: ' + JSON.stringify(err));
+ this.accountsName = '指定系统账号上登出解绑分布式账号失败'
+ });
+ }
+
+ build() {
+ Column() {
+ Text(this.accountsName)
+ .id('show')
+ .fontSize(50)
+ .fontWeight(FontWeight.Bold)
+ Button('在当前系统账号上登录绑定分布式账号')
+ .margin(10)
+ .id('button1')
+ .onClick(() => this.bindCurrentManageDistributedAccounts())
+ Button('在当前系统账号上登出解绑分布式账号')
+ .margin(10)
+ .id('button2')
+ .onClick(() => this.unbindCurrentManageDistributedAccounts())
+ Button('在指定的系统账号上登录绑定分布式账号')
+ .margin(10)
+ .id('button3')
+ .onClick(() => this.bindSpecifyManageDistributedAccounts())
+ Button('在指定系统账号上登出解绑分布式账号')
+ .margin(10)
+ .id('button4')
+ .onClick(() => this.unbindSpecifyManageDistributedAccounts())
+ }
+ .height('100%')
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/code/DocsSample/Account/ManageDistributedAccount/entry/src/main/module.json5 b/code/DocsSample/Account/ManageDistributedAccount/entry/src/main/module.json5
new file mode 100755
index 0000000000000000000000000000000000000000..f16c302eb9b102129bdf2e58d32b7cbafa81a453
--- /dev/null
+++ b/code/DocsSample/Account/ManageDistributedAccount/entry/src/main/module.json5
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2025 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+{
+ "module": {
+ "name": "entry",
+ "type": "entry",
+ "description": "$string:module_desc",
+ "mainElement": "EntryAbility",
+ "deviceTypes": [
+ "phone",
+ "tablet",
+ "2in1"
+ ],
+ "deliveryWithInstall": true,
+ "installationFree": false,
+ "pages": "$profile:main_pages",
+ "requestPermissions": [{
+ "name": "ohos.permission.MANAGE_DISTRIBUTED_ACCOUNTS",
+ }],
+ "abilities": [
+ {
+ "name": "EntryAbility",
+ "srcEntry": "./ets/entryability/EntryAbility.ets",
+ "description": "$string:EntryAbility_desc",
+ "icon": "$media:layered_image",
+ "label": "$string:EntryAbility_label",
+ "startWindowIcon": "$media:startIcon",
+ "startWindowBackground": "$color:start_window_background",
+ "exported": true,
+ "skills": [
+ {
+ "entities": [
+ "entity.system.home"
+ ],
+ "actions": [
+ "action.system.home"
+ ]
+ }
+ ]
+ }
+ ],
+ "extensionAbilities": [
+ {
+ "name": "EntryBackupAbility",
+ "srcEntry": "./ets/entrybackupability/EntryBackupAbility.ets",
+ "type": "backup",
+ "exported": false,
+ "metadata": [
+ {
+ "name": "ohos.extension.backup",
+ "resource": "$profile:backup_config"
+ }
+ ],
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/code/DocsSample/Account/ManageDistributedAccount/entry/src/main/resources/base/element/color.json b/code/DocsSample/Account/ManageDistributedAccount/entry/src/main/resources/base/element/color.json
new file mode 100755
index 0000000000000000000000000000000000000000..d66f9a7d4ac61fb8d215239ab3620b7bcd77bf33
--- /dev/null
+++ b/code/DocsSample/Account/ManageDistributedAccount/entry/src/main/resources/base/element/color.json
@@ -0,0 +1,8 @@
+{
+ "color": [
+ {
+ "name": "start_window_background",
+ "value": "#FFFFFF"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/code/DocsSample/Account/ManageDistributedAccount/entry/src/main/resources/base/element/string.json b/code/DocsSample/Account/ManageDistributedAccount/entry/src/main/resources/base/element/string.json
new file mode 100755
index 0000000000000000000000000000000000000000..f94595515a99e0c828807e243494f57f09251930
--- /dev/null
+++ b/code/DocsSample/Account/ManageDistributedAccount/entry/src/main/resources/base/element/string.json
@@ -0,0 +1,16 @@
+{
+ "string": [
+ {
+ "name": "module_desc",
+ "value": "module description"
+ },
+ {
+ "name": "EntryAbility_desc",
+ "value": "description"
+ },
+ {
+ "name": "EntryAbility_label",
+ "value": "label"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/code/DocsSample/Account/ManageDistributedAccount/entry/src/main/resources/base/media/background.png b/code/DocsSample/Account/ManageDistributedAccount/entry/src/main/resources/base/media/background.png
new file mode 100755
index 0000000000000000000000000000000000000000..f939c9fa8cc8914832e602198745f592a0dfa34d
Binary files /dev/null and b/code/DocsSample/Account/ManageDistributedAccount/entry/src/main/resources/base/media/background.png differ
diff --git a/code/DocsSample/Account/ManageDistributedAccount/entry/src/main/resources/base/media/foreground.png b/code/DocsSample/Account/ManageDistributedAccount/entry/src/main/resources/base/media/foreground.png
new file mode 100755
index 0000000000000000000000000000000000000000..4483ddad1f079e1089d685bd204ee1cfe1d01902
Binary files /dev/null and b/code/DocsSample/Account/ManageDistributedAccount/entry/src/main/resources/base/media/foreground.png differ
diff --git a/code/DocsSample/Account/ManageDistributedAccount/entry/src/main/resources/base/media/layered_image.json b/code/DocsSample/Account/ManageDistributedAccount/entry/src/main/resources/base/media/layered_image.json
new file mode 100755
index 0000000000000000000000000000000000000000..fb49920440fb4d246c82f9ada275e26123a2136a
--- /dev/null
+++ b/code/DocsSample/Account/ManageDistributedAccount/entry/src/main/resources/base/media/layered_image.json
@@ -0,0 +1,7 @@
+{
+ "layered-image":
+ {
+ "background" : "$media:background",
+ "foreground" : "$media:foreground"
+ }
+}
\ No newline at end of file
diff --git a/code/DocsSample/Account/ManageDistributedAccount/entry/src/main/resources/base/media/startIcon.png b/code/DocsSample/Account/ManageDistributedAccount/entry/src/main/resources/base/media/startIcon.png
new file mode 100755
index 0000000000000000000000000000000000000000..205ad8b5a8a42e8762fbe4899b8e5e31ce822b8b
Binary files /dev/null and b/code/DocsSample/Account/ManageDistributedAccount/entry/src/main/resources/base/media/startIcon.png differ
diff --git a/code/DocsSample/Account/ManageDistributedAccount/entry/src/main/resources/base/profile/backup_config.json b/code/DocsSample/Account/ManageDistributedAccount/entry/src/main/resources/base/profile/backup_config.json
new file mode 100755
index 0000000000000000000000000000000000000000..d742c2f96e7dd0f406f499941f3147345e998f95
--- /dev/null
+++ b/code/DocsSample/Account/ManageDistributedAccount/entry/src/main/resources/base/profile/backup_config.json
@@ -0,0 +1,3 @@
+{
+ "allowToBackupRestore": true
+}
\ No newline at end of file
diff --git a/code/DocsSample/Account/ManageDistributedAccount/entry/src/main/resources/base/profile/main_pages.json b/code/DocsSample/Account/ManageDistributedAccount/entry/src/main/resources/base/profile/main_pages.json
new file mode 100755
index 0000000000000000000000000000000000000000..1898d94f58d6128ab712be2c68acc7c98e9ab9ce
--- /dev/null
+++ b/code/DocsSample/Account/ManageDistributedAccount/entry/src/main/resources/base/profile/main_pages.json
@@ -0,0 +1,5 @@
+{
+ "src": [
+ "pages/Index"
+ ]
+}
diff --git a/code/DocsSample/Account/ManageDistributedAccount/entry/src/main/resources/dark/element/color.json b/code/DocsSample/Account/ManageDistributedAccount/entry/src/main/resources/dark/element/color.json
new file mode 100755
index 0000000000000000000000000000000000000000..438d5bc43bb23c59c210d586b96635a72da5b64a
--- /dev/null
+++ b/code/DocsSample/Account/ManageDistributedAccount/entry/src/main/resources/dark/element/color.json
@@ -0,0 +1,8 @@
+{
+ "color": [
+ {
+ "name": "start_window_background",
+ "value": "#000000"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/code/DocsSample/Account/ManageDistributedAccount/entry/src/mock/mock-config.json5 b/code/DocsSample/Account/ManageDistributedAccount/entry/src/mock/mock-config.json5
new file mode 100755
index 0000000000000000000000000000000000000000..b9a78e201535765168a92d3543c690273ecdc019
--- /dev/null
+++ b/code/DocsSample/Account/ManageDistributedAccount/entry/src/mock/mock-config.json5
@@ -0,0 +1,17 @@
+/*
+ * Copyright (c) 2025 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+{
+}
\ No newline at end of file
diff --git a/code/DocsSample/Account/ManageDistributedAccount/entry/src/ohosTest/ets/test/Ability.test.ets b/code/DocsSample/Account/ManageDistributedAccount/entry/src/ohosTest/ets/test/Ability.test.ets
new file mode 100755
index 0000000000000000000000000000000000000000..29bc9ef0203539791d8f2972943070392681c15f
--- /dev/null
+++ b/code/DocsSample/Account/ManageDistributedAccount/entry/src/ohosTest/ets/test/Ability.test.ets
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2025 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { describe, it, expect } from '@ohos/hypium';
+// 导入测试依赖kit
+import { abilityDelegatorRegistry, Driver, ON } from '@kit.TestKit';
+import { UIAbility, Want } from '@kit.AbilityKit';
+
+const delegator: abilityDelegatorRegistry.AbilityDelegator = abilityDelegatorRegistry.getAbilityDelegator()
+const bundleName = abilityDelegatorRegistry.getArguments().bundleName;
+function sleep(time: number) {
+ return new Promise((resolve: Function) => setTimeout(resolve, time));
+}
+export default function abilityTest() {
+ it('distributedAccountsExample',0, async (done: Function) => {
+ console.info("uitest: TestUiExample begin");
+ const want: Want = {
+ bundleName: bundleName,
+ abilityName: 'EntryAbility'
+ }
+ await delegator.startAbility(want);
+ await sleep(1000);
+ const ability: UIAbility = await delegator.getCurrentTopAbility();
+ console.info("get top ability");
+ expect(ability.context.abilityInfo.name).assertEqual('EntryAbility');
+ const driver = Driver.create();
+ await driver.delayMs(1000);
+
+ const button1 = await driver.findComponent(ON.id('button1'));
+ await button1.click();
+ await driver.delayMs(1000);
+ const text = await driver.findComponent(ON.id('show'));
+ let content1: string = await text.getText();
+ expect(content1).assertEqual('绑定分布式账号: ZhangSan');
+
+ const button2 = await driver.findComponent(ON.id('button2'));
+ await button2.click();
+ await driver.delayMs(1000);
+ let content2: string = await text.getText();
+ expect(content2).assertEqual('解绑分布式账号成功');
+
+ const button3 = await driver.findComponent(ON.id('button3'));
+ await button3.click();
+ await driver.delayMs(1000);
+ let content3: string = await text.getText();
+ expect(content3).assertEqual('指定的系统账号上绑定分布式账号: ZhangSan');
+
+ const button4 = await driver.findComponent(ON.id('button4'));
+ await button4.click();
+ await driver.delayMs(1000);
+ let content4: string = await text.getText();
+ expect(content4).assertEqual('指定系统账号上登出解绑分布式账号成功');
+ done();
+ })
+}
\ No newline at end of file
diff --git a/code/DocsSample/Account/ManageDistributedAccount/entry/src/ohosTest/ets/test/List.test.ets b/code/DocsSample/Account/ManageDistributedAccount/entry/src/ohosTest/ets/test/List.test.ets
new file mode 100755
index 0000000000000000000000000000000000000000..1eac52fcebe8958e19a7b8fed2e8f39c520a3e42
--- /dev/null
+++ b/code/DocsSample/Account/ManageDistributedAccount/entry/src/ohosTest/ets/test/List.test.ets
@@ -0,0 +1,20 @@
+/*
+ * Copyright (c) 2025 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import abilityTest from './Ability.test';
+
+export default function testsuite() {
+ abilityTest();
+}
\ No newline at end of file
diff --git a/code/DocsSample/Account/ManageDistributedAccount/entry/src/ohosTest/module.json5 b/code/DocsSample/Account/ManageDistributedAccount/entry/src/ohosTest/module.json5
new file mode 100755
index 0000000000000000000000000000000000000000..c8bd24faff0ff0064a57435f74662f1db5865f88
--- /dev/null
+++ b/code/DocsSample/Account/ManageDistributedAccount/entry/src/ohosTest/module.json5
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2025 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+{
+ "module": {
+ "name": "entry_test",
+ "type": "feature",
+ "deviceTypes": [
+ "phone",
+ "tablet",
+ "2in1"
+ ],
+ "deliveryWithInstall": true,
+ "installationFree": false
+ }
+}
diff --git a/code/DocsSample/Account/ManageDistributedAccount/entry/src/test/List.test.ets b/code/DocsSample/Account/ManageDistributedAccount/entry/src/test/List.test.ets
new file mode 100755
index 0000000000000000000000000000000000000000..f1186b1f53c3a70930921c5dbd1417332bec56c9
--- /dev/null
+++ b/code/DocsSample/Account/ManageDistributedAccount/entry/src/test/List.test.ets
@@ -0,0 +1,20 @@
+/*
+ * Copyright (c) 2025 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import localUnitTest from './LocalUnit.test';
+
+export default function testsuite() {
+ localUnitTest();
+}
\ No newline at end of file
diff --git a/code/DocsSample/Account/ManageDistributedAccount/entry/src/test/LocalUnit.test.ets b/code/DocsSample/Account/ManageDistributedAccount/entry/src/test/LocalUnit.test.ets
new file mode 100755
index 0000000000000000000000000000000000000000..7fc57c77dbf76d8df08a2b802a55b948e3fcf968
--- /dev/null
+++ b/code/DocsSample/Account/ManageDistributedAccount/entry/src/test/LocalUnit.test.ets
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2025 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium';
+
+export default function localUnitTest() {
+ describe('localUnitTest', () => {
+ // Defines a test suite. Two parameters are supported: test suite name and test suite function.
+ beforeAll(() => {
+ // Presets an action, which is performed only once before all test cases of the test suite start.
+ // This API supports only one parameter: preset action function.
+ });
+ beforeEach(() => {
+ // Presets an action, which is performed before each unit test case starts.
+ // The number of execution times is the same as the number of test cases defined by **it**.
+ // This API supports only one parameter: preset action function.
+ });
+ afterEach(() => {
+ // Presets a clear action, which is performed after each unit test case ends.
+ // The number of execution times is the same as the number of test cases defined by **it**.
+ // This API supports only one parameter: clear action function.
+ });
+ afterAll(() => {
+ // Presets a clear action, which is performed after all test cases of the test suite end.
+ // This API supports only one parameter: clear action function.
+ });
+ it('assertContain', 0, () => {
+ // Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function.
+ let a = 'abc';
+ let b = 'b';
+ // Defines a variety of assertion methods, which are used to declare expected boolean conditions.
+ expect(a).assertContain(b);
+ expect(a).assertEqual(a);
+ });
+ });
+}
\ No newline at end of file
diff --git a/code/DocsSample/Account/ManageDistributedAccount/hvigor/hvigor-config.json5 b/code/DocsSample/Account/ManageDistributedAccount/hvigor/hvigor-config.json5
new file mode 100755
index 0000000000000000000000000000000000000000..cef74543b1f97c82275e4bf3434b162395bff2eb
--- /dev/null
+++ b/code/DocsSample/Account/ManageDistributedAccount/hvigor/hvigor-config.json5
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2025 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+{
+ "modelVersion": "5.0.1",
+ "dependencies": {
+ },
+ "execution": {
+ // "analyze": "normal", /* Define the build analyze mode. Value: [ "normal" | "advanced" | false ]. Default: "normal" */
+ // "daemon": true, /* Enable daemon compilation. Value: [ true | false ]. Default: true */
+ // "incremental": true, /* Enable incremental compilation. Value: [ true | false ]. Default: true */
+ // "parallel": true, /* Enable parallel compilation. Value: [ true | false ]. Default: true */
+ // "typeCheck": false, /* Enable typeCheck. Value: [ true | false ]. Default: false */
+ },
+ "logging": {
+ // "level": "info" /* Define the log level. Value: [ "debug" | "info" | "warn" | "error" ]. Default: "info" */
+ },
+ "debugging": {
+ // "stacktrace": false /* Disable stacktrace compilation. Value: [ true | false ]. Default: false */
+ },
+ "nodeOptions": {
+ // "maxOldSpaceSize": 8192 /* Enable nodeOptions maxOldSpaceSize compilation. Unit M. Used for the daemon process. Default: 8192*/
+ // "exposeGC": true /* Enable to trigger garbage collection explicitly. Default: true*/
+ }
+}
diff --git a/code/DocsSample/Account/ManageDistributedAccount/hvigorfile.ts b/code/DocsSample/Account/ManageDistributedAccount/hvigorfile.ts
new file mode 100755
index 0000000000000000000000000000000000000000..2a5e543f190732c159beb574dfc9fa37bc94e156
--- /dev/null
+++ b/code/DocsSample/Account/ManageDistributedAccount/hvigorfile.ts
@@ -0,0 +1,21 @@
+/*
+ * Copyright (c) 2025 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { appTasks } from '@ohos/hvigor-ohos-plugin';
+
+export default {
+ system: appTasks, /* Built-in plugin of Hvigor. It cannot be modified. */
+ plugins:[] /* Custom plugin to extend the functionality of Hvigor. */
+}
diff --git a/code/DocsSample/Account/ManageDistributedAccount/oh-package.json5 b/code/DocsSample/Account/ManageDistributedAccount/oh-package.json5
new file mode 100755
index 0000000000000000000000000000000000000000..eaef52736f22c14e04fca386ba01611ab32a7e4a
--- /dev/null
+++ b/code/DocsSample/Account/ManageDistributedAccount/oh-package.json5
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 2025 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+{
+ "modelVersion": "5.0.1",
+ "description": "Please describe the basic information.",
+ "dependencies": {
+ },
+ "devDependencies": {
+ "@ohos/hypium": "1.0.19",
+ "@ohos/hamock": "1.0.0"
+ }
+}
diff --git a/code/DocsSample/Account/ManageDistributedAccount/ohosTest.md b/code/DocsSample/Account/ManageDistributedAccount/ohosTest.md
new file mode 100755
index 0000000000000000000000000000000000000000..85ffccf0de1d9bbc9150cffa3fa4aeecef158b8b
--- /dev/null
+++ b/code/DocsSample/Account/ManageDistributedAccount/ohosTest.md
@@ -0,0 +1,11 @@
+# ManageDistributedAccount 测试用例归档
+
+## 用例表
+
+| 测试功能 | 预置条件 | 输入 | 预期输出 | 是否自动 | 测试结果 |
+| ------------------------------------ | ------------ | ------------------------------------------ | -------------------------------------------------- | -------- | -------- |
+| 拉起应用 | 设备正常运行 | | 成功拉起应用 | 是 | Pass |
+| 在当前系统账号上登录绑定分布式账号 | 位于首页 | 点击'在当前系统账号上登录绑定分布式账号' | 页面显示'绑定分布式账号: ZhangSan' | 是 | Pass |
+| 在当前系统账号上登出解绑分布式账号 | 位于首页 | 点击'在当前系统账号上登出解绑分布式账号' | 页面显示'解绑分布式账号成功' | 是 | Pass |
+| 在指定的系统账号上登录绑定分布式账号 | 位于首页 | 点击'在指定的系统账号上登录绑定分布式账号' | 页面显示'指定的系统账号上绑定分布式账号: ZhangSan' | 是 | Pass |
+| 在指定系统账号上登出解绑分布式账号 | 位于首页 | 点击'在指定系统账号上登出解绑分布式账号' | 页面显示'指定系统账号上登出解绑分布式账号成功' | 是 | Pass |
\ No newline at end of file
diff --git a/code/DocsSample/Account/ManageDistributedAccount/screenshots/ManageDistributedAccount_1.png b/code/DocsSample/Account/ManageDistributedAccount/screenshots/ManageDistributedAccount_1.png
new file mode 100755
index 0000000000000000000000000000000000000000..226abf500b09fc2dbdaf8a22f2ca35cabb468d55
Binary files /dev/null and b/code/DocsSample/Account/ManageDistributedAccount/screenshots/ManageDistributedAccount_1.png differ
diff --git a/code/DocsSample/Account/ManageDistributedAccount/screenshots/ManageDistributedAccount_2.png b/code/DocsSample/Account/ManageDistributedAccount/screenshots/ManageDistributedAccount_2.png
new file mode 100755
index 0000000000000000000000000000000000000000..1849d38a25a7d7fbf87a2eb469c7629b5162dd3e
Binary files /dev/null and b/code/DocsSample/Account/ManageDistributedAccount/screenshots/ManageDistributedAccount_2.png differ
diff --git a/code/DocsSample/Account/ManageDistributedAccount/screenshots/ManageDistributedAccount_3.png b/code/DocsSample/Account/ManageDistributedAccount/screenshots/ManageDistributedAccount_3.png
new file mode 100755
index 0000000000000000000000000000000000000000..7d5380b7368c28add00c47c110e22a1e32497a02
Binary files /dev/null and b/code/DocsSample/Account/ManageDistributedAccount/screenshots/ManageDistributedAccount_3.png differ
diff --git a/code/DocsSample/Account/ManageDistributedAccount/screenshots/ManageDistributedAccount_4.png b/code/DocsSample/Account/ManageDistributedAccount/screenshots/ManageDistributedAccount_4.png
new file mode 100755
index 0000000000000000000000000000000000000000..b325355abc10a34290b78065aade9393e933b43c
Binary files /dev/null and b/code/DocsSample/Account/ManageDistributedAccount/screenshots/ManageDistributedAccount_4.png differ
diff --git a/code/DocsSample/Account/ManageDistributedAccount/screenshots/ManageDistributedAccount_5.png b/code/DocsSample/Account/ManageDistributedAccount/screenshots/ManageDistributedAccount_5.png
new file mode 100755
index 0000000000000000000000000000000000000000..b325355abc10a34290b78065aade9393e933b43c
Binary files /dev/null and b/code/DocsSample/Account/ManageDistributedAccount/screenshots/ManageDistributedAccount_5.png differ