update: find aapt when it is not in the PATH

This is some very messy logic built up since 2010.  This will all go away
once we have a python3 version of androguard available.

The removed imports and `dir(APK)` is to silence pyflakes

closes #303
This commit is contained in:
Hans-Christoph Steiner 2017-05-18 17:20:24 +02:00
parent c348186ad6
commit 0345d2c79f
4 changed files with 6 additions and 9 deletions

View file

@ -1727,7 +1727,7 @@ def isApkAndDebuggable(apkfile, config):
if get_file_extension(apkfile) != 'apk':
return False
if set_command_in_config('aapt'):
if SdkToolsPopen(['aapt', 'version'], output=False):
return get_apk_debuggable_aapt(apkfile)
else:
return get_apk_debuggable_androguard(apkfile)