From 2b1a464a7045134b0980def4ea906b98ab3616f1 Mon Sep 17 00:00:00 2001 From: Tianjie Xu Date: Thu, 6 Sep 2018 11:58:55 -0700 Subject: Move the parse of last_install to recovery-persist The recovery-persist used to look for the related recovery logs in persist storage, and copy them under /data/misc/recovery during the normal boot process. As we also want to find out the sideload information from last_install, it makes more sense to move the parse & report of non-a/b metrics to recovery-persist. Thus we can avoid the race condition of the file system between the native code and RecoverySystem. Bug: 114278989 Test: unit test pass, check the event buffer for metrics report Change-Id: I32d7b2b831bc74a61a70af9a2f0b8a7e9b3e36ee --- Android.mk | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'Android.mk') diff --git a/Android.mk b/Android.mk index 80d107dc4..7be123069 100644 --- a/Android.mk +++ b/Android.mk @@ -71,10 +71,13 @@ LOCAL_REQUIRED_MODULES += \ endif endif +# On A/B devices recovery-persist reads the recovery related file from the persist storage and +# copies them into /data/misc/recovery. Then, for both A/B and non-A/B devices, recovery-persist +# parses the last_install file and reports the embedded update metrics. Also, the last_install file +# will be deteleted after the report. +LOCAL_REQUIRED_MODULES += recovery-persist ifeq ($(BOARD_CACHEIMAGE_PARTITION_SIZE),) -LOCAL_REQUIRED_MODULES += \ - recovery-persist \ - recovery-refresh +LOCAL_REQUIRED_MODULES += recovery-refresh endif include $(BUILD_PHONY_PACKAGE) -- cgit v1.2.3