diff --git a/BoardConfigCommon.mk b/BoardConfigCommon.mk index b0a6388..703ff8c 100644 --- a/BoardConfigCommon.mk +++ b/BoardConfigCommon.mk @@ -185,7 +185,7 @@ TARGET_USERIMAGES_USE_F2FS := true # SELinux include device/qcom/sepolicy/sepolicy.mk -# BOARD_SEPOLICY_DIRS += $(VENDOR_PATH)/sepolicy +BOARD_SEPOLICY_DIRS += $(VENDOR_PATH)/sepolicy # Wifi BOARD_HAS_QCOM_WLAN := true diff --git a/lineage.dependencies b/lineage.dependencies index 18dcbce..2304adb 100644 --- a/lineage.dependencies +++ b/lineage.dependencies @@ -14,5 +14,9 @@ { "repository": "android_hardware_samsung", "target_path": "hardware/samsung" + }, + { + "repository": "android_hardware_sony_timekeep", + "target_path": "hardware/sony/timekeep" } ] diff --git a/msm8976.mk b/msm8976.mk index 8c344d1..b77461e 100644 --- a/msm8976.mk +++ b/msm8976.mk @@ -209,6 +209,11 @@ PRODUCT_PACKAGES += \ init.qcom.usb.rc \ ueventd.qcom.rc +# TimeKeep +PRODUCT_PACKAGES += \ + timekeep \ + TimeKeep + # WCNSS PRODUCT_COPY_FILES += \ $(LOCAL_PATH)/wifi/WCNSS_qcom_sdio_cfg.ini:system/etc/wifi/WCNSS_qcom_sdio_cfg.ini \ diff --git a/proprietary-files.txt b/proprietary-files.txt index ad2bdea..d5ec973 100644 --- a/proprietary-files.txt +++ b/proprietary-files.txt @@ -470,12 +470,8 @@ vendor/lib64/libthermalioctl.so vendor/lib/libthermalclient.so # Time services --app/TimeService/TimeService.apk -bin/time_daemon -vendor/lib64/libtime_genoff.so -vendor/lib/libtime_genoff.so -vendor/lib64/libTimeService.so -vendor/lib/libTimeService.so # WideVine - from bullhead vendor/lib/libwvdrm_L1.so|3eaf8ed1cb337608a1ccdb80d2c95804e7aea323 diff --git a/rootdir/etc/init.qcom.rc b/rootdir/etc/init.qcom.rc index e980214..861cb80 100644 --- a/rootdir/etc/init.qcom.rc +++ b/rootdir/etc/init.qcom.rc @@ -1628,9 +1628,6 @@ service msm_irqbal_lb /system/bin/msm_irqbalance -f /system/vendor/etc/msm_irqba group root writepid /dev/cpuset/system-background/tasks -on property:vold.decrypt=trigger_restart_min_framework - start time_daemon - # Start camera server as daemon service qcamerasvr /system/bin/mm-qcamera-daemon class late_start @@ -1659,10 +1656,11 @@ service thermal-engine /system/vendor/bin/thermal-engine group root writepid /dev/cpuset/system-background/tasks -service time_daemon /system/bin/time_daemon +service timekeep /system/bin/timekeep restore class late_start user root group root + oneshot writepid /dev/cpuset/system-background/tasks service audiod /system/bin/audiod diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts new file mode 100644 index 0000000..3e2dec8 --- /dev/null +++ b/sepolicy/file_contexts @@ -0,0 +1 @@ +/system/bin/timekeep u:object_r:timekeep_exec:s0 diff --git a/sepolicy/property.te b/sepolicy/property.te new file mode 100644 index 0000000..59ec853 --- /dev/null +++ b/sepolicy/property.te @@ -0,0 +1 @@ +type timekeep_prop, property_type; diff --git a/sepolicy/property_contexts b/sepolicy/property_contexts new file mode 100644 index 0000000..ad0a920 --- /dev/null +++ b/sepolicy/property_contexts @@ -0,0 +1 @@ +persist.sys.timeadjust u:object_r:timekeep_prop:s0 diff --git a/sepolicy/system_app.te b/sepolicy/system_app.te new file mode 100644 index 0000000..ce0969c --- /dev/null +++ b/sepolicy/system_app.te @@ -0,0 +1,3 @@ +allow system_app time_data_file:file rw_file_perms; + +set_prop(system_app, timekeep_prop) diff --git a/sepolicy/timekeep.te b/sepolicy/timekeep.te new file mode 100644 index 0000000..a7c39d8 --- /dev/null +++ b/sepolicy/timekeep.te @@ -0,0 +1,18 @@ +type timekeep, domain, domain_deprecated; +type timekeep_exec, exec_type, file_type; + +# Started by init +init_daemon_domain(timekeep) + +allow timekeep self:capability { + fowner + fsetid + sys_time + dac_override + dac_read_search +}; + +allow timekeep time_data_file:file create_file_perms; +allow timekeep time_data_file:dir create_dir_perms; + +set_prop(timekeep, timekeep_prop)