OSDN Git Service

Generate /data/system/packages.list in the PackageManager
authorDavid 'Digit' Turner <digit@google.com>
Thu, 4 Feb 2010 01:34:58 +0000 (17:34 -0800)
committerDavid 'Digit' Turner <digit@google.com>
Wed, 10 Feb 2010 02:18:55 +0000 (18:18 -0800)
commitadd1376cde9cd027df473f84df75edc993001ebe
tree80f3ef3e2d79e3a685fe04169a3fb644e5d69035
parentb687581d4cf67fe8f25bac4333b513bcba2f3cb2
Generate /data/system/packages.list in the PackageManager

This file contains uid + debugFlag + dataPath information for
each non-system installed package. It is meant to be used later
from native code and thus needs to be considerably simpler to
parser than packages.xml.

The file should only be readable by non-system userIds, and its
format is essentially line-based with each line like:

  <pkgName> <uid> <debugFlag> <dataDir>

With:

  <pkgName>    as the package name
  <uid>        as the application-specific user id
  <debugFlag>  either 0 or 1. 1 if the package is debuggable
  <dataDir>    path to the package's data directory

We need the debug flag to allow 'run-as' to only allow
commands to be executed on debuggable packages, even on
production devices.
services/java/com/android/server/PackageManagerService.java