From 620a234d3f559959257c1c2677fd8a060560e328 Mon Sep 17 00:00:00 2001 From: Inseob Kim Date: Wed, 14 Feb 2024 16:57:34 +0900 Subject: [PATCH] Fix characteristic rro for overridden packages Overridden packages can have different package names. This change reads output APKs to parse package name, instead of manifest xml. Bug: 325011777 Test: boot and idmap2 dump Change-Id: Iafd792b6fb9c8548441c8ca5c9216be160028088 --- tools/characteristics_rro_generator.py | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/tools/characteristics_rro_generator.py b/tools/characteristics_rro_generator.py index 6489673f4b..cf873eebcd 100644 --- a/tools/characteristics_rro_generator.py +++ b/tools/characteristics_rro_generator.py @@ -1,22 +1,14 @@ #!/usr/bin/env python3 import sys -from xml.dom.minidom import parseString - -def parse_package(manifest): - with open(manifest, 'r') as f: - data = f.read() - dom = parseString(data) - return dom.documentElement.getAttribute('package') if __name__ == '__main__': if len(sys.argv) != 3: - sys.exit(f"usage: {sys_argv[0]} target_package_manifest output\n") - package_name = parse_package(sys.argv[1]) + sys.exit(f"usage: {sys_argv[0]} target_package_name output\n") with open(sys.argv[2], "w") as f: f.write(f''' - + -