Go to file
Tao Bao c61ef45379 DO NOT MERGE Start update_verifier early in late-fs.
We used to start update_verifier after mounting userdata (post-fs-data),
as part of zygote-start. This leads to issues in practice for security
updates, where an A/B device falls back into the old slot (for any
reason, which unrelates to this change) but failing to boot due to
upgraded key blob. It essentially breaks the fallback capability offered
by A/B OTA.

This CL mitigates the issue by starting update_verifier early, before
mounting userdata. This avoids the device from falling back to the old
slot with an already-upgraded key blob. update_verifier loses the
opportunity of verifying _all_ the updated blocks based on the info
that's stored in userdata.  Instead it will only trigger the minimal
read to finish the work of marking a successful boot. This is a
trade-off in P to avoid putting the device in a bad state after
fallback, which will be improved in Q by better handling the fallback
path in vold.

Bug: 131176531
Test: Flash and boot crosshatch. Check the start of update_verifier and
      it marks a successful boot.
Change-Id: I3f4c4333ff38772a9a93c9d027d497db11de1d63
(cherry picked from commit 79cfc7d5a8)
2019-05-10 21:52:50 +00:00
adb Merge "adb: fix double close in jdwp_service." into pi-dev 2018-05-15 04:50:43 +00:00
adf Merge "Add OWNERS." am: 3289b9c928 am: 515c8fe572 2017-12-08 01:29:20 +00:00
base Allow android::base::ScopeGuard in STL containers 2018-03-27 00:38:06 +00:00
bootstat Make bootstat container-friendly 2018-04-16 11:15:49 -07:00
cpio Possible null pointer miss on realloc 2017-03-23 22:41:14 +01:00
debuggerd tombstoned: make missing O_TMPFILE workaround actually work around. 2018-05-03 17:55:16 -07:00
demangle bpfmt. 2018-02-16 17:58:14 -08:00
fastboot Wipe metadata when we wipe userdata and cache. 2018-04-25 21:55:25 +00:00
fs_mgr Revert "Support Speck encryption." 2018-08-07 10:15:19 -07:00
gatekeeperd Merge "Revert "Restore "Add UID parameter to authentication token""" 2018-02-23 17:42:46 +00:00
healthd Merge "Revert "healthd: add stem to health@2.0-service.override [DO NOT MERGE]"" into pi-dev 2018-06-18 23:35:25 +00:00
include Move android_filesystem_config.h => fs_config.h 2017-08-02 16:31:19 -07:00
init Run BoringSSL self test during startup 2019-01-11 15:17:24 -08:00
libappfuse Stop using SO_SNDBUFFORCE 2018-03-15 14:22:27 +09:00
libasyncio bpfmt. 2018-02-16 17:58:14 -08:00
libbacktrace Add a MemoryOfflineBuffer object. 2018-04-04 12:29:25 -07:00
libbinderwrapper libbinderwrapper: Android.mk -> Android.bp 2017-04-25 15:55:26 -07:00
libcrypto_utils Mark the modules as VNDK in Android.bp 2017-09-14 08:35:16 +00:00
libcutils Export maximum number of fds/ints in a native_handle. am: 02debfa2df 2019-01-04 10:53:26 -08:00
libdiskconfig Rename target.linux[_x86[_64]] to target.linux_glibc[_x86[_64]] 2017-10-02 10:44:29 -07:00
libgrallocusage Use -Werror in system/core 2017-11-01 11:32:55 -07:00
libion bpfmt. 2018-02-16 17:58:14 -08:00
libkeyutils Add libkeyutils. 2017-05-10 10:40:11 -07:00
liblog liblog: expect content only if ro.logd.kernel is enabled 2018-06-05 08:42:51 -07:00
libmemtrack Add OWNERS. 2017-12-07 13:30:03 -08:00
libmemunreachable Make memunreachable_test more robust against false negative leaks 2018-05-14 22:17:44 -07:00
libmetricslogger metricslogger: fix ACTION_BATTERY_CAUSED_SHUTDOWN not matching proto 2018-07-19 19:14:58 -07:00
libnativebridge bpfmt. 2018-02-16 17:58:14 -08:00
libnativeloader Support product-specific libraries 2018-05-31 09:59:21 +09:00
libnetutils Merge "Add OWNERS." am: 3289b9c928 2017-12-07 23:51:13 +00:00
libpackagelistparser bpfmt. 2018-02-16 17:58:14 -08:00
libpixelflinger MIPS[64]: codeflinger: Fix build due to unused variable warnings 2017-11-06 16:38:49 +01:00
libprocessgroup Make per-application memcg hierarchy configurable via a property 2018-05-23 16:23:20 -07:00
libprocinfo bpfmt. 2018-02-16 17:58:14 -08:00
libqtaguid Redirect qtaguid native call to netd fwmark client 2017-11-09 18:02:22 -08:00
libsparse Merge "<stdbool.h> not necessary in C++." 2017-10-17 19:26:53 +00:00
libstats Move libstatssocket from frameworks/base to system/core/ 2018-05-07 17:19:10 -07:00
libsuspend Add force_suspend function 2018-01-19 12:30:39 -08:00
libsync Merge "libsync: Add fence info tests" 2017-09-26 23:46:32 +00:00
libsystem Camera: add DISABLE error code 2018-05-31 12:14:14 -07:00
libsysutils Parse IfIndex for Netlink RTM_NEWADDR / RTM_DELADDR event 2018-05-16 23:39:09 +01:00
libunwindstack Fix bug when doing signal handler lookup. 2018-05-21 21:33:02 +00:00
libusbhost Merge "Remove urb request size maximum." am: 1cb765c867 am: 1ab6e9d018 2018-02-13 09:02:38 +00:00
libutils Revert "libutilscallstack is private VNDK-SP" 2018-03-15 10:46:30 +09:00
libvndksupport bpfmt. 2018-02-16 17:58:14 -08:00
libziparchive Merge "Remove empty zip warning on host builds" am: fd42c09813 2018-03-02 02:32:13 +00:00
lmkd lmkd: bump process priority and set to FOREGROUND group before kill 2019-01-23 05:20:36 +00:00
logcat Add a dummy entry for the 70220 event tag 2018-04-19 11:03:28 -07:00
logd logd: notify kernel log readers of new messages 2018-04-25 09:43:21 -07:00
logwrapper Build /vendor/bin/logwrapper too. 2018-04-12 12:12:46 +00:00
mkbootimg Merge "Populate recovery DTBO offset correctly" into pi-dev 2018-06-14 17:29:54 +00:00
property_service Verify the SELabels used in property_contexts 2018-03-26 16:32:05 -07:00
qemu_pipe Add OWNERS. 2017-12-07 13:30:03 -08:00
reboot reboot: only pause indefinitely for non-shutdown operations 2017-09-29 16:29:52 +00:00
rootdir DO NOT MERGE Start update_verifier early in late-fs. 2019-05-10 21:52:50 +00:00
run-as run-as: Keep supplementary groups. 2017-09-29 15:34:23 -04:00
sdcard Add support for esdfs mounting 2018-01-19 12:58:42 -08:00
shell_and_utilities Build /vendor/bin/logwrapper too. 2018-04-12 12:12:46 +00:00
storaged storaged: lower capabilities in init 2018-04-13 11:27:48 -07:00
toolbox Build toolbox with _FILE_OFFSET_BITS=64. 2018-01-22 16:15:55 -08:00
trusty Merge "bpfmt." am: 0609e8d231 am: b57755c429 2018-02-20 02:24:45 +00:00
usbd usbd: Do not join the thread pool 2018-10-24 01:43:06 +00:00
.clang-format Add a 2 width option of clang format. 2017-03-10 13:01:39 -08:00
.clang-format-2 Only allow short functions in class definitions. 2017-03-28 12:31:37 -07:00
.clang-format-4 Only allow short functions in class definitions. 2017-03-28 12:31:37 -07:00
.gitignore Ignore adb/*.pyc files 2015-08-11 12:59:58 -07:00
Android.bp Export android_filesystem_config.h as a filegroup 2017-01-17 18:20:28 -08:00
Android.mk Remove the simulator target from all makefiles. 2011-07-11 22:12:32 -07:00
CleanSpec.mk Add files to CleanSpec.mk 2018-05-16 11:34:11 +08:00
MODULE_LICENSE_APACHE2 auto import from //depot/cupcake/@135843 2013-07-30 13:56:49 -07:00
NOTICE Fix omission in NOTICE file. 2013-07-30 13:56:55 -07:00
OWNERS Add OWNERS. 2017-12-07 13:30:03 -08:00
PREUPLOAD.cfg Add a PREUPLOAD.cfg file to run git-clang-format on every commit 2017-03-08 16:51:26 +08:00
platform_tools_tool_version.mk Fix warning on the build servers 2017-05-25 12:35:40 -07:00