| Commit message (Collapse) | Author | Age | Files | Lines |
| |\
| |
| | |
timekeep: Ensure ats_2 file is always 8 bytes.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
`long` on 32-bit platforms is generally 4 bytes long instead of 8 on
64-bit platforms. Use uint64_t to ensure it is always exactly 8 bytes.
For consistency convert the other variables to `unsigned long long`,
which is guaranteed to hold _at least_ a 64-bit number regardless of the
target architecture.
Signed-off-by: MarijnS95 <marijns95@gmail.com>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
Fixes the following warning.
In file included from vendor/oss/timekeep/timekeep.c:44:
system/core/libcutils/include_vndk/cutils/log.h:38:2: warning: "Deprecated: don't include cutils/log.h, use either android/log.h or log/log.h" [-W#warnings]
Signed-off-by: MarijnS95 <marijns95@gmail.com>
|
| |\ \
| |/
|/| |
Build timekeep.rc for all targets and set owner of RTC node
|
| |/
|
|
|
|
|
| |
* There is no need to just build it for arm64
* /sys/class/rtc/rtc0/since_epoch has to belong to system for timekeep to work
Change-Id: Id14781e8953a07d2aea4cf1924afeb2a25801057
|
| |\
| |
| | |
timekeep.rc: Drop root privileges
|
| | |
| |
| |
| |
| | |
timekeep can run under the system user as long as it
possesses CAP_SYS_TIME.
|
| |\ \
| |/
|/| |
[WIP] Use persist.vendor.timeadjust for prop
|
| |/
|
|
|
| |
This is needed to fulfil Android's new requirements for
"compatible" properties.
|
| |
|
|
|
|
|
| |
The LOCAL_PROPRIETARY_MODULE is not handled corecly by the
older SDK versions and we need a build guard
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
|
| |\
| |
| | |
TimeKeep: Declare as VENDOR_MODULE
|
| |/
|
|
|
|
| |
Declaring LOCAL_PROPRIETARY_MODULE means TimeKeep.apk will get
installed to /vendor/priv-app instead of /system/priv-app, making it
compatible with Treble ROMs.
|
| |\
| |
| | |
timekeep: Create /data/vendor/time as well
|
| |/
|
|
|
| |
* Since c8a82a8 has been merged it'd be nice to create
directory required for it.
|
| |\
| |
| | |
Remove not needed file permission change
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
Setting the permission on the ats_2 file to 0777 is bad since we should not write executable files to /data. With this current functionality timekeep requires invasive sepolicy, such as fowner and fsetid.
Changing the permissions on this file is actually not necessary since timekeep is run as root, and the default owner of ats_2 is root with file permissions of 0600. This is actually sufficient for the timekeep functionality, for both the C and Java parts.
With this patch we can set saner sepolicy for timekeep.
Tested on suzu, confirming the functionality of both timekeep (C) and TimeKeep (Java) services.
|
| |\ \ |
|
| |/| | |
|
| | | |
| | |
| | |
| | | |
Change-Id: Ia4a35bc2c38516f5affce7436f2853aa66c28b95
|
| |\ \ \
| | | |
| | | | |
Don't use shell in make file
|
| |/ / /
| | |
| | |
| | |
| | |
| | | |
...when there are alternatives. (It's faster and safer.)
Signed-off-by: Zoran Jovanovic <zoran.jovanovic@sony.com>
|
| |\ \ \
| | | |
| | | | |
Let TimeKeep use private platform APIs
|
| |/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* /we/ tried to fix it before by setting
LOCAL_SDK_VERSION := current but apparently
no one tested if it actually compiled.
* Setting LOCAL_PRIVATE_PLATFORM_APIS := true makes
it compile properly as the package depends on
private APIs such as android.os.SystemProperties.
* Lets also remove unnecessary version filter while
at it. There's literally no reason to ever do that.
Change-Id: I795d6c647568be1c802e609d8ff93759da3873bd
|
| |\ \ \
| | | |
| | | | |
Timekeep: set LOCAL_SDK_VERSION to current
|
| |/ / /
| | |
| | |
| | |
| | |
| | | |
to avoid build problems in android pie
Signed-off-by: David Viteri <davidteri91@gmail.com>
|
| | | |
| | |
| | |
| | |
| | |
| | | |
Add headers explicitly.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
|
| | | |
| | |
| | |
| | |
| | |
| | | |
the permissions are moved from common folder to the project
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
|
| | |/
|/|
| |
| |
| |
| | |
the init script is used by Android 8 and later
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
|
| |\ \
| |/
|/| |
timekeep: move to vendor
|
| |/
|
|
|
|
|
|
|
|
| |
system for aosp stuff
vendor for OSS stuff
odm for prebuilt libs provided by OEM
make sure it will be used since api level 25 n-mr1
Signed-off-by: David Viteri <davidteri91@gmail.com>
|
| |\
| |
| | |
timekeep: Add liblog as shared library dependency
|
| |/
|
|
|
|
|
|
|
|
|
| |
fixes
hardware/sony/timekeep/timekeep.c:65: error: undefined reference to '__android_log_print'
hardware/sony/timekeep/timekeep.c:55: error: undefined reference to '__android_log_print'
hardware/sony/timekeep/timekeep.c:89: error: undefined reference to '__android_log_print'
hardware/sony/timekeep/timekeep.c:115: error: undefined reference to '__android_log_print'
Signed-off-by: David Viteri <davidteri91@gmail.com>
|
| |\
| |
| | |
timekeep: Store the adjusted value into ats_2 file
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Store the adjusted value into /data/time/ats_2 file
TWRP will read this value from this path and fix the time
This patch requires some changes in ramdisk, selinux and twrp.
TWRP:
TARGET_RECOVERY_QCOM_RTC_FIX := true
reference: https://gerrit.omnirom.org/#/c/18410/
RAMDISK:
on boot
...
mkdir /data/time/ 0700 system system
reference: https://gerrit.omnirom.org/#/c/18411/
SELINUX:
file.te
type timekeep_data_file, file_type, data_file_type;
file_contexts
/data/time(/.*)? u:object_r:timekeep_data_file:s0
system_app.te
allow system_app timekeep_data_file:dir { create_dir_perms search };
allow system_app timekeep_data_file:file create_file_perms;
timekeep.te
allow timekeep self:capability {
sys_time
dac_override
dac_read_search
};
allow timekeep timekeep_data_file:file create_file_perms;
allow timekeep timekeep_data_file:dir { create_dir_perms search };
reference: https://gerrit.omnirom.org/#/c/18409/
Signed-off-by: Humberto Borba <humberos@gmail.com>
Change-Id: I52ff27c377b8a4663762e0c3f6c21d353217dced
|
| |\
| |
| | |
timekeep: fix header include
|
| |/
|
|
|
|
| |
it is required for memset during karin build process
Signed-off-by: Humberto Borba <humberos@gmail.com>
|
| |\
| |
| | |
TimeKeep should be a privileged system module
|
| |/
|
|
|
|
| |
TimeKeep's sole purpose in life is to update 'persist.sys.timeadjust'
so TimeKeep needs to be a privileged system module. This change is
necessary for a sane SELinux policy.
|
| |
|
|
|
|
| |
in m-preview we need to include errno.h
Signed-off-by: Alin Jerpelea <alin.jerpelea@sonymobile.com>
|
| |\
| |
| | |
timekeep: fix a typo
|
| |/
|
|
|
|
| |
timekeep: fix a typo
TAGE -> TAGS
Author: Jake Whatley <jacob.whatley91@gmail.com>
|
| |\
| |
| | |
Adding a log tag for easier filtering
|
| |/ |
|
| | |
|
| | |
|
| |
|