lst.reverse()
return lst
+def isApkDebuggable(apkfile):
+ """Returns True if the given apk file is debuggable"""
+
+ p = subprocess.Popen([os.path.join(sdk_path, 'platform-tools', 'aapt'),
+ 'dump', 'xmltree', apkfile, 'AndroidManifest.xml'],
+ stdout=subprocess.PIPE)
+ output = p.communicate()[0]
+ if p.returncode != 0:
+ print "ERROR: Failed to get apk manifest information"
+ sys.exit(1)
+ for line in output.splitlines():
+ if line.find('android:debuggable') != -1 and not line.endswith('0x0'):
+ return True
+ return False
+
+
print " WARNING: no SDK version information found"
thisinfo['sdkversion'] = 0
+ # Check for debuggable apks...
+ if common.isApkDebuggable(apkfile):
+ print "WARNING: {0} is debuggable... {1}".format(apkfile, line)
+
# Calculate the md5 and sha256...
m = hashlib.md5()
sha = hashlib.sha256()