-
Notifications
You must be signed in to change notification settings - Fork 0
Application Signing
Paradis Perdu edited this page Feb 27, 2019
·
4 revisions
All APKS must be digitally signed with a certificate to be installed. There are two schemes.
- All files signed with a common certificate
- Not all of the file is signed
- Lots of untrusted data structures must be processed and then discarded if not covered by signatures
- Larger attack surface
- Whole file is signed
- APK signing block is inserted into APK before the Zip Central Directory
Keytool is located in Android Studio/JRE/Bin
keytool -genkey -v keystore key.keystore -alias aliasname -keyalg RSA -keysize 2048 -validity 73000 -storepass password
- APKSigner included in Android SDK build-tools directory
- JarSigner in AndroidStudio/JRE/Bin
apksigner sign -out app.apk -ks keystore.jks unsigned.apk
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore keystore app.apk alias