diff --git a/sa_profile/BUILD.gn b/sa_profile/BUILD.gn index 5605284504a0444e42fc665f946035ffe906b93c..36998d7b2f2cba01900f49cd5af0630f19c19c5e 100644 --- a/sa_profile/BUILD.gn +++ b/sa_profile/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2021 Huawei Device Co., Ltd. +# 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 @@ -12,6 +12,8 @@ # limitations under the License. import("//build/ohos.gni") +import( + "//foundation/distributedhardware/distributed_hardware_fwk/distributedhardwarefwk.gni") ohos_sa_profile("dhfwk_sa_profile") { sources = [ "4801.json" ] @@ -21,7 +23,11 @@ ohos_sa_profile("dhfwk_sa_profile") { ohos_prebuilt_etc("dhardware.cfg") { relative_install_dir = "init" - source = "dhardware.cfg" + if (!distributed_hardware_fwk_low_latency) { + source = "dhardware.cfg" + } else { + source = "dhardware_close_source.cfg" + } part_name = "distributed_hardware_fwk" subsystem_name = "distributedhardware" } diff --git a/sa_profile/dhardware_close_source.cfg b/sa_profile/dhardware_close_source.cfg new file mode 100644 index 0000000000000000000000000000000000000000..9888d818535c1b0fe337a23868fe199a692be3cf --- /dev/null +++ b/sa_profile/dhardware_close_source.cfg @@ -0,0 +1,44 @@ +{ + "jobs" : [{ + "name" : "services:dhardware", + "cmds" : [ + "mkdir /data/service/el1/public/database 0711 ddms ddms", + "mkdir /data/service/el1/public/database/dtbhardware_manager_service 02770 dhardware ddms" + ] + } + ], + "services" : [{ + "name" : "dhardware", + "path" : ["/system/bin/sa_main", "/system/profile/dhardware.json"], + "uid" : "dhardware", + "gid" : ["dhardware"], + "ondemand" : true, + "apl" : "system_basic", + "permission" : [ + "ohos.permission.DISTRIBUTED_DATASYNC", + "ohos.permission.DISTRIBUTED_SOFTBUS_CENTER", + "ohos.permission.CAMERA", + "ohos.permission.ACCESS_SERVICE_DM", + "ohos.permission.ACCESS_DISTRIBUTED_HARDWARE", + "ohos.permission.ENABLE_DISTRIBUTED_HARDWARE", + "ohos.permission.REPORT_RESOURCE_SCHEDULE_EVENT", + "ohos.permission.MONITOR_DEVICE_NETWORK_STATE", + "ohos.permission.ACCESS_SERVICE_DP", + "ohos.permission.GET_TELEPHONY_STATE", + "ohos.permission.MANAGE_SECURE_SETTINGS", + "ohos.permission.ACCESS_BLUETOOTH", + "ohos.permission.GET_WIFI_INFO", + "ohos.permission.ACCESS_DISTRIBUTED_MODEM", + "ohos.permission.SYNC_PROFILE_DP", + "ohos.permission.MANAGE_SETTINGS" + ], + "permission_acls" : [ + "ohos.permission.MONITOR_DEVICE_NETWORK_STATE", + "ohos.permission.SYNC_PROFILE_DP" + ], + "jobs" : { + "on-start" : "services:dhardware" + }, + "secon" : "u:r:dhardware:s0" + }] +} \ No newline at end of file