summaryrefslogtreecommitdiff
path: root/apexer/apexer.py
diff options
context:
space:
mode:
authorJiyong Park <jiyong@google.com>2019-04-24 12:39:37 +0900
committerJiyong Park <jiyong@google.com>2019-04-24 19:26:15 +0900
commitbd19216498df7be19bb60a98def10e8751823f62 (patch)
treefdea74fa8ccbc64853168575ceeee2f3fd13fca3 /apexer/apexer.py
parent72e1b3644e45b8b771534b3a12ab4a8f90b6641d (diff)
Ensure APEXes have minSdkVersion specified
Missing minSdkVersion causes a problem when an APEX is re-signed with sign_target_files_apks. Specifically, if the value is missing, SignApk uses the most conservative algorithm SHA1withRSA which is being deprecated. To fix the problem, when an APEX is built, the default minSdkVersion is specified to ensure that all APEXes have minSdkVersion set. Bug: 131128233 Test: m com.android.runtime.debug; aapt dump badging <path_to_the_apex> shows minSdkVersion Merged-In: Ibc44b094052ea7a8ed96f9f464c55d48af37b04e Change-Id: Ibc44b094052ea7a8ed96f9f464c55d48af37b04e (cherry picked from commit 183acd9b93a28798e00c19fdc04bc7ae8b32a787)
Diffstat (limited to 'apexer/apexer.py')
-rw-r--r--apexer/apexer.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/apexer/apexer.py b/apexer/apexer.py
index c7e9c39..1869a29 100644
--- a/apexer/apexer.py
+++ b/apexer/apexer.py
@@ -358,6 +358,8 @@ def CreateApex(args, work_dir):
cmd.extend(['--version-code', str(manifest_apex.version)])
if args.target_sdk_version:
cmd.extend(['--target-sdk-version', args.target_sdk_version])
+ # Default value for minSdkVersion.
+ cmd.extend(['--min-sdk-version', '28'])
cmd.extend(['-o', apk_file])
cmd.extend(['-I', args.android_jar_path])
RunCommand(cmd, args.verbose)