From 20477cfc57af68f8180d5e8f61537d41ff3320a2 Mon Sep 17 00:00:00 2001 From: zhouoaoteng Date: Sat, 26 Jul 2025 17:12:46 +0800 Subject: [PATCH 1/5] fix:ohos_hap Signed-off-by: zhouoaoteng --- services/file_extension_hap/AppScope/app.json | 6 ++-- services/file_extension_hap/BUILD.gn | 0 .../entry/build-profile.json5 | 21 ++++++++++-- .../entry/{hvigorfile.js => hvigorfile.ts} | 0 .../entry/obfuscation-rules.txt | 0 .../file_extension_hap/entry/oh-package.json5 | 0 .../Entryability.ets} | 7 ++-- .../entrybackupability/EntryBackupAbility.ets | 26 ++++++++++++++ .../entry/src/main/ets/pages/index.ets | 0 .../src/main/{module.json => module.json5} | 32 ++++++++++++++---- .../main/resources/base/element/color.json | 8 +++++ .../main/resources/base/element/string.json | 10 ++++-- .../resources/base/profile/backup_config.json | 5 +++ .../resources/base/profile/main_pages.json | 4 ++- .../entry/src/main/resources/dark/color.json | 8 +++++ .../hvigor/hvigor-config.json5 | 0 .../hvigor/hvigor-wrapper.js | 0 .../{hvigorfile.js => hvigorfile.ts} | 0 .../file_extension_hap/oh-package-lock.json5 | 0 services/file_extension_hap/oh-package.json5 | 0 .../signature/fileextension.p7b | Bin 0 -> 3571 bytes 21 files changed, 107 insertions(+), 20 deletions(-) create mode 100644 services/file_extension_hap/BUILD.gn rename services/file_extension_hap/entry/{hvigorfile.js => hvigorfile.ts} (100%) create mode 100644 services/file_extension_hap/entry/obfuscation-rules.txt create mode 100644 services/file_extension_hap/entry/oh-package.json5 rename services/file_extension_hap/entry/src/main/ets/{Application/AbilityStage.ts => entryability/Entryability.ets} (73%) create mode 100644 services/file_extension_hap/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets create mode 100644 services/file_extension_hap/entry/src/main/ets/pages/index.ets rename services/file_extension_hap/entry/src/main/{module.json => module.json5} (42%) create mode 100644 services/file_extension_hap/entry/src/main/resources/base/element/color.json create mode 100644 services/file_extension_hap/entry/src/main/resources/base/profile/backup_config.json create mode 100644 services/file_extension_hap/entry/src/main/resources/dark/color.json create mode 100644 services/file_extension_hap/hvigor/hvigor-config.json5 create mode 100644 services/file_extension_hap/hvigor/hvigor-wrapper.js rename services/file_extension_hap/{hvigorfile.js => hvigorfile.ts} (100%) create mode 100644 services/file_extension_hap/oh-package-lock.json5 create mode 100644 services/file_extension_hap/oh-package.json5 create mode 100644 services/file_extension_hap/signature/fileextension.p7b diff --git a/services/file_extension_hap/AppScope/app.json b/services/file_extension_hap/AppScope/app.json index f66b52de..7645ac63 100644 --- a/services/file_extension_hap/AppScope/app.json +++ b/services/file_extension_hap/AppScope/app.json @@ -1,12 +1,10 @@ { "app": { "bundleName": "com.ohos.UserFile.ExternalFileManager", + "vendor": "example", "versionCode": 1000004, "versionName": "1.0.0.4", - "minAPIVersion": 9, - "targetAPIVersion": 9, "icon": "$media:app_icon", - "label": "$string:app_name", - "generateBuildHash": true + "label": "$string:app_name" } } diff --git a/services/file_extension_hap/BUILD.gn b/services/file_extension_hap/BUILD.gn new file mode 100644 index 00000000..e69de29b diff --git a/services/file_extension_hap/entry/build-profile.json5 b/services/file_extension_hap/entry/build-profile.json5 index d3089f7b..3c8e3bd0 100644 --- a/services/file_extension_hap/entry/build-profile.json5 +++ b/services/file_extension_hap/entry/build-profile.json5 @@ -13,12 +13,27 @@ * limitations under the License. */ { - "apiType": 'stageMode', + "apiType": "stageMode", "buildOption": { }, + "buildOptionSet": [ + { + "name": "release", + "arkOptions": { + "obfuscation": { + "ruleOptions": { + "enable": false, + "files": [ + "./obfuscation-rules.txt" + ] + } + } + } + }, + ], "targets": [ { - "name": "default", + "name": "default" } ] -} \ No newline at end of file +}} \ No newline at end of file diff --git a/services/file_extension_hap/entry/hvigorfile.js b/services/file_extension_hap/entry/hvigorfile.ts similarity index 100% rename from services/file_extension_hap/entry/hvigorfile.js rename to services/file_extension_hap/entry/hvigorfile.ts diff --git a/services/file_extension_hap/entry/obfuscation-rules.txt b/services/file_extension_hap/entry/obfuscation-rules.txt new file mode 100644 index 00000000..e69de29b diff --git a/services/file_extension_hap/entry/oh-package.json5 b/services/file_extension_hap/entry/oh-package.json5 new file mode 100644 index 00000000..e69de29b diff --git a/services/file_extension_hap/entry/src/main/ets/Application/AbilityStage.ts b/services/file_extension_hap/entry/src/main/ets/entryability/Entryability.ets similarity index 73% rename from services/file_extension_hap/entry/src/main/ets/Application/AbilityStage.ts rename to services/file_extension_hap/entry/src/main/ets/entryability/Entryability.ets index 5a874ca6..2d949165 100644 --- a/services/file_extension_hap/entry/src/main/ets/Application/AbilityStage.ts +++ b/services/file_extension_hap/entry/src/main/ets/entryability/Entryability.ets @@ -13,8 +13,11 @@ * limitations under the License. */ import AbilityStage from '@ohos.app.ability.AbilityStage'; +import {AbilityConstant, ConfigurationComstant, UIAbility, Want} from '@Kit.ArkUI'; +import {window} from '@Kit.ArkUI'; + +export default class EntryAbility extends UIAbility { + onCreate(want: Want, launchParam: AbilityConstant.launchParam): void { -export default class MyAbilityStage extends AbilityStage { - onCreate(): void { } } \ No newline at end of file diff --git a/services/file_extension_hap/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets b/services/file_extension_hap/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets new file mode 100644 index 00000000..0624fe76 --- /dev/null +++ b/services/file_extension_hap/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2022 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 {BackupExtensionAbility, BundleVersion} from '@Kit.CoreFileKit'; + + +export default class EntryBackupAbility extends BackupExtensionAbility { + async onBackup() { + + } + async onRestore(bundleVersion:BundleVersion) { + + } +} \ No newline at end of file diff --git a/services/file_extension_hap/entry/src/main/ets/pages/index.ets b/services/file_extension_hap/entry/src/main/ets/pages/index.ets new file mode 100644 index 00000000..e69de29b diff --git a/services/file_extension_hap/entry/src/main/module.json b/services/file_extension_hap/entry/src/main/module.json5 similarity index 42% rename from services/file_extension_hap/entry/src/main/module.json rename to services/file_extension_hap/entry/src/main/module.json5 index 36f17c61..30f387bd 100644 --- a/services/file_extension_hap/entry/src/main/module.json +++ b/services/file_extension_hap/entry/src/main/module.json5 @@ -2,10 +2,9 @@ "module": { "name": "entry", "type": "entry", - "srcEntrance": "./ets/Application/AbilityStage.ts", + "description": "$string:module_desc", "mainElement": "FileExtensionAbility", "deviceTypes": [ - "default", "phone", "tablet", "2in1" @@ -13,15 +12,34 @@ "deliveryWithInstall": true, "installationFree": false, "pages": "$profile:main_pages", - "uiSyntax": "ets", - "abilities": [], + "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": [ { - "srcEntrance": "./ets/FileExtensionAbility/FileExtensionAbility.ts", "name": "FileExtensionAbility", + "srcEntry": "./ets/FileExtensionAbility/FileExtensionAbility.ts", "type": "fileAccess", "uri": "fileAccess://docs", - "visible": true } ], "requestPermissions": [ @@ -29,5 +47,5 @@ "name": "ohos.permission.FILE_ACCESS_MANAGER" } ] - } + } } diff --git a/services/file_extension_hap/entry/src/main/resources/base/element/color.json b/services/file_extension_hap/entry/src/main/resources/base/element/color.json new file mode 100644 index 00000000..3c712962 --- /dev/null +++ b/services/file_extension_hap/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/services/file_extension_hap/entry/src/main/resources/base/element/string.json b/services/file_extension_hap/entry/src/main/resources/base/element/string.json index c4e8611b..a34afbaa 100644 --- a/services/file_extension_hap/entry/src/main/resources/base/element/string.json +++ b/services/file_extension_hap/entry/src/main/resources/base/element/string.json @@ -1,12 +1,16 @@ { "string": [ { - "name": "entry_desc", + "name": "moudle_desc", + "value": "moudle description" + }, + { + "name": "EntryAbility_desc", "value": "description" }, { - "name": "description_serviceability", - "value": "description_serviceability" + "name": "EntryAbility_label", + "value": "label" } ] } \ No newline at end of file diff --git a/services/file_extension_hap/entry/src/main/resources/base/profile/backup_config.json b/services/file_extension_hap/entry/src/main/resources/base/profile/backup_config.json new file mode 100644 index 00000000..55c3f007 --- /dev/null +++ b/services/file_extension_hap/entry/src/main/resources/base/profile/backup_config.json @@ -0,0 +1,5 @@ +{ + "src": [ + "pages/Index" + ] +} \ No newline at end of file diff --git a/services/file_extension_hap/entry/src/main/resources/base/profile/main_pages.json b/services/file_extension_hap/entry/src/main/resources/base/profile/main_pages.json index b12d9e9f..55c3f007 100644 --- a/services/file_extension_hap/entry/src/main/resources/base/profile/main_pages.json +++ b/services/file_extension_hap/entry/src/main/resources/base/profile/main_pages.json @@ -1,3 +1,5 @@ { - "src": [] + "src": [ + "pages/Index" + ] } \ No newline at end of file diff --git a/services/file_extension_hap/entry/src/main/resources/dark/color.json b/services/file_extension_hap/entry/src/main/resources/dark/color.json new file mode 100644 index 00000000..79b11c27 --- /dev/null +++ b/services/file_extension_hap/entry/src/main/resources/dark/color.json @@ -0,0 +1,8 @@ +{ + "color": [ + { + "name": "start_window_background", + "value": "#000000" + } + ] +} \ No newline at end of file diff --git a/services/file_extension_hap/hvigor/hvigor-config.json5 b/services/file_extension_hap/hvigor/hvigor-config.json5 new file mode 100644 index 00000000..e69de29b diff --git a/services/file_extension_hap/hvigor/hvigor-wrapper.js b/services/file_extension_hap/hvigor/hvigor-wrapper.js new file mode 100644 index 00000000..e69de29b diff --git a/services/file_extension_hap/hvigorfile.js b/services/file_extension_hap/hvigorfile.ts similarity index 100% rename from services/file_extension_hap/hvigorfile.js rename to services/file_extension_hap/hvigorfile.ts diff --git a/services/file_extension_hap/oh-package-lock.json5 b/services/file_extension_hap/oh-package-lock.json5 new file mode 100644 index 00000000..e69de29b diff --git a/services/file_extension_hap/oh-package.json5 b/services/file_extension_hap/oh-package.json5 new file mode 100644 index 00000000..e69de29b diff --git a/services/file_extension_hap/signature/fileextension.p7b b/services/file_extension_hap/signature/fileextension.p7b new file mode 100644 index 0000000000000000000000000000000000000000..49056b5d9a8be74d7d225cb059ba1824e7ade953 GIT binary patch literal 3571 zcmcgvZFCc57H&S;S|Ly@-;1;aq%4r~PMWkyU6Gl|B$?1jnlx#f61Gf|$wxbxnI@A? z8Wx1GvH~Kqo<&wc%U8h_&;w}go)tfKg+*69D$ChrDO!}TpMs3)q+BM0RA5+M!J?H`8KqFl zWgwILiOQ6wPu}T$4rQ;3&pQ#$zngF2)YoOMr^=(NHu% z^3s+x(htEbxV;3$TyETqqp%yxdVLIm<0z3vQP@v~VF5?rFpiN9bWYj?6G%AR8fj^E z)Ht0cSn$Avg-D@k*oK7dbqMTr!!34)Si$8Ku&~!u=XB1;1imI~z>o(+Q-sr9j?n&=NF)%0+WbsQxXw}+@iBfk)=Z#SHVRG=p^P136Ay05N;o1 z1-C?DW+7lnabB$%kYX=zvyJwP`weJ4LcJSyBjLb6cX34Ow2$fUHGv?49fe`H-|Ik~ zPOe@b3buHycAdTrG?c?uG6iXyYmgvjViRT;-Uv|*v6RD`uC@3Wn?QsT)`-Vr1ek%w zfxE%m$k=0H0!pxLNk8Rmh21QK3my|3l8{?#3Cv=G>%)lKABhK|KE}*@s##C6yu7xq zG8w|mArj|ZY1omCb{Y^kWWW%ZKoK1*Sf!4-fCE9in7M{e#gh@*#{^u6Ghqt~fyUPA zq>;6I>cS)e3lpAT$vUMz!gXfoU-&I5Len@j0NuE^r~<;Dm9(TAPHm^%Pwfox}Q=G)$X; z!NmA&afgF8#0VLKMj-B~eg| z`Av!T1W(19L_JcA8bAi zNBJlvmRz8QC1fzinW#hy&vJNxWvo$AR2MGk$mD$qGV-5+jO>jLgBAisYyr8V&A~jC+fQ4bn4c0vIQGhZPkL@|L(MG6qcr zQ=}zD(Zs<^A|P7QJFzzSXU^VpruQ#YbNsV&t>j4;R1j=MLxkg0X*mN_SMjtT{CPnQbmm1ByjB z_fJ)h2V<9w{>REL_1M1-+cLka=YhrDU*|5_sEQ$%w>NDk%feqwJy#^1izI&Bnk{zf9---|AfE z04GhKuAbiGn)s#+-F0@_{%!ig)C<=WOV4~ha=*wQlgOVV1N<4;YgjWB3yA#4qniPy z_a9yHosQ1MvivP1f^?8!5Q(zpT}09b3U87pch+)cj#}Z*Q4$qB?dw}qD>n71Y=^GT zV805$vH6R;HN!Twy?)N?{cypvTjyo2y!x?MX<0*9HgX$~9lJX&b~jyhcMc!X6L@Uh z-z=lHJ*qnO+K#PPo5oz7Uc4sWQ}WaMoe3|#v@+lFpKS=32S!RnDUyhj3l!pGD3fG) zgP1g~s&LDT6Mk_f$FcjvjiviGHVPx&A9{L-Ls* z-n;gL;jdM7PkwaSOnut7W6LDXbI0Ccl~beMQvO*vnD*kdU$F~!PtA9Y-oEx?$K$~E zaJ%XIBzA_|-nMzuMeua1V}1Mao#T$p>O5*0zcN?k5h?QM%m9xjQ*S;r6vC3f)c_f*4M-lHpp()ROb$IhjJOZFdPYUfD_t+W{p`d|J1(qRRe0gUjZ;>A z_sF6Hvx>hvcck};D;m$X03e5m(``BOe{k%!;x^=lQABb8B?qySKR2xSE#LRZ%imQ+ znqD|u@!aWyg@=z9on8_ubeyqzK3TPFLZl1-=GeKeF&~{fK1vj;L-(-43svzguCD2t ztFJWderLmm!nf%Md&XuaU3=`5eQo^A6Xa>m%dZW;t9$;z6J=0F28$$nNG_9smb-F{ z12^j6FQJYo7=PnSs6YXUYd?HH$-tx=MnNt#QoIz)K_#dFkY2CTHG(-eSCx=jSrYaf zTcZCQJGy-}Thg09we#}i-E(V;zc@knya?tIlRV(w8#lRJX#tpgO3tZMXM-<&xvBDq z<7mKmDbIJb({S<+L?8N=?|kUW@iiaGOMFuvzjXMz{7^3X{rXYD*q1MPiu%USU5=iU Mef-b9Zz6yHA8A&KF#rGn literal 0 HcmV?d00001 -- Gitee From 33f6c4a8fb73efbbe978d019f2059e7f1c27d5af Mon Sep 17 00:00:00 2001 From: zhouoaoteng Date: Wed, 30 Jul 2025 07:33:39 +0000 Subject: [PATCH 2/5] update services/file_extension_hap/BUILD.gn. Signed-off-by: zhouoaoteng --- services/file_extension_hap/BUILD.gn | 93 ++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) diff --git a/services/file_extension_hap/BUILD.gn b/services/file_extension_hap/BUILD.gn index e69de29b..fe95ffcc 100644 --- a/services/file_extension_hap/BUILD.gn +++ b/services/file_extension_hap/BUILD.gn @@ -0,0 +1,93 @@ +# Copyright (c) 2021-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("//build/config/components/idl_tool/idl.gni") +import("//build/ohos.gni") +import("//foundation/filemanagement/user_file_service/filemanagement_aafwk.gni") + +group("user_file_managers") { + deps = [ + ":external_file_manager_hap", + ":file_access_service.cfg", + ":file_access_service_profile", + ] +} + +ohos_app("external_file_manager_hap") { + publicity_file = "../publicity.xml" + certificate_profile = "signature/fileextension.p7b" + hap_name = "external_file_manager" + subsystem_name = "filemanagement" + part_name = "user_file_service" + module_install_dir = "app/com.ohos.UserFile.ExternalFileManager" + sdk_home = "//prebuilts/ohos-sdk/linux" + sdk_type_name = [ "sdk.dir" ] + assemble_type = "assembleHar" + build_level = "module" + build_modules = [ "entry" ] + build_profile = "file_extension_hap/build-profile.json5" + if (defined(sign_hap_py_path)) { + certificate_profile = "//vendor/tools/hap_sign_conf/filemanagement/user_file_service/external_file_manager.p7b" + key_alias = "ExternalFileManager" + private_key_path = "ExternalFileManager" + compatible_version = "9" + } +} + +ohos_js_assets("external_file_manager_js_assets") { + hap_profile = "file_extension_hap/entry/src/main/module.json5" + ets2abc = true + source_dir = "file_extension_hap/entry/src/main/ets" +} + +ohos_app_scope("external_file_manager_app_profile") { + app_profile = "file_extension_hap/AppScope/app.json5" + sources = [ "file_extension_hap/AppScope/resources" ] +} + +ohos_sa_profile("file_access_service_profile") { + sources = [ "5010.json" ] + part_name = "user_file_service" +} + +ohos_prebuilt_etc("file_access_service.cfg") { + source = "file_access_service.cfg" + relative_install_dir = "init" + subsystem_name = "filemanagement" + part_name = "user_file_service" +} + +config("ability_config") { + visibility = [ ":*" ] + include_dirs = [ + "native/file_access_service/include", + "${user_file_service_path}/utils", + "${user_file_service_path}/interfaces/inner_api/file_access/include", + "${user_file_service_path}/frameworks/js/napi/file_access_module", + ] +} + +config("ability_public_config") { + visibility = [ ":*" ] + include_dirs = [ + "native/file_access_service/include", + "${user_file_service_path}/utils", + "${user_file_service_path}/interfaces/kits/js/src/common", + ] +} + +ohos_resources("external_file_manager_resources") { + sources = [ "file_extension_hap/entry/src/main/resources" ] + deps = [ ":external_file_manager_app_profile" ] + hap_profile = "file_extension_hap/entry/src/main/module.json5" +} \ No newline at end of file -- Gitee From 2ade1f6889dd65a626980e5974b8aceb79111297 Mon Sep 17 00:00:00 2001 From: zhouoaoteng Date: Wed, 30 Jul 2025 07:34:10 +0000 Subject: [PATCH 3/5] update services/file_extension_hap/build-profile.json5. Signed-off-by: zhouoaoteng --- .../file_extension_hap/build-profile.json5 | 33 ++++++++++--------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/services/file_extension_hap/build-profile.json5 b/services/file_extension_hap/build-profile.json5 index 8fac2081..e15d7031 100644 --- a/services/file_extension_hap/build-profile.json5 +++ b/services/file_extension_hap/build-profile.json5 @@ -1,25 +1,26 @@ -/* - * Copyright (c) 2022 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": { - "compileSdkVersion": 9, - "compatibleSdkVersion": 9, + "signingConfigs": [], "products": [ { "name": "default", "signingConfig": "default", + "compatibleSdkVersion": "5.0.1(13)", + "runtimeOS": "HarmonyOS", + "buildOption": { + "strictMode": { + "caseSensitiveCheck": true, + "useNormalizedOHMUrl": true + } + } + } + ], + "buildModeSet": [ + { + "name": "debug", + }, + { + "name": "release" } ] }, -- Gitee From dad6d344635ec69e2112d18cf5c055848bc81272 Mon Sep 17 00:00:00 2001 From: zhouoaoteng Date: Wed, 30 Jul 2025 07:36:08 +0000 Subject: [PATCH 4/5] update services/BUILD.gn. Signed-off-by: zhouoaoteng --- services/BUILD.gn | 50 ++--------------------------------------------- 1 file changed, 2 insertions(+), 48 deletions(-) diff --git a/services/BUILD.gn b/services/BUILD.gn index d0441abd..3c1d8d64 100644 --- a/services/BUILD.gn +++ b/services/BUILD.gn @@ -16,49 +16,7 @@ import("//build/ohos.gni") import("//foundation/filemanagement/user_file_service/filemanagement_aafwk.gni") group("user_file_managers") { - deps = [ - ":external_file_manager_hap", - ":file_access_service", - ":file_access_service.cfg", - ":file_access_service_profile", - ] -} - -ohos_hap("external_file_manager_hap") { - hap_profile = "file_extension_hap/entry/src/main/module.json" - deps = [ - ":external_file_manager_js_assets", - ":external_file_manager_resources", - ] - publicity_file = "../publicity.xml" - certificate_profile = "signature/fileextension.p7b" - hap_name = "external_file_manager" - subsystem_name = "filemanagement" - part_name = "user_file_service" - module_install_dir = "app/com.ohos.UserFile.ExternalFileManager" -} - -ohos_js_assets("external_file_manager_js_assets") { - hap_profile = "file_extension_hap/entry/src/main/module.json" - ets2abc = true - source_dir = "file_extension_hap/entry/src/main/ets" -} - -ohos_app_scope("external_file_manager_app_profile") { - app_profile = "file_extension_hap/AppScope/app.json" - sources = [ "file_extension_hap/AppScope/resources" ] -} - -ohos_sa_profile("file_access_service_profile") { - sources = [ "5010.json" ] - part_name = "user_file_service" -} - -ohos_prebuilt_etc("file_access_service.cfg") { - source = "file_access_service.cfg" - relative_install_dir = "init" - subsystem_name = "filemanagement" - part_name = "user_file_service" + deps = [":file_access_service"] } config("ability_config") { @@ -80,11 +38,7 @@ config("ability_public_config") { ] } -ohos_resources("external_file_manager_resources") { - sources = [ "file_extension_hap/entry/src/main/resources" ] - deps = [ ":external_file_manager_app_profile" ] - hap_profile = "file_extension_hap/entry/src/main/module.json" -} + idl_gen_interface("IFile_Access_Service_Base") { sources = [ "IFileAccessServiceBase.idl" ] -- Gitee From 7dd7ffe097eb7acabfd92a4b357923c3b6b435f6 Mon Sep 17 00:00:00 2001 From: zhouoaoteng Date: Wed, 30 Jul 2025 07:42:28 +0000 Subject: [PATCH 5/5] update services/file_extension_hap/entry/src/main/resources/base/profile/backup_config.json. Signed-off-by: zhouoaoteng --- .../entry/src/main/resources/base/profile/backup_config.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/services/file_extension_hap/entry/src/main/resources/base/profile/backup_config.json b/services/file_extension_hap/entry/src/main/resources/base/profile/backup_config.json index 55c3f007..78f40ae7 100644 --- a/services/file_extension_hap/entry/src/main/resources/base/profile/backup_config.json +++ b/services/file_extension_hap/entry/src/main/resources/base/profile/backup_config.json @@ -1,5 +1,3 @@ { - "src": [ - "pages/Index" - ] + "allowToBackupRestore": true } \ No newline at end of file -- Gitee