From 8b251da79f4b4a66265187b2f71a9610e2d3af9c Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Wed, 10 Oct 2018 12:00:41 +0200 Subject: [PATCH] update: do not set targetSdkVersion if the APK is missing it 699b3e4c698c370bb69de8308de5299705a813a2 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. --- fdroidserver/update.py | 2 -- tests/config.py | 2 ++ tests/metadata/no.min.target.sdk.yml | 3 ++ tests/repo/index-v1.json | 44 +++++++++++++++++++++++++-- tests/repo/index.xml | 30 ++++++++++++++++-- tests/repo/no.min.target.sdk_987.apk | Bin 0 -> 14102 bytes tests/stats/known_apks.txt | 1 + tests/update.TestCase | 4 +-- 8 files changed, 78 insertions(+), 8 deletions(-) create mode 100644 tests/metadata/no.min.target.sdk.yml create mode 100644 tests/repo/no.min.target.sdk_987.apk diff --git a/fdroidserver/update.py b/fdroidserver/update.py index 98eadfbe..ff44eeb9 100644 --- a/fdroidserver/update.py +++ b/fdroidserver/update.py @@ -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): diff --git a/tests/config.py b/tests/config.py index 16917a64..6ee05902 100644 --- a/tests/config.py +++ b/tests/config.py @@ -17,6 +17,8 @@ archive_description = """ The repository of older versions of applications from the main demo repository. """ +make_current_version_link = False + repo_keyalias = "sova" keystore = "keystore.jks" keystorepass = "r9aquRHYoI8+dYz6jKrLntQ5/NJNASFBacJh7Jv2BlI=" diff --git a/tests/metadata/no.min.target.sdk.yml b/tests/metadata/no.min.target.sdk.yml new file mode 100644 index 00000000..4a7cdb43 --- /dev/null +++ b/tests/metadata/no.min.target.sdk.yml @@ -0,0 +1,3 @@ +Categories: [Development] +Name: No minSdkVersion or targetSdkVersion +Summary: An APK without any block in AndroidManifest.xml diff --git a/tests/repo/index-v1.json b/tests/repo/index-v1.json index 90c6f0c6..d0b41ec4 100644 --- a/tests/repo/index-v1.json +++ b/tests/repo/index-v1.json @@ -72,6 +72,19 @@ "packageName": "fake.ota.update", "lastUpdated": 1457568000000 }, + { + "categories": [ + "Development" + ], + "suggestedVersionCode": "987", + "license": "Unknown", + "name": "No minSdkVersion or targetSdkVersion", + "summary": "An APK without any block in AndroidManifest.xml", + "added": 1539129600000, + "icon": "no.min.target.sdk.987.png", + "packageName": "no.min.target.sdk", + "lastUpdated": 1539129600000 + }, { "bitcoin": "1Fi5xUHiAPRKxHvyUGVFGt9extBe8Srdbk", "categories": [ @@ -248,7 +261,6 @@ "sig": "b4964fd759edaa54e65bb476d0276880", "signer": "32a23624c201b949f085996ba5ed53d40f703aca4989476949cae891022e0ed6", "size": 18489, - "targetSdkVersion": "3", "uses-permission": [ [ "android.permission.READ_CALENDAR", @@ -290,7 +302,6 @@ "sig": "b4964fd759edaa54e65bb476d0276880", "signer": "32a23624c201b949f085996ba5ed53d40f703aca4989476949cae891022e0ed6", "size": 17552, - "targetSdkVersion": "3", "uses-permission": [ [ "android.permission.READ_CALENDAR", @@ -400,6 +411,35 @@ "versionName": "0.1" } ], + "no.min.target.sdk": [ + { + "added": 1539129600000, + "apkName": "no.min.target.sdk_987.apk", + "hash": "e2e1dc1d550df2b5bc383860139207258645b5540abeccd305ed8b2cb6459d2c", + "hashType": "sha256", + "minSdkVersion": 3, + "packageName": "no.min.target.sdk", + "sig": "b4964fd759edaa54e65bb476d0276880", + "signer": "32a23624c201b949f085996ba5ed53d40f703aca4989476949cae891022e0ed6", + "size": 14102, + "uses-permission": [ + [ + "android.permission.WRITE_EXTERNAL_STORAGE", + null + ], + [ + "android.permission.READ_PHONE_STATE", + null + ], + [ + "android.permission.READ_EXTERNAL_STORAGE", + null + ] + ], + "versionCode": 987, + "versionName": "1.2-fake" + } + ], "obb.main.oldversion": [ { "added": 1388448000000, diff --git a/tests/repo/index.xml b/tests/repo/index.xml index 69c6cd89..b82fd661 100644 --- a/tests/repo/index.xml +++ b/tests/repo/index.xml @@ -95,6 +95,34 @@ 2016-03-10 + + no.min.target.sdk + 2018-10-10 + 2018-10-10 + No minSdkVersion or targetSdkVersion + An APK without any <uses-sdk> block in AndroidManifest.xml + no.min.target.sdk.987.png + <p>No description available</p> + Unknown + Development + Development + + + + + 987 + + 1.2-fake + 987 + no.min.target.sdk_987.apk + e2e1dc1d550df2b5bc383860139207258645b5540abeccd305ed8b2cb6459d2c + 14102 + 3 + 2018-10-10 + b4964fd759edaa54e65bb476d0276880 + READ_EXTERNAL_STORAGE,READ_PHONE_STATE,WRITE_EXTERNAL_STORAGE + + obb.main.oldversion 2013-12-31 @@ -269,7 +297,6 @@ c809bdff83715fbf919f3840ee09869b038e209378b906e135ee40d3f0e1f075 18489 3 - 3 2017-06-23 b4964fd759edaa54e65bb476d0276880 READ_CALENDAR,READ_EXTERNAL_STORAGE,READ_PHONE_STATE,RECEIVE_BOOT_COMPLETED,WRITE_EXTERNAL_STORAGE @@ -281,7 +308,6 @@ 665d03d61ebc642289fda697f71a59305b0202b16cafc5ffdae91cbe91f0b25d 17552 3 - 3 2017-06-23 b4964fd759edaa54e65bb476d0276880 READ_CALENDAR,READ_EXTERNAL_STORAGE,READ_PHONE_STATE,RECEIVE_BOOT_COMPLETED,WRITE_EXTERNAL_STORAGE diff --git a/tests/repo/no.min.target.sdk_987.apk b/tests/repo/no.min.target.sdk_987.apk new file mode 100644 index 0000000000000000000000000000000000000000..27f8de12ddc0d37509a84e1c63da8827fd235614 GIT binary patch literal 14102 zcmeIZ1yo+U)+qYn?(XhVT#I{gcXxMpifd`HLR(yld!aZ*iWPTviWGOd>+3%IoW1w` z|NF*x?~QTCxZ~zyCNs&DWM-0NWo4Ch=C9^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9g$aK8j8n=8`>Uaoi<)VdjOalMoRcd%$5Vgvxh1(*iyKEH3|d(fPlN&i})r^XGO_ zOhukt-PW31+`-x0o}7zAMIHhY59+`F@CiKYfH$y>q2Tnt_zVgx0RQ(>19%4u0{!#5 zgWrX}qi$eZ`|rzke}0AVPxgOaiTn?{74XFNcXoB@e{%oxZr^{n7g7Gg{g<15|CI30 z>udj!AOKuy`^#lEFykMF`-9}~2k?Kgfelwf`p2=+e|H@JA4z{$@SjIcf5-w$LZJR% qA3*&_(jPp3KY00Tn-pn&OZv+(jEX!AESLfw_#pt($~6}__dfvLp(rQ- literal 0 HcmV?d00001 diff --git a/tests/stats/known_apks.txt b/tests/stats/known_apks.txt index 6e14faff..0fa1f1b6 100644 --- a/tests/stats/known_apks.txt +++ b/tests/stats/known_apks.txt @@ -4,6 +4,7 @@ com.politedroid_5.apk com.politedroid 2017-06-23 com.politedroid_6.apk com.politedroid 2017-06-23 duplicate.permisssions_9999999.apk duplicate.permisssions 2017-12-22 fake.ota.update_1234.zip fake.ota.update 2016-03-10 +no.min.target.sdk_987.apk no.min.target.sdk 2018-10-10 obb.main.oldversion_1444412523.apk obb.main.oldversion 2013-12-31 obb.main.twoversions_1101613.apk obb.main.twoversions 2015-10-12 obb.main.twoversions_1101615.apk obb.main.twoversions 2016-01-01 diff --git a/tests/update.TestCase b/tests/update.TestCase index f13d1820..84600bfe 100755 --- a/tests/update.TestCase +++ b/tests/update.TestCase @@ -259,9 +259,9 @@ class UpdateTest(unittest.TestCase): self.assertEqual(apk['packageName'], 'com.politedroid') self.assertEqual(apk['versionCode'], 3) self.assertEqual(apk['minSdkVersion'], '3') - self.assertEqual(apk['targetSdkVersion'], '3') + self.assertIsNone(apk.get('targetSdkVersion')) self.assertFalse('maxSdkVersion' in apk) - apk = apks[6] + apk = apks[7] self.assertEqual(apk['packageName'], 'obb.main.oldversion') self.assertEqual(apk['versionCode'], 1444412523) self.assertEqual(apk['minSdkVersion'], '4')