Alex Dai Playground

[Android] APK Sign

| Comments

需要 keytool.exe 和 jarsigner.exe, 在 Java\jdk1.8.0_05\bin\bin 底下

建立 keystore

keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000

簽署 APK

jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.keystore -signedjar android-release-signed.apk android-release-unsigned.apk alias_name -storepass yourpass
加密方式
  • SHA1withRSA
  • MD5withRSA

驗證

jarsigner -verify android-release-signed.apk

成功會顯示 "jar varified"

Comments

comments powered by Disqus