Analysis of Android APK Signature Packaging Principle (1) [APK Structure Analysis]

1 Introduction

Recently, when I was looking at the source code related to AOSP Apk installation, I found that my knowledge of this piece of knowledge has been stuck at the practical level, and I have no in-depth understanding, such as the specific process of packaging, the specific process of signing, channel packaging, and most importantly, myself In the past few years, when doing system applications, I have also solved many apk installation problems and modified some system source codes. However, I have not systematically organized and accumulated this knowledge, so I feel it is necessary to take this opportunity to In-depth study and summary.

It’s still the old method. Before we start studying, we first sort out what problems or knowledge points we have. We would like to take this opportunity to expand and deepen our study and summary. Everyone has always known that the editor adopts this learning method, which is nothing more than In order to prevent situations similar to the following from occurring.

  • Appearance is like a blind man touching an elephant. He only sees the trees but not the forest. He sees a knowledge point and after understanding it, he does not expand in depth.
  • I appear like a headless fly, looking at one knowledge point, encountering another unfamiliar knowledge point, and immediately opening it again. Finally, I open a lot of web pages, and I have only scratched the surface.

In short, whatever you do, you must have a goal.
1) APK packaging process, specific to resources, aidl, java, dex, etc.
2) APK package structure, specifically the content, source, and use of each file in the apk file
3) APK signature and verification process
4) android Similarities and differences between v1, v2, v3, and v4 signatures
5) Solution iteration of channel packages, involving the implementation principle of wall
6) Experience summary of problems encountered in some previous practical work, such as: implementation plan of silent installation, increment Solution to the problem of app not updating after upgrade, etc.
7) Res

Guess you like

Origin blog.csdn.net/baobei0921/article/details/128855821