build: ota: Support for install tools in /tmp/install
* Anything in OUT/install gets packaged up into the zip and extracted to /tmp/install immediately after FullOTA_InstallBegin. * Use /tmp/install in edify scripts and remove code related to using and manipulating /system for install tools. * Modified to support signing steps being split from build steps. Package install files into target-files INSTALL path Read from target-files for OTA package creation From Change-Id: I64f919c2a757b5474f6cc5f82bd6c33c2a8b558a * This also fully reverts commit6a324ba
and partially reverts commitf388104
as the functions are still needed here. From Change-Ids: I4911244ec9945d197d2b56d0d11eab6d2f7b6d3e I4943e2e89ee5c810a63746c570dc5e31e95b8c53 Squashed with the following: Author: LuK1337 <priv.luk@gmail.com> Date: Wed Feb 19 02:14:59 2020 +0100 releasetools: Use 0oXXX instead of 0XXX for octal * Fixes py3 syntax error. Change-Id: Ia9ca6e392f43694ddf4c952b07bf159e8dead36e Author: LuK1337 <priv.luk@gmail.com> Date: Fri Nov 13 15:27:24 2020 +0100 Add $(PRODUCT_OUT)/install to INTERNAL_RECOVERYIMAGE_FILES * Fixes $(PRODUCT_OUT)/install not being included on targets not providing their own /vendor || /system/vendor. Change-Id: I15b8305bb7efacfcf3018708bf7ff8b8500744fb Change-Id: I315a3238e36c8d15e26f935e272f7e27dd59c320
This commit is contained in:
@@ -109,6 +109,15 @@ def GetBlockDifferences(target_zip, source_zip, target_info, source_info,
|
||||
return block_diff_dict
|
||||
|
||||
|
||||
def CopyInstallTools(output_zip):
|
||||
install_path = os.path.join(OPTIONS.input_tmp, "INSTALL")
|
||||
for root, subdirs, files in os.walk(install_path):
|
||||
for f in files:
|
||||
install_source = os.path.join(root, f)
|
||||
install_target = os.path.join("install", os.path.relpath(root, install_path), f)
|
||||
output_zip.write(install_source, install_target)
|
||||
|
||||
|
||||
def WriteFullOTAPackage(input_zip, output_file):
|
||||
target_info = common.BuildInfo(OPTIONS.info_dict, OPTIONS.oem_dicts)
|
||||
|
||||
@@ -207,6 +216,11 @@ else if get_stage("%(bcb_dev)s") == "3/3" then
|
||||
|
||||
device_specific.FullOTA_InstallBegin()
|
||||
|
||||
CopyInstallTools(output_zip)
|
||||
script.UnpackPackageDir("install", "/tmp/install")
|
||||
script.SetPermissionsRecursive("/tmp/install", 0, 0, 0o755, 0o644, None, None)
|
||||
script.SetPermissionsRecursive("/tmp/install/bin", 0, 0, 0o755, 0o755, None, None)
|
||||
|
||||
# All other partitions as well as the data wipe use 10% of the progress, and
|
||||
# the update of the system partition takes the remaining progress.
|
||||
system_progress = 0.9 - (len(block_diff_dict) - 1) * 0.1
|
||||
|
Reference in New Issue
Block a user