v1签名:
C:\Program Files\Java\jdk1.8.0_131\bin>jarsigner -verbose -keystore D:\Apk\android_keystore.jks -signedjar D:\Apk\app-sign.apk D:\Apk\app.apk android_name
C:\Users\all\AppData\Local\Android\Sdk\build-tools\28.0.2>aapt dump badging app-sign.apk
v2签名:
C:\Users\all\AppData\Local\Android\Sdk\build-tools\28.0.2
apksigner sign --ks D:\Apk\android_keystore.jks --ks-key-alias android_name --ks-pass pass:123456 --key-pass pass:123456 --out E:\output.apk D:\Apk\app.apk
Whether to sign
C:\Program Files\Java\jdk1.8.0_131\bin>keytool -printcert -jarfile E:\output.apk
Check if the Apk is signed
apksigner verify -verbose -print-certs E:\output.apk