Put DEVICE/PRODUCT overlays in different partitions
This change changes auto-generated RROs from DEVICE_PACKAGE_OVERLAYS to be generated in the vendor partition, as opposed to /product where they were generated in the past. Note that PRODUCT_PACKAGE_OVERLAYS continue generating RRO packages to /product, which means that a single app can be overlayed from different partitions. These RROs have been given module and package names based on their location. Bug: 127758779 Test: verify noop on presubmit targets Change-Id: I5cee70e28e3969e67b2d83eaf25d9c6e3a11102d
This commit is contained in:
@@ -23,10 +23,10 @@ import os
|
||||
import sys
|
||||
|
||||
ANDROID_MANIFEST_TEMPLATE="""<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="%s.auto_generated_rro__"
|
||||
package="%s.auto_generated_rro_%s__"
|
||||
android:versionCode="1"
|
||||
android:versionName="1.0">
|
||||
<overlay android:targetPackage="%s" android:priority="0" android:isStatic="true"/>
|
||||
<overlay android:targetPackage="%s" android:priority="%s" android:isStatic="true"/>
|
||||
</manifest>
|
||||
"""
|
||||
|
||||
@@ -39,6 +39,12 @@ def get_args():
|
||||
parser.add_argument(
|
||||
'-p', '--package-info', required=True,
|
||||
help='Manifest package name or manifest file path of source module.')
|
||||
parser.add_argument(
|
||||
'--partition', required=True,
|
||||
help='The partition this RRO package is installed on.')
|
||||
parser.add_argument(
|
||||
'--priority', required=True,
|
||||
help='The priority for the <overlay>.')
|
||||
parser.add_argument(
|
||||
'-o', '--output', required=True,
|
||||
help='Output manifest file path.')
|
||||
@@ -48,6 +54,8 @@ def get_args():
|
||||
def main(argv):
|
||||
args = get_args()
|
||||
|
||||
partition = args.partition
|
||||
priority = args.priority
|
||||
if args.use_package_name:
|
||||
package_name = args.package_info
|
||||
else:
|
||||
@@ -58,7 +66,7 @@ def main(argv):
|
||||
package_name = dom.documentElement.getAttribute('package')
|
||||
|
||||
with open(args.output, 'w+') as f:
|
||||
f.write(ANDROID_MANIFEST_TEMPLATE % (package_name, package_name))
|
||||
f.write(ANDROID_MANIFEST_TEMPLATE % (package_name, partition, package_name, priority))
|
||||
f.close()
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user