Revert "Fix signing failure for split APKs"
This reverts commit 6871779d9b75fed88fb9b8f2d278631a3db30f1e.
Reason for revert: Potential culprit for b/356752725- verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.
Change-Id: I4c29b27f0318901130036dbe8ab9edef37f08875
diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py
index f6f6944..4834834 100644
--- a/tools/releasetools/common.py
+++ b/tools/releasetools/common.py
@@ -2434,23 +2434,12 @@
"Failed to obtain minSdkVersion for {}: aapt2 return code {}:\n{}\n{}".format(
apk_name, proc.returncode, stdoutdata, stderrdata))
- is_split_apk = False
for line in stdoutdata.split("\n"):
- # See b/353837347 , split APKs do not have sdk version defined,
- # so we default to 21 as split APKs are only supported since SDK
- # 21.
- if (re.search(r"split=[\"'].*[\"']", line)):
- is_split_apk = True
# Due to ag/24161708, looking for lines such as minSdkVersion:'23',minSdkVersion:'M'
# or sdkVersion:'23', sdkVersion:'M'.
m = re.match(r'(?:minSdkVersion|sdkVersion):\'([^\']*)\'', line)
if m:
return m.group(1)
- if is_split_apk:
- logger.info("%s is a split APK, it does not have minimum SDK version"
- " defined. Defaulting to 21 because split APK isn't supported"
- " before that.", apk_name)
- return 21
raise ExternalError("No minSdkVersion returned by aapt2 for apk: {}".format(apk_name))