Android's Package Management System
Android's Package Management System
Table of Contents
- How to resign an android app?
- How to install an android apk?
- android package management system.
- How to get an app's certification?
1 How to resign an android app?
Android apk's digital signature strategy just employs the java's jar package method. So We can use java's keystore and jarsigner tools to sign an apk.
And the first step is to generate a valid certification:
please remember the store password and key password, I always set them the same one.
then before to resign an apk, I should remove its original signature first.
After that, I can sign that apk by our own certification.
And the first step is to generate a valid certification:
- make your own keystore
keytool -genkey -v -keystore iboxpay.keystore -alias ibox -keyalg RSA -keysize 2048 -validity 100000
then before to resign an apk, I should remove its original signature first.
- remove apk's digital signature
zip -d whatever.apk "META-INF/*"
- sign apk by jarsigner
- align the apk
zipalign -v 4 whatever.apk whatever_align.apk
2 How to install an android apk?
there are many ways to install an android apk. I list the ways here:
- Android's PackageInstaller app
- adb install whatever.apk
- adb push whatever.apk /system/app
- pm install "/path/to/apk"
3 android package management system.
During the installation process, Android's PackageMangement system first authorize its signature, after that if the app request system priority, it will compare its certification with the system certification, only the app signed with system's certification can have system priority.
4 How to get an app's certification?
Actually, this section's topic should be how to get the signature of an app's certification, I consider the certification's signature as the serialization of the certification. So we can get the certification from its signature. I wrote an app to demonstrate it.
https://github.com/suzp1984/parrot/tree/master/android_app/GetSignatureApp
https://github.com/suzp1984/parrot/tree/master/android_app/GetSignatureApp
Comments
Post a Comment