Skip to content

Commit

Permalink
Replace Qualcomm time daemon with sony timekeep
Browse files Browse the repository at this point in the history
  • Loading branch information
AlvaroBrey committed May 19, 2017
1 parent 198baf4 commit fa702c5
Show file tree
Hide file tree
Showing 9 changed files with 41 additions and 9 deletions.
5 changes: 5 additions & 0 deletions device.mk
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,11 @@ PRODUCT_PACKAGES += \
libxml2 \
libprotobuf-cpp-full

# TimeKeep
PRODUCT_PACKAGES += \
timekeep \
TimeKeep

# Sensors
PRODUCT_PACKAGES += \
sensors.msm8996
Expand Down
4 changes: 4 additions & 0 deletions lineage.dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,9 @@
{
"repository": "android_packages_resources_devicesettings",
"target_path": "packages/resources/devicesettings"
},
{
"repository": "android_hardware_sony_timekeep",
"target_path": "hardware/sony/timekeep"
}
]
4 changes: 0 additions & 4 deletions proprietary-files.txt
Original file line number Diff line number Diff line change
Expand Up @@ -654,11 +654,7 @@ vendor/lib64/libthermalioctl.so
-vendor/lib/libthermalclient.so

# Time services
-app/TimeService/TimeService.apk
bin/time_daemon
vendor/lib64/libTimeService.so
-vendor/lib64/libtime_genoff.so
vendor/lib/libTimeService.so
-vendor/lib/libtime_genoff.so

# Widevine
Expand Down
11 changes: 6 additions & 5 deletions rootdir/etc/init.qcom.rc
Original file line number Diff line number Diff line change
Expand Up @@ -516,11 +516,12 @@ service thermal-engine /system/vendor/bin/thermal-engine
group root
writepid /dev/cpuset/system-background/tasks

service time_daemon /system/bin/time_daemon
class late_start
user root
group root
writepid /dev/cpuset/system-background/tasks
service timekeep /system/bin/timekeep restore
class late_start
user root
group root
oneshot
writepid /dev/cpuset/system-background/tasks

service adsprpcd /system/bin/adsprpcd
class main
Expand Down
3 changes: 3 additions & 0 deletions sepolicy/file_contexts
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,6 @@
# Data files
/data/decrypt.txt u:object_r:thermal_data_file:s0
/data/misc/netmgr/log.txt u:object_r:netmgrd_data_file:s0

# Timekeep
/system/bin/timekeep u:object_r:timekeep_exec:s0
1 change: 1 addition & 0 deletions sepolicy/property.te
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
type diag_prop, property_type;
type timekeep_prop, property_type;
1 change: 1 addition & 0 deletions sepolicy/property_contexts
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ audio. u:object_r:audio_prop:s0
ro.sys.oem.sno u:object_r:system_radio_prop:s0
sys.fake_bs_flag0 u:object_r:system_radio_prop:s0
sys.fake_bs_flag1 u:object_r:system_radio_prop:s0
persist.sys.timeadjust u:object_r:timekeep_prop:s0
3 changes: 3 additions & 0 deletions sepolicy/system_app.te
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@ allow system_app proc_touchpanel:dir search;
allow system_app proc_touchpanel:file rw_file_perms;

allow system_app sysfs_fpc_proximity:file rw_file_perms;

allow system_app time_data_file:file rw_file_perms;
set_prop(system_app, timekeep_prop)
18 changes: 18 additions & 0 deletions sepolicy/timekeep.te
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit fa702c5

Please sign in to comment.