Package Manager in Android

Class for retrieving various kinds of information related to the application packages that are currently installed on the device.


Android Page:

Source Code:
Use Android package manager pm
usage: pm [list|path|install|uninstall]
       pm list packages [-f]
       pm list permission-groups
       pm list permissions [-g] [-f] [-d] [-u] [GROUP]
       pm list instrumentation [-f] [TARGET-PACKAGE]
       pm list features
       pm path PACKAGE
       pm install [-l] [-r] [-t] [-i INSTALLER_PACKAGE_NAME] [-s] [-f] PATH
       pm uninstall [-k] PACKAGE
       pm enable PACKAGE_OR_COMPONENT
       pm disable PACKAGE_OR_COMPONENT
       pm setInstallLocation [0/auto] [1/internal] [2/external]
Package Manager command line:

Install the package from the SD card
adb shell pm install /sdcard/
List installed packages that contain the term twitter
adb shell pm list packages | grep twitter

Show the install directory of the twitter package
adb shell pm path

Package Manager stores application information in three files located in /data/system/

1. packages.xml
   This file contains the list of permissions and applications.

2. packages.list
    It is simple text file contain package name, user id ,flag
3. packages-stoped.xml
    This file contain package list which has stopped state.

No comments:

Post a Comment