1
0
mirror of https://github.com/ARM-software/devlib.git synced 2024-10-06 02:40:50 +01:00

utils/android: Fix xmltree dump for aapt

Fix syntax error in dump command when using the aapt binary.
This commit is contained in:
Marc Bonnici 2020-07-09 14:44:20 +01:00
parent 00f3f5f690
commit 80bddf38a2

View File

@ -203,10 +203,10 @@ class ApkInfo(object):
@property
def activities(self):
if self._activities is None:
file_flag = '--file' if aapt_version == 2 else ''
cmd = [aapt, 'dump', 'xmltree',
self._apk_path, '{}'.format(file_flag),
'AndroidManifest.xml']
cmd = [aapt, 'dump', 'xmltree', self._apk_path]
if aapt_version == 2:
cmd += ['--file']
cmd += ['AndroidManifest.xml']
matched_activities = self.activity_regex.finditer(self._run(cmd))
self._activities = [m.group('name') for m in matched_activities]
return self._activities