diff --git a/services/etc/BUILD.gn b/services/etc/BUILD.gn index 55b0952b9424b454def68e1a9e6721e0d6fe680b..41ff77b94850762943acce7a8bc3bdd902397ec9 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 618b15a2e1d64c263b8abb63cfb534595fdc40f1..1b3e3b0ea6e17612afbd9dc2df94aa8ea53185b8 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