What is the original-package AndroidManifest attri

2019-04-18 14:35发布

I used apktool to extract the manifest of the default browser on Jelly Bean and this line appeared in the manifest--

  <manifest ... package="com.google.android.browser">
    <original-package android:name="com.android.browser" />
    ...
  </manifest>

Any idea what this is used for? The

2条回答
做个烂人
2楼-- · 2019-04-18 14:55

Check out attrs_manifest.xml in android/platform_frameworks_base source:

<!-- Private tag to declare the original package name that this package is
     based on.  Only used for packages installed in the system image.  If
     given, and different than the actual package name, and the given
     original package was previously installed on the device but the new
     one was not, then the data for the old one will be renamed to be
     for the new package.

     <p>This appears as a child tag of the root
     {@link #AndroidManifest manifest} tag. -->
<declare-styleable name="AndroidManifestOriginalPackage" parent="AndroidManifest">
    <attr name="name" />
</declare-styleable>

The comments should answer your question.

查看更多
做自己的国王
3楼-- · 2019-04-18 15:04

I believe the original-package AndroidManifest attribute is used when the userID is not shared with any other package

查看更多
登录 后发表回答