mirror of
https://github.com/ARM-software/devlib.git
synced 2025-07-12 08:42:42 +01:00
utils/android: Use separate tmp dirs when extracting apk methods
Create a new temporary directory to use when extracting apk methods, as when running multiple processes in parallel the extracted files could be overwritten by each other.
This commit is contained in:
@ -214,8 +214,9 @@ class ApkInfo(object):
|
||||
@property
|
||||
def methods(self):
|
||||
if self._methods is None:
|
||||
with tempfile.TemporaryDirectory() as tmp_dir:
|
||||
with zipfile.ZipFile(self._apk_path, 'r') as z:
|
||||
extracted = z.extract('classes.dex', tempfile.gettempdir())
|
||||
extracted = z.extract('classes.dex', tmp_dir)
|
||||
|
||||
dexdump = os.path.join(os.path.dirname(aapt), 'dexdump')
|
||||
command = [dexdump, '-l', 'xml', extracted]
|
||||
|
Reference in New Issue
Block a user