update: do not set targetSdkVersion if the APK is missing it

699b3e4c69 got it wrong for targetSdkVersion.
Also, one confusing thing is that aapt outputs "sdkVersion: '3'" for
com.politedroid_3.apk but no "sdkVersion:" for no.min.target.sdk_987.apk.
F-Droid never really supported running on android-1 or android-2, so it
seems pointless to debug support for them.
This commit is contained in:
Hans-Christoph Steiner 2018-10-10 12:00:41 +02:00
parent 2a9bc448ee
commit 8b251da79f
8 changed files with 78 additions and 8 deletions

View file

@ -1090,8 +1090,6 @@ def scan_apk(apk_file):
if 'minSdkVersion' not in apk:
logging.warning("No SDK version information found in {0}".format(apk_file))
apk['minSdkVersion'] = 3 # aapt defaults to 3 as the min
if 'targetSdkVersion' not in apk:
apk['targetSdkVersion'] = apk['minSdkVersion']
# Check for known vulnerabilities
if has_known_vulnerability(apk_file):