install: download_fdroid_apk() to fetch the recommended initial APK

This commit is contained in:
Hans-Christoph Steiner 2024-02-27 17:07:57 +01:00
parent 56bed02a29
commit 49dcc53076
2 changed files with 19 additions and 0 deletions

View file

@ -72,6 +72,18 @@ def download_apk(appid='org.fdroid.fdroid'):
return str(f.rename(f.with_stem(f'{appid}_{versionCode}')).resolve())
def download_fdroid_apk():
"""Directly download the current F-Droid APK and verify it.
This downloads the "download button" link, which is the version
that is best tested for new installs.
"""
mirror = common.FDROIDORG_MIRRORS[0]
mirror['url'] = urlunparse(urlparse(mirror['url'])._replace(path='F-Droid.apk'))
return net.download_using_mirrors([mirror])
def devices():
p = SdkToolsPopen(['adb', "devices"])
if p.returncode != 0: