From 09bdb325a7d049d0f6bf6fa5008e97f925c56d3b Mon Sep 17 00:00:00 2001 From: Neil Fuller Date: Thu, 6 Jun 2019 15:18:36 +0100 Subject: [PATCH] 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 --- rootdir/init.rc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rootdir/init.rc b/rootdir/init.rc index 84fa46e75..d781e42aa 100644 --- a/rootdir/init.rc +++ b/rootdir/init.rc @@ -602,8 +602,9 @@ on post-fs-data # Set SELinux security contexts on upgrade or policy update. restorecon --recursive --skip-ce /data - # Check any timezone data in /data is newer than the copy in the runtime module, delete if not. - exec - system system -- /system/bin/tzdatacheck /apex/com.android.runtime/etc/tz /data/misc/zoneinfo + # Check any timezone data in /data is newer than the copy in the time zone data + # 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..rc file, you # must uncomment this line, otherwise encrypted filesystems