android 13.0 app application installation blacklist

1 Overview

In the customized development of 13.0 system ROM, the customer needs to implement the application installation blacklist function. Applications in the whitelist can be installed, but other apps are not allowed to be installed. To achieve a
Control the function of app installation. This requires starting from the app installation process to implement the function
PMS is responsible for managing app installation. The function can be added here. Next, let’s look at the specific implementation. This function

2. App application installation blacklist core code

        frameworks/base/core/java/android/content/pm/IPackageManager.aidl
        frameworks/base/services/core/java/com/android/server/pm/InstallPackageHelper.java
        frameworks/base/services/core/java/com/android/server/pm/PackageManagerService.java

3. Analysis of core functions of app installation blacklist

PackageManager is used to obtain information about applications in the Android system, query Application-related information (application, activity, receiver, service, provider and corresponding attributes, etc.), query installed applications,
Add or delete permissions, clear user data, cache, code snippets, etc.
The IPackageManager interface class defines the business functions for communication between the server and the client, and also defines the internal class Stub, which Derived from Binder and implemented the IPackageManager interface.
PackageManagerService inherits from the IPackageManager.Stub class. Since the Stub class is derived from Binder, PackageManagerService will participate in Binder communication as a server. <

Guess you like

Origin blog.csdn.net/baidu_41666295/article/details/135025286