PackageManager: Driving Android’s App Ecosystem (Part II)

The functions of the PackageManager and PackageManagerSrvice were discussed in section I. Additionally highlighted was the significance of starting PackageManagerService as a critical system service during boot. We’ll now review their internal structure and communication methods.

The Package Manager internals:

  1. PackageManager:
    Provides methods to retrieve and interact with the installed package list and associated data.
  2. PackageInfo:
    It holds information about a particular package currently installed on the device.
  3. ApplicationInfo:
    It holds information about an application that is currently installed on the device.
  4. ResolveInfo:
    It contains information needed to decide how to implement the functionality of a particular Intent.
  5. PermissionInfo:
    Holds information about a particular system permission.
  6. PermissionGroupInfo:
    Holds information about a particular system permission group.
  7. ServiceInfo:
    Holds information about a specific service that is part of an application.
  8. ActivityInfo:
    Holds information about a specific activity that is part of an application.
  9. ProviderInfo:
    Holds information about a specific content provider that is part of an application.
  10. FeatureInfo:
    Represents a particular feature of the device’s software or hardware.
  11. Signature:
    Represents the digital signature of an application.
  12. PathPermission:
    Description of permissions needed to access a particular path in a ProviderInfo.
  13. ComponentInfo:
    Base class containing common data for ActivityInfo, ServiceInfo, and ProviderInfo.
  14. PackageItemInfo:
    Base class containing common data for ComponentInfo, PermissionInfo, PermissionGroupInfo, and PackageInfo.
  15. LabeledIntent:
    Specialization of Intent that can hold label and icon information.
  16. InstrumentationInfo:
    Holds information about a specific instrumentation that is part of an application.

Some Notes on PackageManager

  1. Manages Installation, Uninstallation, And Updates Of Applications. PackageManager Is The Primary Class Responsible For These Tasks.
  2. Retrieves Information About Installed Packages And Applications. PackageManager, PackageInfo, And ApplicationInfo Classes Are Involved In Retrieving This Information.
  3. Verifies Permissions And Shares Permissions Across Apps. PackageManager Checks Permissions When Required. PermissionInfo And PermissionGroupInfo Classes Are Used To Store Information About Permissions.
  4. Manages Application Signing Certificates. PackageManager And Signature Classes Handle The Signing Certificates Of Applications.
  5. Manages Application Components. ActivityInfo, ServiceInfo, And ProviderInfo Classes Hold Information About Application Components. They Are Managed By The PackageManager Class.
  6. Manages Features Of The Device That Affect Compatibility With Applications. FeatureInfo Class Holds Information About The Device’s Software Or Hardware Features, And PackageManager Class Provides Methods To Retrieve This Information.
  7. Provides Querying Capabilities For Installed Apps, Services, Activities, Etc. PackageManager Class Provides Methods For Querying This Information.
  8. Resolves Intent Filters To Find The Component That Should Handle An Intent. PackageManager And ResolveInfo Classes Are Used To Resolve Intents To Appropriate Components.
  9. Handles Shared Libraries And Shared User IDs Between Apps. PackageManager And ApplicationInfo Classes Manage Shared Libraries And User IDs

To reduce the complexity of the diagram only the essential information is added.

Hope nothing has been missed 🙂

Leave a Comment

Your email address will not be published. Required fields are marked *