src = os.path.join(bindir, src)
# Make sure it's not debuggable...
- if not install and common.isApkDebuggable(src):
+ if not install and common.isApkDebuggable(src, sdk_path):
raise BuildException("APK is debuggable")
# By way of a sanity check, make sure the version and version
lst.reverse()
return lst
-def isApkDebuggable(apkfile):
- """Returns True if the given apk file is debuggable"""
+def isApkDebuggable(apkfile, sdk_path):
+ """Returns True if the given apk file is debuggable
+
+ :param apkfile: full path to the apk to check
+ :param sdk_path: path to android sdk"""
p = subprocess.Popen([os.path.join(sdk_path, 'platform-tools', 'aapt'),
'dump', 'xmltree', apkfile, 'AndroidManifest.xml'],
thisinfo['sdkversion'] = 0
# Check for debuggable apks...
- if common.isApkDebuggable(apkfile):
+ if common.isApkDebuggable(apkfile, sdk_path):
print "WARNING: {0} is debuggable... {1}".format(apkfile, line)
# Calculate the md5 and sha256...