Recent Posts

Sign In APK Manually


How To Sign In APK Manually

Why Sign In?
All Android applications must be digitally signed with a certificate. To ensure the authenticity of the application. The private key is held with the developer so that only he can release versions of the app with a verifiable certificate.
In essence, signing an apk ensures it’s authenticity from the developer.
For The Purpose of Authenticity APK are signed in. 
Tools we will be using: Keytool, Jarsigner, and Zipalign
What is a keystore?
Also know as the Java keystore (JKS) is a repository of security certificates  (Public and private keys) that are used to digitally sign android applications and each keystore is unique to the developer.
A keystore essentially stores your security certificates.
Keytool allows you to create keystores and comes pre-packaged with the Java JDK
Let us generate our own keystore that we will use to sign our apk/payload.
Keytool -genkey -V -keystore /root/Desktop/key.keystore -alias alexis -keyalg RSA -keysize 2048 -validity 1000
Alias – keypair alias name
Keyalg – the algorithm used to generate the keypair
keysize – keypair size in bits
validity – keypair validity duration in days
We will use jarsigner to sign the apk with our keystore.
Jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore /root/Desktop/key.keystore com.android.apk alexis(alias)
Sigalg – signature algorithm
Digestalg – digest algorithm
What is zipalign?
Zipalign is an optimization process that is performed on an application that allows it to run more efficiently after signing.
Zipalign will restructure the resources in an APK along 4-byte boundaries. This alignment allows Android to quickly load the resources from the APK, increasing the performance of the application and potentially reducing memory use.
Let us zipalign the application
Zipalign -v 4 com.android.apk signed.apk
Sign In APK Manually Sign In APK Manually Reviewed by Shirley Bloggastron on 7:39 PM Rating: 5

No comments:

Note: Only a member of this blog may post a comment.


Powered by Blogger.