1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-04 14:30:11 +01:00

Use config.py to locate aapt

This uses aapt_path in config.py to locate the aapt command. The latest
Android SDK moved aapt out of platform-tools/ causing builds which depend
on this path to fail.

Signed-off-by: Frans Gifford <frans.gifford@cs.ox.ac.uk>
This commit is contained in:
Frans Gifford 2013-07-18 18:23:17 +01:00 committed by Daniel Martí
parent f51e4f805e
commit e0e6e711c3
2 changed files with 17 additions and 4 deletions

View File

@ -478,8 +478,14 @@ def build_local(app, thisbuild, vcs, build_dir, output_dir, srclib_dir, extlib_d
print "Checking " + src
if not os.path.exists(src):
raise BuildException("Unsigned apk is not at expected location of " + src)
p = subprocess.Popen([os.path.join(sdk_path, 'platform-tools',
'aapt'),
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,
'dump', 'badging', src],
stdout=subprocess.PIPE)
output = p.communicate()[0]

View File

@ -1564,9 +1564,16 @@ 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"""
:param sdk_path: path to android sdk (deprecated)"""
p = subprocess.Popen([os.path.join(sdk_path, 'platform-tools', 'aapt'),
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,
'dump', 'xmltree', apkfile, 'AndroidManifest.xml'],
stdout=subprocess.PIPE)
output = p.communicate()[0]