Created
December 26, 2014 14:12
-
-
Save junaidk/5d7f3ca2b7a93de15b87 to your computer and use it in GitHub Desktop.
Sign and align multiple unaligned apks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # java and sdk tools should be on system path | |
| # it needs zipalign and jarsigner tools | |
| # http://developer.android.com/tools/publishing/app-signing.html | |
| from subprocess import call | |
| keyPass = "" | |
| storepass = "" | |
| alias = "" | |
| keyStorePath = "" | |
| ins = open( "apksList.txt", "r" ) | |
| array = [] | |
| for line in ins: | |
| line = line.strip() | |
| array.append( line ) | |
| print("starting => " + line ) | |
| call("jarsigner -verbose -keystore " +keyStorePath+ " -storepass "+storepass+" -keypass " +keypass +" "+line +" "+alias) | |
| print("====== ending =====") | |
| ins.close() | |
| print("### signing") | |
| for line in array: | |
| line = line.strip() | |
| print("starting => " + line ) | |
| call("zipalign -v 4 " + line + " signed/" +line) | |
| print("====== ending =====") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment