From afdb5691c5371d7d1b7a913ead8fda56ac7db4c1 Mon Sep 17 00:00:00 2001 From: Douglas Raillard Date: Tue, 16 Jan 2024 21:40:12 +0000 Subject: [PATCH] Squashed 'external/devlib/' changes from 4589b4698..f60e341d6 f60e341d6 target: Fix read_sysctl() 46219ace0 android: Fix typo in ApkInfo git-subtree-dir: external/devlib git-subtree-split: f60e341d6e57ff01d62c325d4c7ef59567f535d2 --- devlib/target.py | 2 +- devlib/utils/android.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/devlib/target.py b/devlib/target.py index d466239fe8..56621864ba 100644 --- a/devlib/target.py +++ b/devlib/target.py @@ -1183,7 +1183,7 @@ async def read_sysctl(self, parameter): """ Returns the value of the given sysctl parameter as a string. """ - path = self.path.join('proc', 'sys', *parameter.split('.')) + path = self.path.join('/', 'proc', 'sys', *parameter.split('.')) try: return await self.read_value.asyn(path) except FileNotFoundError as e: diff --git a/devlib/utils/android.py b/devlib/utils/android.py index 62bd7e3682..3af15d8bb0 100755 --- a/devlib/utils/android.py +++ b/devlib/utils/android.py @@ -156,7 +156,7 @@ def __init__(self, path=None): # pylint: disable=too-many-branches def parse(self, apk_path): - output = self._run([self.aapt, 'dump', 'badging', apk_path]) + output = self._run([self._aapt, 'dump', 'badging', apk_path]) for line in output.split('\n'): if line.startswith('application-label:'): self.label = line.split(':')[1].strip().replace('\'', '') @@ -196,7 +196,7 @@ def parse(self, apk_path): @property def activities(self): if self._activities is None: - cmd = [self.aapt, 'dump', 'xmltree', self._apk_path] + cmd = [self._aapt, 'dump', 'xmltree', self._apk_path] if self._aapt_version == 2: cmd += ['--file'] cmd += ['AndroidManifest.xml'] @@ -215,7 +215,7 @@ def methods(self): extracted = z.extract('classes.dex', tmp_dir) except KeyError: return [] - dexdump = os.path.join(os.path.dirname(self.aapt), 'dexdump') + dexdump = os.path.join(os.path.dirname(self._aapt), 'dexdump') command = [dexdump, '-l', 'xml', extracted] dump = self._run(command)