# Build tools version to be used
build_tools = "18.0.1"
-# May be necessary for fdroid update; you may still need to make a symlink to
-# aapt in platform-tools
-aapt_path = "/path/to/android-sdk-linux_x86/build-tools/17.0.0/aapt"
-
#You probably don't need to change this...
javacc_path = "/usr/share/java"
print "Checking " + src
if not os.path.exists(src):
raise BuildException("Unsigned apk is not at expected location of " + src)
- if ('aapt_path' not in globals()):
- # (re-)read configuration
- execfile('config.py', globals())
- if not os.path.exists(aapt_path):
- print "Missing aapt - check aapt_path in your config"
- sys.exit(1)
- p = subprocess.Popen([aapt_path,
+ p = subprocess.Popen([os.path.join(sdk_path, 'build-tools', build_tools, 'aapt'),
'dump', 'badging', src],
stdout=subprocess.PIPE)
output = p.communicate()[0]
:param apkfile: full path to the apk to check"""
- if ('aapt_path' not in globals()):
- # (re-)read configuration
- execfile('config.py', globals())
- if not os.path.exists(aapt_path):
- print "Missing aapt - check aapt_path in your config"
- sys.exit(1)
+ execfile('config.py', globals())
- p = subprocess.Popen([aapt_path,
+ p = subprocess.Popen([os.path.join(sdk_path, 'build-tools', build_tools, 'aapt'),
'dump', 'xmltree', apkfile, 'AndroidManifest.xml'],
stdout=subprocess.PIPE)
output = p.communicate()[0]
thisinfo['size'] = os.path.getsize(apkfile)
thisinfo['permissions'] = []
thisinfo['features'] = []
- if not os.path.exists(aapt_path):
- print "Missing aapt - check aapt_path in your config"
- sys.exit(1)
- p = subprocess.Popen([aapt_path,
+ p = subprocess.Popen([os.path.join(sdk_path, 'build-tools', build_tools, 'aapt'),
'dump', 'badging', apkfile],
stdout=subprocess.PIPE)
output = p.communicate()[0]