[size=1em][size=1em]@rem ### apksigner.bat
[size=1em]@rem
http://www.cnblogs.com/qianxudet ... /04/09/2010468.html Android学习系列(1)--为App签名(为apk签名)
[size=1em] @rem
http://www.blogjava.net/zhaojian ... 1/06/23/352887.html Android APK 签名
[size=1em]
[size=1em]@set JKS=android.keystore
[size=1em]@set PWD=111111
[size=1em]@set APP=demo
[size=1em]@set APK0=%APP%_unsign.apk
[size=1em]@set OUT1=%APP%_signed.apk
[size=1em]@set OUT2=%APP%_signed_final.apk
[size=1em]@rem type apksigner.input.txt | keytool -genkey -alias %JKS% -keystore %JKS% -storepass %PWD% -keypass %PWD% -keyalg RSA -validity 20000
[size=1em]
[size=1em]@if exist %OUT1% del %OUT1%
[size=1em]@if exist %OUT2% del %OUT2%
[size=1em]@echo ##########################
[size=1em]@echo ### Signer.0 ### %APK%.apk
[size=1em]@echo ##########################
[size=1em]@jarsigner.exe -verbose -keystore %JKS% -storepass %PWD% -keypass %PWD% -signedjar %OUT1% %APK0% %JKS%
[size=1em] @jarsigner.exe -verify %OUT1%
[size=1em]@echo ##########################
[size=1em]@echo ### Signer.1 ### %OUT1%
[size=1em]@echo ##########################
[size=1em]@D:\android-sdk-windows\tools\zipalign.exe -v 4 %OUT1% %OUT2%
[size=1em]@jarsigner.exe -verify %OUT2%
[size=1em]@echo ##########################
[size=1em]@echo ### Signer.2 ### %OUT2%
[size=1em]@echo ##########################
[size=1em]@pause