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
This commit is contained in:
@@ -221,6 +221,7 @@ void copy_logs(bool modified_flash, bool has_cache) {
|
||||
chown(LAST_KMSG_FILE, AID_SYSTEM, AID_SYSTEM);
|
||||
chmod(LAST_LOG_FILE, 0640);
|
||||
chmod(LAST_INSTALL_FILE, 0644);
|
||||
chown(LAST_INSTALL_FILE, AID_SYSTEM, AID_SYSTEM);
|
||||
sync();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user