mirror of
https://github.com/Evolution-X-Devices/device_google_wahoo
synced 2026-01-28 13:18:23 +00:00
Set system time early to get more accurate timezones
Zygote reads the system time and caches the timezone information.
So start time_daemon early so that it can set the time before
zygote starts up and reads the time.
Bug: 62473512
Test: Manual: Check adb logs to ensure Zygote starts after system
time is set.
Change-Id: I98fca37928e1822614f9fcb39869e664453a2c3e
This commit is contained in:
@@ -185,6 +185,9 @@ on late-fs
|
||||
# Mount RW partitions which need run fsck
|
||||
mount_all /vendor/etc/fstab.${ro.hardware} --late
|
||||
|
||||
# Start time daemon early so that the system time can be set early
|
||||
start time_daemon
|
||||
|
||||
on post-fs
|
||||
# set RLIMIT_MEMLOCK to 64MB
|
||||
setrlimit 8 67108864 67108864
|
||||
@@ -223,6 +226,8 @@ on post-fs-data
|
||||
# Set indication (checked by vold) that we have finished this action
|
||||
setprop vold.post_fs_data_done 1
|
||||
|
||||
# Wait until the system time is set
|
||||
wait_for_prop sys.time.set true
|
||||
|
||||
# zygote need to be started after otapreopt which will be done on post-fs-data
|
||||
on zygote-start
|
||||
@@ -491,7 +496,7 @@ service qseecomd /vendor/bin/qseecomd
|
||||
group root
|
||||
|
||||
service time_daemon /vendor/bin/time_daemon
|
||||
class late_start
|
||||
class core
|
||||
user root
|
||||
group root
|
||||
|
||||
|
||||
1
sepolicy/vendor/property.te
vendored
1
sepolicy/vendor/property.te
vendored
@@ -12,3 +12,4 @@ type wc_prop, property_type;
|
||||
type thermal_prop, property_type;
|
||||
type modem_diag_prop, property_type;
|
||||
type tel_mon_prop, property_type;
|
||||
type sys_time_prop, property_type;
|
||||
|
||||
1
sepolicy/vendor/property_contexts
vendored
1
sepolicy/vendor/property_contexts
vendored
@@ -20,3 +20,4 @@ ctl.thermal-engine u:object_r:thermal_prop:s0
|
||||
persist.sys.modem.diag. u:object_r:modem_diag_prop:s0
|
||||
sys.modem.diag. u:object_r:modem_diag_prop:s0
|
||||
persist.radio.enable_tel_mon u:object_r:tel_mon_prop:s0
|
||||
sys.time.set u:object_r:sys_time_prop:s0
|
||||
|
||||
3
sepolicy/vendor/time_daemon.te
vendored
3
sepolicy/vendor/time_daemon.te
vendored
@@ -13,6 +13,9 @@ allow time_daemon sysfs_soc:dir search;
|
||||
allow time_daemon sysfs_soc:file r_file_perms;
|
||||
allow time_daemon sysfs_msm_subsys:dir search;
|
||||
|
||||
# Set sys.time.set property
|
||||
set_prop(time_daemon, sys_time_prop);
|
||||
|
||||
allow time_daemon persist_file:dir w_dir_perms;
|
||||
allow time_daemon persist_file:file rw_file_perms;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user