GithubHelp home page GithubHelp logo

isabella232 / hardware_sony_timekeep Goto Github PK

View Code? Open in Web Editor NEW

This project forked from slimroms/hardware_sony_timekeep

0.0 0.0 0.0 8 KB

License: BSD 3-Clause "New" or "Revised" License

C 55.32% Java 38.72% Makefile 5.96%

hardware_sony_timekeep's Introduction

TimeKeep

TimeKeep is a small utility to keep track of time & date since the RTC driver on Qualcomm chipset is read-only.

It consist of two parts. A native tool, timekeep, to store and restore time and a Java part (com.sony.timekeep) consisting of a single broadcastreceiver that receives ACTION_TIME_CHANGED, ACTION_TIMEZONE_CHANGED and ACTION_SHUTDOWN and then calls timekeep.

When the Java broadcastreceiver gets one of the above intents, timekeep is called with store parameter and the time delta between the set date (in seconds) and /sys/class/rtc/rtc0/since_epoch is stored to a persistent property (persist.sys.timeadjust).

To restore the time timekeep is called with the restore parameter. The persistent property containing the time delta is then read together with the since_epoch value and settimeofday is set with the sum of the two. timekeep with the restore parameter needs CAP_SYS_TIME. The call to restore the time can for example be done in init as the example below.

init.example.rc:

on boot /system/bin/timekeep restore

hardware_sony_timekeep's People

Contributors

humberos avatar necioerrante avatar sonyxperiadev avatar stellirin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.