title: Write meta information during Android package install
body: <p><strong>Question:</strong> How to write meta information about a package OR Where is the installation intent handled in <code>PackageManagerService</code> in android source? (Description follows.) </p>
  
  <p>I'm modifying Android source to save some meta information about a package during installation. It can be stored in any location but has to be readable by the system. My first attempt was to use <code>/sdcard</code> (<a href="https://stackoverflow.com/questions/15424603/android-source-error-reading-file-from-sdcard/15424662?noredirect=1">Android source error reading file from sdcard</a>) But that does not seem to work because of permissions. </p>
  
  <p>Now, I want to be able to send the meta information to the <code>PackageManagerService</code> so that it can write it before install. If it writes it itself, it should be able to read it later. </p>
  
  <p>I've identified the point in <code>PackageInstallerActivity</code>, the place where the installation intent is raised: </p>
  
  <pre><code>if(v == mOk) {
              // Start subactivity to actually install the application
              Intent newIntent = new Intent();
              newIntent.putExtra(PackageUtil.INTENT_ATTR_APPLICATION_INFO,
                      mPkgInfo.applicationInfo);
              newIntent.setData(mPackageURI);
              newIntent.setClass(this, InstallAppProgress.class);
              String installerPackageName = getIntent().getStringExtra(Intent.EXTRA_INSTALLER_PACKAGE_NAME);
              if (installerPackageName != null) {
                  newIntent.putExtra(Intent.EXTRA_INSTALLER_PACKAGE_NAME, installerPackageName);
              }
              if(localLOGV) Log.i(TAG, "downloaded app uri="+mPackageURI);
  </code></pre>
  
  <p>I can put an "extra" in the intent but I don't know where in the PackageManagerService this intent is handled. </p>
  
  <p><strong>So, the qustion:</strong> Where is the installation intent handled in PackageManagerService in android source? </p>