From c5a45081525fab2d7db7f1b6d36a971a2cae7bbe Mon Sep 17 00:00:00 2001 From: chenmudan Date: Thu, 1 Dec 2022 22:26:50 +0800 Subject: [PATCH] fixed 9b78e13 from https://gitee.com/chenmudan/startup_init_lite/pulls/1595 add customization of const.debuggable and const.build.characteristics issue: https://gitee.com/openharmony/build/issues/I6478U Signed-off-by: chenmudan Change-Id: I2461f7d161de41f76bda856c056a32b13bad8912 --- services/etc/BUILD.gn | 20 +++++++++++++++++++- services/etc/param/ohos.para | 2 +- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/services/etc/BUILD.gn b/services/etc/BUILD.gn index 55b0952b..41ff77b9 100755 --- a/services/etc/BUILD.gn +++ b/services/etc/BUILD.gn @@ -119,8 +119,26 @@ if (defined(ohos_lite)) { ] part_name = "init" subsystem_name = "startup" + extra_paras = [] if (target_cpu == "arm64") { - extra_paras = [ "const.product.cpu.abilist=arm64-v8a" ] + extra_paras += [ "const.product.cpu.abilist=arm64-v8a" ] + } + if (build_variant == "user") { + extra_paras += [ + "const.secure=1", + "const.debuggable=0", + ] + } else if (build_variant == "root") { + extra_paras += [ + "const.secure=0", + "const.debuggable=1", + ] + } + if (device_type != "default") { + extra_paras += [ + "const.product.devicetype=${device_type}", + "const.build.characteristics=${device_type}", + ] } module_install_dir = "etc/param" } diff --git a/services/etc/param/ohos.para b/services/etc/param/ohos.para index 618b15a2..1b3e3b0e 100755 --- a/services/etc/param/ohos.para +++ b/services/etc/param/ohos.para @@ -13,7 +13,7 @@ const.actionable_compatible_property.enabled=false const.postinstall.fstab.prefix=/system -const.secure=1 +const.secure=0 security.perf_harden=1 const.allow.mock.location=0 const.debuggable=1 -- GitLab