Loading core/Makefile +1 −1 Original line number Diff line number Diff line Loading @@ -3609,7 +3609,7 @@ endif ifeq ($(build_otatools_package),true) INTERNAL_OTATOOLS_MODULES := \ aapt \ aapt2 \ append2simg \ avbtool \ blk_alloc_to_base_fs \ Loading tools/releasetools/Android.bp +1 −1 Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ python_library_host { // Only the tools that are referenced directly are listed as required modules. For example, // `avbtool` is not here, as the script always uses the one from info_dict['avb_avbtool']. required: [ "aapt", "aapt2", "boot_signer", "brotli", "bsdiff", Loading tools/releasetools/check_target_files_signatures.py +1 −1 Original line number Diff line number Diff line Loading @@ -213,7 +213,7 @@ class APK(object): self.certs = frozenset(out) def ReadManifest(self, full_filename): p = common.Run(["aapt", "dump", "xmltree", full_filename, p = common.Run(["aapt2", "dump", "xmltree", full_filename, "--file", "AndroidManifest.xml"], stdout=subprocess.PIPE) manifest, err = p.communicate() Loading tools/releasetools/common.py +4 −4 Original line number Diff line number Diff line Loading @@ -1048,7 +1048,7 @@ def GetKeyPasswords(keylist): def GetMinSdkVersion(apk_name): """Gets the minSdkVersion declared in the APK. It calls 'aapt' to query the embedded minSdkVersion from the given APK file. It calls 'aapt2' to query the embedded minSdkVersion from the given APK file. This can be both a decimal number (API Level) or a codename. Args: Loading @@ -1061,12 +1061,12 @@ def GetMinSdkVersion(apk_name): ExternalError: On failing to obtain the min SDK version. """ proc = Run( ["aapt", "dump", "badging", apk_name], stdout=subprocess.PIPE, ["aapt2", "dump", "badging", apk_name], stdout=subprocess.PIPE, stderr=subprocess.PIPE) stdoutdata, stderrdata = proc.communicate() if proc.returncode != 0: raise ExternalError( "Failed to obtain minSdkVersion: aapt return code {}:\n{}\n{}".format( "Failed to obtain minSdkVersion: aapt2 return code {}:\n{}\n{}".format( proc.returncode, stdoutdata, stderrdata)) for line in stdoutdata.split("\n"): Loading @@ -1074,7 +1074,7 @@ def GetMinSdkVersion(apk_name): m = re.match(r'sdkVersion:\'([^\']*)\'', line) if m: return m.group(1) raise ExternalError("No minSdkVersion returned by aapt") raise ExternalError("No minSdkVersion returned by aapt2") def GetMinSdkVersionInt(apk_name, codename_to_api_level_map): Loading Loading
core/Makefile +1 −1 Original line number Diff line number Diff line Loading @@ -3609,7 +3609,7 @@ endif ifeq ($(build_otatools_package),true) INTERNAL_OTATOOLS_MODULES := \ aapt \ aapt2 \ append2simg \ avbtool \ blk_alloc_to_base_fs \ Loading
tools/releasetools/Android.bp +1 −1 Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ python_library_host { // Only the tools that are referenced directly are listed as required modules. For example, // `avbtool` is not here, as the script always uses the one from info_dict['avb_avbtool']. required: [ "aapt", "aapt2", "boot_signer", "brotli", "bsdiff", Loading
tools/releasetools/check_target_files_signatures.py +1 −1 Original line number Diff line number Diff line Loading @@ -213,7 +213,7 @@ class APK(object): self.certs = frozenset(out) def ReadManifest(self, full_filename): p = common.Run(["aapt", "dump", "xmltree", full_filename, p = common.Run(["aapt2", "dump", "xmltree", full_filename, "--file", "AndroidManifest.xml"], stdout=subprocess.PIPE) manifest, err = p.communicate() Loading
tools/releasetools/common.py +4 −4 Original line number Diff line number Diff line Loading @@ -1048,7 +1048,7 @@ def GetKeyPasswords(keylist): def GetMinSdkVersion(apk_name): """Gets the minSdkVersion declared in the APK. It calls 'aapt' to query the embedded minSdkVersion from the given APK file. It calls 'aapt2' to query the embedded minSdkVersion from the given APK file. This can be both a decimal number (API Level) or a codename. Args: Loading @@ -1061,12 +1061,12 @@ def GetMinSdkVersion(apk_name): ExternalError: On failing to obtain the min SDK version. """ proc = Run( ["aapt", "dump", "badging", apk_name], stdout=subprocess.PIPE, ["aapt2", "dump", "badging", apk_name], stdout=subprocess.PIPE, stderr=subprocess.PIPE) stdoutdata, stderrdata = proc.communicate() if proc.returncode != 0: raise ExternalError( "Failed to obtain minSdkVersion: aapt return code {}:\n{}\n{}".format( "Failed to obtain minSdkVersion: aapt2 return code {}:\n{}\n{}".format( proc.returncode, stdoutdata, stderrdata)) for line in stdoutdata.split("\n"): Loading @@ -1074,7 +1074,7 @@ def GetMinSdkVersion(apk_name): m = re.match(r'sdkVersion:\'([^\']*)\'', line) if m: return m.group(1) raise ExternalError("No minSdkVersion returned by aapt") raise ExternalError("No minSdkVersion returned by aapt2") def GetMinSdkVersionInt(apk_name, codename_to_api_level_map): Loading