Signing
APK file is important to publish your application into App Store. This article
will explain how to sign APK file using Key file. 1. Run “GIT CMD” Prompt 2. Go to “C:\Program Files\Java\jdk1.7.0_151\bin”
and make sure “jarsigner.exe” is present in the path 3. Execute the below command. Make sure the
“android-release-unsigned.apk” and “Key file” is present in the given path. jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore D:\MyApp.keystore -storepass StorePass -keypass KeyPass D:\Myapp.apk MyApp 4. Verify APK is properly signed using below command. jarsigner -verify -verbose -certs D:\Myapp.apk 5. After successful signing, execute
the below step to zip align the apk file. 6. Navigate to build tools folder “C:\Program
Files\Android\android-sdk\build-tools\23.0.0” and execute the “zipalign” exe by
running the below command. zipalign -v 4 D:\Myapp.apk D:\Myapp-Signed.apk 7. Above command will
align all the files inside APK to generating the “Signed” (name given) APK.
Now APK is properly signed and aligned to use.
Read this article to know how to create "KeyStore" file. |