diff --git a/fdroidserver/build.py b/fdroidserver/build.py index ac040e08..72eba258 100644 --- a/fdroidserver/build.py +++ b/fdroidserver/build.py @@ -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] diff --git a/fdroidserver/common.py b/fdroidserver/common.py index 566284b3..8f3d5551 100644 --- a/fdroidserver/common.py +++ b/fdroidserver/common.py @@ -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]