mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-15 23:42:37 +03:00
allow arbitrary build products, not only APKs
This makes it so that the final build product can be specified in output= and it'll work no matter if its an APK or not. This was developed around the case of building the OTA update.zip for the Privileged Extension. It should work for any build process in theory but it has not yet been tested. https://gitlab.com/fdroid/privileged-extension/issues/9
This commit is contained in:
parent
8ecff5bd61
commit
84e09cd2a2
4 changed files with 66 additions and 54 deletions
|
@ -1618,11 +1618,14 @@ def get_file_extension(filename):
|
|||
return os.path.splitext(filename)[1].lower()[1:]
|
||||
|
||||
|
||||
def isApkDebuggable(apkfile, config):
|
||||
"""Returns True if the given apk file is debuggable
|
||||
def isApkAndDebuggable(apkfile, config):
|
||||
"""Returns True if the given file is an APK and is debuggable
|
||||
|
||||
:param apkfile: full path to the apk to check"""
|
||||
|
||||
if get_file_extension(apkfile) != 'apk':
|
||||
return False
|
||||
|
||||
p = SdkToolsPopen(['aapt', 'dump', 'xmltree', apkfile, 'AndroidManifest.xml'],
|
||||
output=False)
|
||||
if p.returncode != 0:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue