Package Manage is an API that actually manages application install, uninstall, and upgrade. When we install the APK file, Package Manager parse the package (APK) file and displays confirmation. When the user presses the OK button, Package Manager calls the method named "installPackage" with these four parameters namely uri, installFlags, observer, installPackageName. Package Manager starts one service named "package", and now all fuzzy things happen in this service. You can check "PackageInstallerActivity.java" and "InstallAppProgress.java" in the PackageInstaller source code. Package Manager Service runs in system_service process and install daemon (installd) runs as a native process. Both start at system boot time.

This XML file stores two things 1. permissions 2. package (application), permission are store under <permissions> tag. Each Permission has three attributes namely name, package and protection. The name attribute has permission name, which we are using in AndroidManifest.xml, the package attribute indicates permission belonging to package. In most cases "android" is the value, because the <permission> tag contains default permissions and protection indicates level of security.

Version Code from AndroidManifest.xml file []http://developer.android.com/guide/topics/manifest/manifest-element.html#vcode]

9

sharedUserId

The name of Linux user ID that will be shared with other applications, It is same parameter which we define in AndroidManifest.xml [http://developer.android.com/guide/topics/manifest/manifest-element.html#uid]

b. cert contain certification key, index attribute represents the global index of certificate. I have found that it increments when new certificates are installed with the application.

c. perms contain permission which developer has set in AndroidManifest.xml

2. packages.list : It is simple text file containing package name, user id, flag and data directory. I can't find any perfect description, but I assume that the packages.list file may provide faster lookup of installed packages, because it keeps important information only.

3. packages-stoped.xml : This file contains the package list which has stopped state. Stopped state applications cannot receive any broadcast. Refer to this link for more information about stopped state applications.