miatoll: Switch from time_daemon to TimeKeep

* time_daemon just refuses to work properly on mata.
    Sony's TimeKeep, instead, does the job flawlessly,
    so just ditch the former in favor of the latter.

Signed-off-by: Roberto Sartori <roberto.sartori.android@gmail.com>
Change-Id: I54f50ed3d49efc2834d478781b15e6ee428a3062
This commit is contained in:
Roberto Sartori 2022-12-29 10:30:17 +01:00 committed by Alexander Winkowski
parent 465d065dae
commit 6f042cb1c6
No known key found for this signature in database
GPG Key ID: 72762A66704CDE44
10 changed files with 44 additions and 13 deletions

View File

@ -1,4 +1,10 @@
[
{
"repository": "LineageOS/android_hardware_sony_timekeep",
"target_path": "hardware/sony/timekeep",
"branch": "lineage-20",
"remote": "github"
},
{
"repository": "hardware_xiaomi",
"target_path": "hardware/xiaomi",

View File

@ -404,6 +404,10 @@ PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/thermal-engine-gram.conf:$(TARGET_COPY_OUT_VENDOR)/etc/thermal-engine-gram.conf \
$(LOCAL_PATH)/configs/thermal-engine-joyeuse.conf:$(TARGET_COPY_OUT_VENDOR)/etc/thermal-engine-joyeuse.conf
# TimeKeep
PRODUCT_PACKAGES += \
TimeKeep
# USB
PRODUCT_PACKAGES += \
android.hardware.usb@1.0-service

View File

@ -1125,9 +1125,6 @@ vendor/bin/thermal-engine|549f8284d4aca92e2b8187ab2a283a90c40e6dca
vendor/lib64/libthermalclient.so
# Time services
vendor/app/TimeService/TimeService.apk
vendor/bin/time_daemon
vendor/etc/init/init.time_daemon.rc
vendor/lib64/libtime_genoff.so
# Touchscreen firmware

View File

@ -176,7 +176,6 @@ on boot
mkdir /persist/bluetooth 0770 bluetooth bluetooth
mkdir /persist/misc 0770 system system
mkdir /persist/alarm 0770 system system
mkdir /mnt/vendor/persist/time 0770 system system
mkdir /mnt/vendor/persist/secnvm 0770 system system
mkdir /mnt/vendor/persist/iar_db 0770 system system
mkdir /mnt/vendor/spunvm 0770 system system
@ -360,9 +359,6 @@ on post-fs-data
mkdir /dev/socket/wifihal 0770 wifi wifi
chmod 2770 /dev/socket/wifihal
# Create /data/time folder for time-services
mkdir /data/vendor/time/ 0700 system system
setprop vold.post_fs_data_done 1
#Create a folder for SRS to be able to create a usercfg file
@ -797,12 +793,6 @@ service poweroffhandler /system/vendor/bin/poweroffhandler
disabled
oneshot
service time_daemon /vendor/bin/time_daemon
class main
user system
group system
capabilities SYS_TIME
# Set vendor-ril lib path based on Meta version
on property:vendor.rild.libpath=*
setprop rild.libpath ${vendor.rild.libpath}

View File

@ -30,3 +30,6 @@
/vendor/bin/hw/android\.hardware\.thermal@2\.0-service\.pixel u:object_r:hal_thermal_default_exec:s0
/vendor/bin/thermal_symlinks u:object_r:init-thermal-symlinks-sh_exec:s0
/dev/thermal(/.*)? u:object_r:thermal_link_device:s0
# Time
/vendor/bin/timekeep u:object_r:timekeep_exec:s0

View File

@ -2,4 +2,6 @@ vendor_internal_prop(vendor_power_prop)
vendor_internal_prop(vendor_thermal_prop)
vendor_internal_prop(vendor_timekeep_prop)
vendor_restricted_prop(vendor_fingerprint_prop)

View File

@ -16,3 +16,6 @@ vendor.powerhal.rendering u:object_r:vendor_power_prop:s0
# Thermal
vendor.thermal. u:object_r:vendor_thermal_prop:s0
# Time
persist.vendor.timeadjust u:object_r:vendor_timekeep_prop:s0

1
sepolicy/vendor/seapp_contexts vendored Normal file
View File

@ -0,0 +1 @@
user=system seinfo=platform name=com.sony.timekeep domain=vendor_timekeep_app

13
sepolicy/vendor/timekeep.te vendored Normal file
View File

@ -0,0 +1,13 @@
type timekeep, domain;
type timekeep_exec, exec_type, vendor_file_type, file_type;
init_daemon_domain(timekeep)
allow timekeep self:capability sys_time;
allow timekeep vendor_time_data_file:dir rw_dir_perms;
allow timekeep vendor_time_data_file:file create_file_perms;
r_dir_file(timekeep, sysfs_rtc)
set_prop(timekeep, vendor_timekeep_prop)

12
sepolicy/vendor/timekeep_app.te vendored Normal file
View File

@ -0,0 +1,12 @@
type vendor_timekeep_app, domain;
app_domain(vendor_timekeep_app)
allow vendor_timekeep_app activity_service:service_manager find;
allow vendor_timekeep_app vendor_time_data_file:dir search;
allow vendor_timekeep_app vendor_time_data_file:file create_file_perms;
r_dir_file(vendor_timekeep_app, sysfs_rtc)
set_prop(vendor_timekeep_app, vendor_timekeep_prop)