Skip to content
Snippets Groups Projects
Commit b692cbd6 authored by Chris Lamb's avatar Chris Lamb :eyes:
Browse files

Additionally extract the classes.dex file from .apk files; apktool does not do...

Additionally extract the classes.dex file from .apk files; apktool does not do this by default which was was preventing us recursing into it to find differences. Thanks to Hans-Christoph Steiner <hans@eds.org> for the report. (Closes: #890904)
parent 60b57686
No related branches found
No related tags found
No related merge requests found
......@@ -41,6 +41,7 @@ class ApkContainer(Archive):
return self._path
@tool_required('apktool')
@tool_required('zipinfo')
def open_archive(self):
self._members = []
self._unpacked = os.path.join(
......@@ -56,6 +57,11 @@ class ApkContainer(Archive):
'apktool', 'd', '-k', '-m', '-o', self._unpacked, self.source.path,
), shell=False, stderr=None, stdout=subprocess.PIPE)
# Additionally extract the classes.dex file; apktool does not do this.
subprocess.check_call((
'unzip', '-d', self._unpacked, self.source.path, 'classes.dex',
), stderr=None, stdout=subprocess.PIPE)
for root, _, files in os.walk(self._unpacked):
current_dir = []
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment