mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-15 23:42:37 +03: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:
parent
f51e4f805e
commit
e0e6e711c3
2 changed files with 17 additions and 4 deletions
|
@ -478,8 +478,14 @@ def build_local(app, thisbuild, vcs, build_dir, output_dir, srclib_dir, extlib_d
|
||||||
print "Checking " + src
|
print "Checking " + src
|
||||||
if not os.path.exists(src):
|
if not os.path.exists(src):
|
||||||
raise BuildException("Unsigned apk is not at expected location of " + src)
|
raise BuildException("Unsigned apk is not at expected location of " + src)
|
||||||
p = subprocess.Popen([os.path.join(sdk_path, 'platform-tools',
|
if ('aapt_path' not in globals()):
|
||||||
'aapt'),
|
# (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],
|
'dump', 'badging', src],
|
||||||
stdout=subprocess.PIPE)
|
stdout=subprocess.PIPE)
|
||||||
output = p.communicate()[0]
|
output = p.communicate()[0]
|
||||||
|
|
|
@ -1564,9 +1564,16 @@ def isApkDebuggable(apkfile, sdk_path):
|
||||||
"""Returns True if the given apk file is debuggable
|
"""Returns True if the given apk file is debuggable
|
||||||
|
|
||||||
:param apkfile: full path to the apk to check
|
: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'],
|
'dump', 'xmltree', apkfile, 'AndroidManifest.xml'],
|
||||||
stdout=subprocess.PIPE)
|
stdout=subprocess.PIPE)
|
||||||
output = p.communicate()[0]
|
output = p.communicate()[0]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue