APK Certificates
Generating An Android Certificate
When decompiling an android application and compiling it back, you will need to sign the app, and if you don’t sign it, the Application will not be installed on the user device.
There are different ways of generating a certificate but the easiest and universal one is using keytool
.
keytool -genkey -v -keystore KeyStoreName -alias KeyStoreAlias -keyalg RSA -keysize 2048 -validity 365

Signing An Android Applicaiton
JarSigner
It's important to note your APK (YourAPK_unsigned.apk
) will be overwritten. If you want to keep an unsigned copy, please first create a copy ofYourAPK_unsigned.apk
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore KeyStoreName YourAPK_unsigned.apk KeyStoreAlias
mv YourAPK_unsigned.apk YourAPK_signed.apk


APKSigner
Install APKSigner
sudo apt-get apksigner
Sign the APK
It's important to note your APK (YourAPK_unsigned.apk
) will be overwritten. If you want to keep an unsigned copy, please first create a copy ofYourAPK_unsigned.apk
apksigner sign --ks KeyStoreName YourAPK_unsigned.apk
mv YourAPK_unsigned.apk YourAPK_signed.apk

apksigner verify --verbose YourAPK_signed.apk

Last updated