signapk: --align-file-size flag

A new flag tells that the resulting file size should be aligned as well.

For example, signapk -a 4096 --align-file-size ... generates the output
file of 4K-aligned sized.

Bug: 192991318
Test: check built APEX file size.
  APEX files should be sized as 4K-aligned.
Change-Id: I1c287e7219b4551bbb3e5957bdb64d80adfd3c39
This commit is contained in:
Jooyung Han
2021-07-12 13:23:52 +09:00
parent 37e6196c4e
commit ebe9afeb4a
2 changed files with 50 additions and 9 deletions

View File

@@ -370,7 +370,7 @@ def SignUncompressedApex(avbtool, apex_file, payload_key, container_key,
# Specify the 4K alignment when calling SignApk.
extra_signapk_args = OPTIONS.extra_signapk_args[:]
extra_signapk_args.extend(['-a', '4096'])
extra_signapk_args.extend(['-a', '4096', '--align-file-size'])
password = container_pw.get(container_key) if container_pw else None
common.SignFile(