publish: use apksigner for signing apks with targetSDK>=30

This makes apksigner a hard requirement of the signing procedure.
We'll first try to find a globally installed version from PATH and if
that's not available fall back to using a version from build-tools.

Future TODO: always sign with apksigner, blocked on signature transplant
support for apksigv2/v3

Closes fdroid/fdroidserver#634
Closes fdroid/fdroidserver#827
This commit is contained in:
Marcus Hoffmann 2020-09-09 12:06:21 +02:00
parent d595948616
commit 768a91370c
4 changed files with 130 additions and 108 deletions

View file

@ -268,7 +268,7 @@ Last updated: {date}'''.format(repo_git_base=repo_git_base,
os.chmod(apkfilename, 0o644)
logging.debug(_('Resigning {apkfilename} with provided debug.keystore')
.format(apkfilename=os.path.basename(apkfilename)))
common.apk_strip_signatures(apkfilename, strip_manifest=True)
common.apk_strip_v1_signatures(apkfilename, strip_manifest=True)
common.sign_apk(apkfilename, destapk, KEY_ALIAS)
if options.verbose: