Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Commit

Permalink
Fix zipalign APK issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Randall Barker committed Nov 29, 2018
1 parent d2f7e44 commit ab56151
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tools/taskcluster/sign_apk.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,9 @@ def main(name, argv):

build_output_path = './app/build/outputs/apk'

# Run zipalign
for apk in glob.glob(build_output_path + "/*/*/*-unsigned.apk"):
split = os.path.splitext(apk)
print subprocess.check_output(["zipalign", "-f", "-v", "-p", "4", apk, split[0] + "-aligned" + split[1]])

# Sign APKs
for apk in glob.glob(build_output_path + "/*/*/*-aligned.apk"):
target = apk.replace('-unsigned-', '-signed-')
target = apk.replace('-unsigned', '-signed')
if not release:
target = target.replace('-release-', '-staging-')
print "Signing", apk
Expand All @@ -51,6 +46,11 @@ def main(name, argv):
"-H", "Authorization: " + token,
sign_url])

# Run zipalign
for apk in glob.glob(build_output_path + "/*/*/*-signed.apk"):
split = os.path.splitext(apk)
print subprocess.check_output(["zipalign", "-f", "-v", "-p", "4", apk, split[0] + "-aligned" + split[1]])

# Create folder for saving build artifacts
artifacts_path = './builds'
if not os.path.exists(artifacts_path):
Expand Down

0 comments on commit ab56151

Please sign in to comment.