本文介绍在OpenHarmony 5.0 Release操作系统下,去除锁屏开机后直接进入界面的方法。触觉智能Purple Pi OH鸿蒙开发板演示

开发板社区简介:https://laval.csdn.net/677387cc61f6a61b946136cd.html

 

删除ScreenLock相关配置

将以下文件ScreenLock相关配置,删除或将代码注释:

applications\standard\hap\BUILD.gn

 

# ohos_prebuilt_etc("screenLock_hap") {
# source = "SystemUI-ScreenLock.hap"
# module_install_dir = "app/com.ohos.systemui"
# part_name = "prebuilt_hap"
# subsystem_name = "applications"
# }
# "//applications/standard/hap:screenLock_hap",

 

如下图所示:

 

图片

 

图片

删除foundation.cfg相关配置

找到以下路径文件,将相关配置删除:

/foundation/systemabilitymgr/safwk/etc/profile/foundation.cfg

删除前:

 

 "bootevents": [                "bootevent.wms.fullscreen.ready",
                "bootevent.appfwk.ready",
                "bootevent.lockscreen.ready"
            ],

 

删除后:

 

"bootevents": [                "bootevent.wms.fullscreen.ready",
                "bootevent.appfwk.ready"
            ],

​​​​​​​

 

图片

注意:删除 "bootevent.lockscreen.ready"后将appfwk.ready后面的逗号删除,并且foundation.cfg文件不支持注释。

之后将代码重新编译,即可去除锁屏。

 

Logo

社区规范:仅讨论OpenHarmony相关问题。

更多推荐