16

apktool を使用して Jelly Bean のデフォルト ブラウザのマニフェストを抽出したところ、この行がマニフェストに表示されました。

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

これが何に使われているのか分かりますか?の

4

2 に答える 2

17

android/platform_frameworks_base ソースのattrs_manifest.xmlを確認してください。

<!-- 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>

コメントはあなたの質問に答えるはずです。

于 2012-08-22T07:26:10.093 に答える
-2

userID が他のパッケージと共有されていない場合、 original-package AndroidManifest 属性が使用されると思います

于 2012-08-22T02:59:58.227 に答える