From bd111ccae2b915a07d1898689bf4777430bd20b4 Mon Sep 17 00:00:00 2001 From: Kelvin Zhang Date: Fri, 7 Apr 2023 09:46:48 -0700 Subject: [PATCH] Add comments explaining how secondary OTA works Test: th Change-Id: I72f890e3dcb6f8369dea8071da040b4c27877a2b --- tools/releasetools/ota_from_target_files.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/releasetools/ota_from_target_files.py b/tools/releasetools/ota_from_target_files.py index 043f6eea41..39e380efc3 100755 --- a/tools/releasetools/ota_from_target_files.py +++ b/tools/releasetools/ota_from_target_files.py @@ -423,6 +423,13 @@ def GetTargetFilesZipForSecondaryImages(input_file, skip_postinstall=False): slot will be used. This is to ensure that we always have valid boot, vbmeta, bootloader images in the inactive slot. + After writing system_other to inactive slot's system partiiton, + PackageManagerService will read `ro.cp_system_other_odex`, and set + `sys.cppreopt` to "requested". Then, according to + system/extras/cppreopts/cppreopts.rc , init will mount system_other at + /postinstall, and execute `cppreopts` to copy optimized APKs from + /postinstall to /data . + Args: input_file: The input target-files.zip file. skip_postinstall: Whether to skip copying the postinstall config file.