本文介紹在OpenHarmony 5.0 Release操作系統(tǒng)下,去除鎖屏開機后直接進入界面的方法。觸覺智能Purple Pi OH鴻蒙開發(fā)板演示,搭載了瑞芯微RK3566四核處理器,1TOPS算力NPU;Laval鴻蒙社區(qū)推薦并通過了開源鴻蒙XTS認證,成功適配OpenHarmony3.2、4.0、4.1、5.0 Release系統(tǒng),SDK源碼全開放!
刪除ScreenLock相關(guān)配置
將以下文件ScreenLock相關(guān)配置,刪除或?qū)⒋a注釋:
applicationsstandardhapBUILD.gn
# ohos_prebuilt_etc("screenLock_hap") {
# source = "SystemUI-ScreenLock.hap"
# module_install_dir = "app/com.ohos.systemui"
# part_name = "prebuilt_hap"
# subsystem_name = "applications"
# }
# "http://applications/standard/hap:screenLock_hap",
如下圖所示:
刪除foundation.cfg相關(guān)配置
找到以下路徑文件,將相關(guān)配置刪除:
/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文件不支持注釋。
之后將代碼重新編譯,即可去除鎖屏