all Android applications must be digitally signed by a developer , that is, using a private key to digitally sign a given application in order to identify the author of the code, detect whether the application has changed, and build trust between applications with the same signature, which enables trusted applications to share resources securely. Different applications that use the same digital signature can grant each other permission to access the signature-based API. if the application shares the UID, it can run in the same process , allowing each other access to the code and data of the other.
Application signing requires a private key to be generated and a public key pair , and a private key is used to sign the public key certificate . Neither the App Store nor the application installation package installs apps that do not have a digital certificate . However, signed digital certificates do not require authority to authenticate, application signatures can be completed by third parties, such as OEMs, operators and application stores, etc., can also be signed by the developer themselves, known as self-signed . Self-signed allows developers to not rely on any third party to publish their applications freely.
When installing the application apk, the system installer first checks to see if the APK is signed and is signed before it can be installed. when an application is upgraded, it is necessary to check that the digital signature of the new application is the same as the signature of the installed application, otherwise it will be treated as a completely new application. In general, multiple applications designed by the same developer can be signed with the same private key , declaring shared user IDsin the manifest file, allowing them to run in The same process , so that these applications can share code and data resources. It is possible for Android developers to name the installation package the same name, separate them by different signatures, and ensure that the signatures of different packages are not replaced, while effectively preventing the malware from replacing the installed application.
Android provides signature-based permission checks that have the same digital signatures between applications, and that they can share code and data in a secure way.
Android security Model Android security (application signing)