mirror of
https://github.com/ARM-software/devlib.git
synced 2025-01-31 02:00:45 +00:00
utils/android: Fix xmltree dump for aapt
Fix syntax error in dump command when using the aapt binary.
This commit is contained in:
parent
00f3f5f690
commit
80bddf38a2
@ -203,10 +203,10 @@ class ApkInfo(object):
|
|||||||
@property
|
@property
|
||||||
def activities(self):
|
def activities(self):
|
||||||
if self._activities is None:
|
if self._activities is None:
|
||||||
file_flag = '--file' if aapt_version == 2 else ''
|
cmd = [aapt, 'dump', 'xmltree', self._apk_path]
|
||||||
cmd = [aapt, 'dump', 'xmltree',
|
if aapt_version == 2:
|
||||||
self._apk_path, '{}'.format(file_flag),
|
cmd += ['--file']
|
||||||
'AndroidManifest.xml']
|
cmd += ['AndroidManifest.xml']
|
||||||
matched_activities = self.activity_regex.finditer(self._run(cmd))
|
matched_activities = self.activity_regex.finditer(self._run(cmd))
|
||||||
self._activities = [m.group('name') for m in matched_activities]
|
self._activities = [m.group('name') for m in matched_activities]
|
||||||
return self._activities
|
return self._activities
|
||||||
|
Loading…
x
Reference in New Issue
Block a user