Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 09bdb325 authored by Neil Fuller's avatar Neil Fuller
Browse files

Switch tzdatacheck to comparing tzdata module file

The old "time zone updates via APK" feature installs time zone data
files in /data. tzdatacheck is run during boot to guard against an
OTA leaving the data in /data older, or in a different format, than the
files that exist elsewhere on device. If such files existed the system
could use old versions of tzdb (and related) data or even end up
unstable.

Soon, the time zone data mainline module will be made "functionally
mandatory" by the removal of most time zone data files from the
runtime module APEX, i.e. the time zone data module cannot be absent,
and the runtime module won't have files to compare against.

This change modifies the command line args for tzdatacheck to reference
the contents of time zone data module instead of the runtime module.

Bug: 132168458
Test: Build / boot / inspect logcat
Change-Id: Iac8023b7cbb72213df344d603c121caa867a196f
parent 9252d313
Loading
Loading
Loading
Loading
+3 −2
Original line number Original line Diff line number Diff line
@@ -602,8 +602,9 @@ on post-fs-data
    # Set SELinux security contexts on upgrade or policy update.
    # Set SELinux security contexts on upgrade or policy update.
    restorecon --recursive --skip-ce /data
    restorecon --recursive --skip-ce /data


    # Check any timezone data in /data is newer than the copy in the runtime module, delete if not.
    # Check any timezone data in /data is newer than the copy in the time zone data
    exec - system system -- /system/bin/tzdatacheck /apex/com.android.runtime/etc/tz /data/misc/zoneinfo
    # module, delete if not.
    exec - system system -- /system/bin/tzdatacheck /apex/com.android.tzdata/etc/tz /data/misc/zoneinfo


    # If there is no post-fs-data action in the init.<device>.rc file, you
    # If there is no post-fs-data action in the init.<device>.rc file, you
    # must uncomment this line, otherwise encrypted filesystems
    # must uncomment this line, otherwise encrypted filesystems