Browse Source

Added test aapt output files for build-tools 28.0.3

merge-requests/610/head
Francesco Cervigni 1 year ago
parent
commit
984d276c1b
18 changed files with 322 additions and 6 deletions
  1. +1
    -1
      fdroidserver/update.py
  2. +14
    -0
      tests/build-tools/28.0.3/aapt-output-com.example.test.helloworld_1.txt
  3. +26
    -0
      tests/build-tools/28.0.3/aapt-output-com.politedroid_3.txt
  4. +26
    -0
      tests/build-tools/28.0.3/aapt-output-com.politedroid_4.txt
  5. +21
    -0
      tests/build-tools/28.0.3/aapt-output-com.politedroid_5.txt
  6. +21
    -0
      tests/build-tools/28.0.3/aapt-output-com.politedroid_6.txt
  7. +30
    -0
      tests/build-tools/28.0.3/aapt-output-duplicate.permisssions_9999999.txt
  8. +16
    -0
      tests/build-tools/28.0.3/aapt-output-info.guardianproject.urzip_100.txt
  9. +16
    -0
      tests/build-tools/28.0.3/aapt-output-info.zwanenburg.caffeinetile_4.txt
  10. +20
    -0
      tests/build-tools/28.0.3/aapt-output-no.min.target.sdk_987.txt
  11. +31
    -0
      tests/build-tools/28.0.3/aapt-output-obb.main.oldversion_1444412523.txt
  12. +16
    -0
      tests/build-tools/28.0.3/aapt-output-obb.main.twoversions_1101613.txt
  13. +16
    -0
      tests/build-tools/28.0.3/aapt-output-obb.main.twoversions_1101615.txt
  14. +16
    -0
      tests/build-tools/28.0.3/aapt-output-obb.main.twoversions_1101617.txt
  15. +16
    -0
      tests/build-tools/28.0.3/aapt-output-obb.mainpatch.current_1619.txt
  16. +31
    -0
      tests/build-tools/28.0.3/aapt-output-souch.smsbypass_9.txt
  17. BIN
      tests/repo/com.example.test.helloworld_1.apk
  18. +5
    -5
      tests/update.TestCase

+ 1
- 1
fdroidserver/update.py View File

@ -55,7 +55,7 @@ METADATA_VERSION = 21
# less than the valid range of versionCode, i.e. Java's Integer.MIN_VALUE
UNSET_VERSION_CODE = -0x100000000
APK_NAME_PAT = re.compile(".*\Wname='([a-zA-Z0-9._]*)'.*")
APK_NAME_PAT = re.compile(r".*\Wname='([a-zA-Z0-9._]*)'.*")
APK_VERCODE_PAT = re.compile(".*versionCode='([0-9]*)'.*")
APK_VERNAME_PAT = re.compile(".*versionName='([^']*)'.*")
APK_LABEL_ICON_PAT = re.compile(r".*\s+label='(.*)'\s+icon='(.*?)'")

+ 14
- 0
tests/build-tools/28.0.3/aapt-output-com.example.test.helloworld_1.txt View File

@ -0,0 +1,14 @@
package: name='com.example.test.helloworld' versionCode='1' versionName='1.0' compileSdkVersion='28' compileSdkVersionCodename='9'
sdkVersion:'18'
targetSdkVersion:'28'
application-label:'HelloWorld'
application: label='HelloWorld' icon=''
launchable-activity: name='com.example.test.helloworld.MainActivity' label='' icon=''
feature-group: label=''
uses-feature: name='android.hardware.faketouch'
uses-implied-feature: name='android.hardware.faketouch' reason='default feature for all apps'
main
supports-screens: 'small' 'normal' 'large' 'xlarge'
supports-any-density: 'true'
locales: '--_--'
densities: '120' '160' '240' '320' '480' '640' '65534'

+ 26
- 0
tests/build-tools/28.0.3/aapt-output-com.politedroid_3.txt View File

@ -0,0 +1,26 @@
package: name='com.politedroid' versionCode='3' versionName='1.2'
sdkVersion:'3'
uses-permission: name='android.permission.READ_CALENDAR'
uses-permission: name='android.permission.RECEIVE_BOOT_COMPLETED'
application-label:'Polite Droid'
application-icon-120:'res/drawable-ldpi/icon.png'
application-icon-160:'res/drawable-mdpi/icon.png'
application-icon-240:'res/drawable-hdpi/icon.png'
application-icon-320:'res/drawable-xhdpi/icon.png'
application: label='Polite Droid' icon='res/drawable-mdpi/icon.png'
launchable-activity: name='com.politedroid.Preferences' label='Polite Droid' icon=''
uses-permission: name='android.permission.WRITE_EXTERNAL_STORAGE'
uses-implied-permission: name='android.permission.WRITE_EXTERNAL_STORAGE' reason='targetSdkVersion < 4'
uses-permission: name='android.permission.READ_PHONE_STATE'
uses-implied-permission: name='android.permission.READ_PHONE_STATE' reason='targetSdkVersion < 4'
uses-permission: name='android.permission.READ_EXTERNAL_STORAGE'
uses-implied-permission: name='android.permission.READ_EXTERNAL_STORAGE' reason='requested WRITE_EXTERNAL_STORAGE'
feature-group: label=''
uses-feature: name='android.hardware.faketouch'
uses-implied-feature: name='android.hardware.faketouch' reason='default feature for all apps'
main
other-receivers
supports-screens: 'normal'
supports-any-density: 'false'
locales: '--_--'
densities: '120' '160' '240' '320'

+ 26
- 0
tests/build-tools/28.0.3/aapt-output-com.politedroid_4.txt View File

@ -0,0 +1,26 @@
package: name='com.politedroid' versionCode='4' versionName='1.3'
sdkVersion:'3'
uses-permission: name='android.permission.READ_CALENDAR'
uses-permission: name='android.permission.RECEIVE_BOOT_COMPLETED'
application-label:'Polite Droid'
application-icon-120:'res/drawable-ldpi/icon.png'
application-icon-160:'res/drawable-mdpi/icon.png'
application-icon-240:'res/drawable-hdpi/icon.png'
application-icon-320:'res/drawable-xhdpi/icon.png'
application: label='Polite Droid' icon='res/drawable-mdpi/icon.png'
launchable-activity: name='com.politedroid.Preferences' label='Polite Droid' icon=''
uses-permission: name='android.permission.WRITE_EXTERNAL_STORAGE'
uses-implied-permission: name='android.permission.WRITE_EXTERNAL_STORAGE' reason='targetSdkVersion < 4'
uses-permission: name='android.permission.READ_PHONE_STATE'
uses-implied-permission: name='android.permission.READ_PHONE_STATE' reason='targetSdkVersion < 4'
uses-permission: name='android.permission.READ_EXTERNAL_STORAGE'
uses-implied-permission: name='android.permission.READ_EXTERNAL_STORAGE' reason='requested WRITE_EXTERNAL_STORAGE'
feature-group: label=''
uses-feature: name='android.hardware.faketouch'
uses-implied-feature: name='android.hardware.faketouch' reason='default feature for all apps'
main
other-receivers
supports-screens: 'normal'
supports-any-density: 'false'
locales: '--_--'
densities: '120' '160' '240' '320'

+ 21
- 0
tests/build-tools/28.0.3/aapt-output-com.politedroid_5.txt View File

@ -0,0 +1,21 @@
package: name='com.politedroid' versionCode='5' versionName='1.4'
sdkVersion:'3'
targetSdkVersion:'10'
uses-permission: name='android.permission.READ_CALENDAR'
uses-permission: name='android.permission.RECEIVE_BOOT_COMPLETED'
application-label:'Polite Droid'
application-icon-120:'res/drawable-ldpi/icon.png'
application-icon-160:'res/drawable-mdpi/icon.png'
application-icon-240:'res/drawable-hdpi/icon.png'
application-icon-320:'res/drawable-xhdpi/icon.png'
application: label='Polite Droid' icon='res/drawable-mdpi/icon.png'
launchable-activity: name='com.politedroid.Preferences' label='Polite Droid' icon=''
feature-group: label=''
uses-feature: name='android.hardware.faketouch'
uses-implied-feature: name='android.hardware.faketouch' reason='default feature for all apps'
main
other-receivers
supports-screens: 'small' 'normal' 'large' 'xlarge'
supports-any-density: 'true'
locales: '--_--'
densities: '120' '160' '240' '320'

+ 21
- 0
tests/build-tools/28.0.3/aapt-output-com.politedroid_6.txt View File

@ -0,0 +1,21 @@
package: name='com.politedroid' versionCode='6' versionName='1.5' platformBuildVersionName='5.0.1-1624448'
sdkVersion:'14'
targetSdkVersion:'21'
uses-permission: name='android.permission.READ_CALENDAR'
uses-permission: name='android.permission.RECEIVE_BOOT_COMPLETED'
application-label:'Polite Droid'
application-icon-120:'res/drawable-ldpi-v4/icon.png'
application-icon-160:'res/drawable-mdpi-v4/icon.png'
application-icon-240:'res/drawable-hdpi-v4/icon.png'
application-icon-320:'res/drawable-xhdpi-v4/icon.png'
application: label='Polite Droid' icon='res/drawable-mdpi-v4/icon.png'
launchable-activity: name='com.politedroid.Preferences' label='Polite Droid' icon=''
feature-group: label=''
uses-feature: name='android.hardware.faketouch'
uses-implied-feature: name='android.hardware.faketouch' reason='default feature for all apps'
main
other-receivers
supports-screens: 'small' 'normal' 'large' 'xlarge'
supports-any-density: 'true'
locales: '--_--'
densities: '120' '160' '240' '320'

+ 30
- 0
tests/build-tools/28.0.3/aapt-output-duplicate.permisssions_9999999.txt View File

@ -0,0 +1,30 @@
package: name='duplicate.permisssions' versionCode='9999999' versionName='' platformBuildVersionName='6.0-2704002'
sdkVersion:'18'
targetSdkVersion:'27'
uses-permission: name='android.permission.INTERNET'
uses-permission: name='android.permission.ACCESS_NETWORK_STATE'
uses-permission: name='android.permission.ACCESS_WIFI_STATE'
uses-permission: name='android.permission.CHANGE_WIFI_MULTICAST_STATE'
uses-permission: name='android.permission.INTERNET'
uses-permission-sdk-23: name='android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS' maxSdkVersion='27'
uses-permission-sdk-23: name='android.permission.REQUEST_INSTALL_PACKAGES'
uses-permission: name='android.permission.WRITE_EXTERNAL_STORAGE' maxSdkVersion='18'
application-label:'Duplicate Permisssions'
application-label-ar:'أذونات مكررة'
application-icon-160:'res/drawable/ic_launcher.png'
application: label='Duplicate Permisssions' icon='res/drawable/ic_launcher.png' banner='res/drawable/banner.png'
application-debuggable
launchable-activity: name='info.guardianproject.urzip.MainActivity' label='Duplicate Permisssions' icon=''
uses-permission: name='android.permission.READ_EXTERNAL_STORAGE' maxSdkVersion='18'
uses-implied-permission: name='android.permission.READ_EXTERNAL_STORAGE' maxSdkVersion='18' reason='requested WRITE_EXTERNAL_STORAGE'
feature-group: label=''
uses-feature-not-required: name='android.hardware.touchscreen'
uses-feature-not-required: name='android.software.leanback'
uses-feature: name='android.hardware.wifi'
uses-implied-feature: name='android.hardware.wifi' reason='requested android.permission.ACCESS_WIFI_STATE permission, and requested android.permission.CHANGE_WIFI_MULTICAST_STATE permission'
main
other-activities
supports-screens: 'small' 'normal' 'large' 'xlarge'
supports-any-density: 'true'
locales: '--_--' 'ar'
densities: '160'

+ 16
- 0
tests/build-tools/28.0.3/aapt-output-info.guardianproject.urzip_100.txt View File

@ -0,0 +1,16 @@
package: name='info.guardianproject.urzip' versionCode='100' versionName='0.1' platformBuildVersionName='4.3.1-1425645'
sdkVersion:'4'
targetSdkVersion:'18'
application-label:'urzip-πÇÇπÇÇ现代汉语通用字-български-عربي1234'
application-icon-160:'res/drawable/ic_launcher.png'
application: label='urzip-πÇÇπÇÇ现代汉语通用字-български-عربي1234' icon='res/drawable/ic_launcher.png'
launchable-activity: name='info.guardianproject.urzip.MainActivity' label='urzip-πÇÇπÇÇ现代汉语通用字-български-عربي1234' icon=''
feature-group: label=''
uses-feature: name='android.hardware.faketouch'
uses-implied-feature: name='android.hardware.faketouch' reason='default feature for all apps'
main
other-activities
supports-screens: 'small' 'normal' 'large' 'xlarge'
supports-any-density: 'true'
locales: '--_--'
densities: '160'

+ 16
- 0
tests/build-tools/28.0.3/aapt-output-info.zwanenburg.caffeinetile_4.txt View File

@ -0,0 +1,16 @@
package: name='info.zwanenburg.caffeinetile' versionCode='4' versionName='1.3' platformBuildVersionName='7.1.1'
sdkVersion:'24'
targetSdkVersion:'25'
uses-permission: name='android.permission.WAKE_LOCK'
application-label:'Caffeine Tile'
application-icon-160:'res/drawable/ic_coffee_on.xml'
application: label='Caffeine Tile' icon='res/drawable/ic_coffee_on.xml'
feature-group: label=''
uses-feature: name='android.hardware.faketouch'
uses-implied-feature: name='android.hardware.faketouch' reason='default feature for all apps'
other-activities
other-services
supports-screens: 'small' 'normal' 'large' 'xlarge'
supports-any-density: 'true'
locales: '--_--'
densities: '160'

+ 20
- 0
tests/build-tools/28.0.3/aapt-output-no.min.target.sdk_987.txt View File

@ -0,0 +1,20 @@
package: name='no.min.target.sdk' versionCode='987' versionName='1.2-fake' platformBuildVersionName='6.0-2704002'
application-label:'No minSdkVersion or targetSdkVersion'
application-icon-160:'res/drawable/ic_launcher.png'
application: label='No minSdkVersion or targetSdkVersion' icon='res/drawable/ic_launcher.png'
launchable-activity: name='info.guardianproject.urzip.MainActivity' label='No minSdkVersion or targetSdkVersion' icon=''
uses-permission: name='android.permission.WRITE_EXTERNAL_STORAGE'
uses-implied-permission: name='android.permission.WRITE_EXTERNAL_STORAGE' reason='targetSdkVersion < 4'
uses-permission: name='android.permission.READ_PHONE_STATE'
uses-implied-permission: name='android.permission.READ_PHONE_STATE' reason='targetSdkVersion < 4'
uses-permission: name='android.permission.READ_EXTERNAL_STORAGE'
uses-implied-permission: name='android.permission.READ_EXTERNAL_STORAGE' reason='requested WRITE_EXTERNAL_STORAGE'
feature-group: label=''
uses-feature: name='android.hardware.faketouch'
uses-implied-feature: name='android.hardware.faketouch' reason='default feature for all apps'
main
other-activities
supports-screens: 'normal'
supports-any-density: 'false'
locales: '--_--'
densities: '160'

+ 31
- 0
tests/build-tools/28.0.3/aapt-output-obb.main.oldversion_1444412523.txt View File

@ -0,0 +1,31 @@
package: name='obb.main.oldversion' versionCode='1444412523' versionName='0.1' platformBuildVersionName='7.0.0'
sdkVersion:'4'
targetSdkVersion:'18'
uses-permission: name='android.permission.INTERNET'
uses-permission: name='android.permission.ACCESS_NETWORK_STATE' maxSdkVersion='22'
uses-permission: name='android.permission.ACCESS_WIFI_STATE'
uses-permission: name='android.permission.CHANGE_WIFI_MULTICAST_STATE'
uses-permission: name='android.permission.CHANGE_NETWORK_STATE'
uses-permission: name='android.permission.CHANGE_WIFI_STATE'
uses-permission: name='android.permission.BLUETOOTH'
uses-permission: name='android.permission.BLUETOOTH_ADMIN' maxSdkVersion='18'
uses-permission: name='android.permission.RECEIVE_BOOT_COMPLETED'
uses-permission-sdk-23: name='android.permission.WRITE_EXTERNAL_STORAGE'
uses-permission-sdk-23: name='android.permission.WRITE_SETTINGS' maxSdkVersion='25'
uses-permission: name='android.permission.NFC'
application-label:'OBB Main Old Version'
application-icon-160:'res/drawable/ic_launcher.png'
application: label='OBB Main Old Version' icon='res/drawable/ic_launcher.png'
launchable-activity: name='info.guardianproject.urzip.MainActivity' label='OBB Main Old Version' icon=''
feature-group: label=''
uses-feature-not-required: name='android.hardware.bluetooth'
uses-feature-not-required: name='android.hardware.nfc'
uses-feature-not-required: name='android.hardware.telephony'
uses-feature-not-required: name='android.hardware.touchscreen'
uses-feature-not-required: name='android.hardware.wifi'
main
other-activities
supports-screens: 'small' 'normal' 'large' 'xlarge'
supports-any-density: 'true'
locales: '--_--'
densities: '160'

+ 16
- 0
tests/build-tools/28.0.3/aapt-output-obb.main.twoversions_1101613.txt View File

@ -0,0 +1,16 @@
package: name='obb.main.twoversions' versionCode='1101613' versionName='0.1' platformBuildVersionName='4.3.1-1425645'
sdkVersion:'4'
targetSdkVersion:'18'
application-label:'OBB Main Two Versions'
application-icon-160:'res/drawable/ic_launcher.png'
application: label='OBB Main Two Versions' icon='res/drawable/ic_launcher.png'
launchable-activity: name='info.guardianproject.urzip.MainActivity' label='OBB Main Two Versions' icon=''
feature-group: label=''
uses-feature: name='android.hardware.faketouch'
uses-implied-feature: name='android.hardware.faketouch' reason='default feature for all apps'
main
other-activities
supports-screens: 'small' 'normal' 'large' 'xlarge'
supports-any-density: 'true'
locales: '--_--'
densities: '160'

+ 16
- 0
tests/build-tools/28.0.3/aapt-output-obb.main.twoversions_1101615.txt View File

@ -0,0 +1,16 @@
package: name='obb.main.twoversions' versionCode='1101615' versionName='0.1' platformBuildVersionName='4.3.1-1425645'
sdkVersion:'4'
targetSdkVersion:'18'
application-label:'OBB Main Two Versions'
application-icon-160:'res/drawable/ic_launcher.png'
application: label='OBB Main Two Versions' icon='res/drawable/ic_launcher.png'
launchable-activity: name='info.guardianproject.urzip.MainActivity' label='OBB Main Two Versions' icon=''
feature-group: label=''
uses-feature: name='android.hardware.faketouch'
uses-implied-feature: name='android.hardware.faketouch' reason='default feature for all apps'
main
other-activities
supports-screens: 'small' 'normal' 'large' 'xlarge'
supports-any-density: 'true'
locales: '--_--'
densities: '160'

+ 16
- 0
tests/build-tools/28.0.3/aapt-output-obb.main.twoversions_1101617.txt View File

@ -0,0 +1,16 @@
package: name='obb.main.twoversions' versionCode='1101617' versionName='0.1' platformBuildVersionName='4.3.1-1425645'
sdkVersion:'4'
targetSdkVersion:'18'
application-label:'OBB Main Two Versions'
application-icon-160:'res/drawable/ic_launcher.png'
application: label='OBB Main Two Versions' icon='res/drawable/ic_launcher.png'
launchable-activity: name='info.guardianproject.urzip.MainActivity' label='OBB Main Two Versions' icon=''
feature-group: label=''
uses-feature: name='android.hardware.faketouch'
uses-implied-feature: name='android.hardware.faketouch' reason='default feature for all apps'
main
other-activities
supports-screens: 'small' 'normal' 'large' 'xlarge'
supports-any-density: 'true'
locales: '--_--'
densities: '160'

+ 16
- 0
tests/build-tools/28.0.3/aapt-output-obb.mainpatch.current_1619.txt View File

@ -0,0 +1,16 @@
package: name='obb.mainpatch.current' versionCode='1619' versionName='0.1' platformBuildVersionName='4.3.1-1425645'
sdkVersion:'4'
targetSdkVersion:'18'
application-label:'urzip'
application-icon-160:'res/drawable/ic_launcher.png'
application: label='urzip' icon='res/drawable/ic_launcher.png'
launchable-activity: name='info.guardianproject.urzip.MainActivity' label='urzip' icon=''
feature-group: label=''
uses-feature: name='android.hardware.faketouch'
uses-implied-feature: name='android.hardware.faketouch' reason='default feature for all apps'
main
other-activities
supports-screens: 'small' 'normal' 'large' 'xlarge'
supports-any-density: 'true'
locales: '--_--'
densities: '160'

+ 31
- 0
tests/build-tools/28.0.3/aapt-output-souch.smsbypass_9.txt View File

@ -0,0 +1,31 @@
package: name='souch.smsbypass' versionCode='9' versionName='0.9'
install-location:'internalOnly'
sdkVersion:'8'
targetSdkVersion:'18'
uses-permission: name='android.permission.RECEIVE_SMS'
uses-permission: name='android.permission.SEND_SMS'
uses-permission: name='android.permission.READ_CONTACTS'
uses-permission: name='android.permission.WRITE_EXTERNAL_STORAGE'
uses-permission: name='android.permission.VIBRATE'
application-label:'Battery level'
application-icon-160:'res/drawable-mdpi-v4/ic_launcher.png'
application-icon-213:'res/drawable-tvdpi-v4/ic_launcher.png'
application-icon-240:'res/drawable-hdpi-v4/ic_launcher.png'
application-icon-320:'res/drawable-xhdpi-v4/ic_launcher.png'
application-icon-480:'res/drawable-xxhdpi-v4/ic_launcher.png'
application: label='Battery level' icon='res/drawable-mdpi-v4/ic_launcher.png'
launchable-activity: name='souch.smsbypass.BatteryFacade' label='' icon=''
uses-permission: name='android.permission.READ_EXTERNAL_STORAGE'
uses-implied-permission: name='android.permission.READ_EXTERNAL_STORAGE' reason='requested WRITE_EXTERNAL_STORAGE'
feature-group: label=''
uses-feature: name='android.hardware.faketouch'
uses-implied-feature: name='android.hardware.faketouch' reason='default feature for all apps'
uses-feature: name='android.hardware.telephony'
uses-implied-feature: name='android.hardware.telephony' reason='requested a telephony permission'
main
other-activities
other-receivers
supports-screens: 'small' 'normal' 'large' 'xlarge'
supports-any-density: 'true'
locales: '--_--'
densities: '160' '213' '240' '320' '480'

BIN
tests/repo/com.example.test.helloworld_1.apk View File


+ 5
- 5
tests/update.TestCase View File

@ -254,14 +254,14 @@ class UpdateTest(unittest.TestCase):
apps = fdroidserver.metadata.read_metadata(xref=True)
knownapks = fdroidserver.common.KnownApks()
apks, cachechanged = fdroidserver.update.process_apks({}, 'repo', knownapks, False)
self.assertEqual(len(apks), 15)
apk = apks[0]
self.assertEqual(len(apks), 16)
apk = apks[1]
self.assertEqual(apk['packageName'], 'com.politedroid')
self.assertEqual(apk['versionCode'], 3)
self.assertEqual(apk['minSdkVersion'], '3')
self.assertIsNone(apk.get('targetSdkVersion'))
self.assertFalse('maxSdkVersion' in apk)
apk = apks[7]
apk = apks[8]
self.assertEqual(apk['packageName'], 'obb.main.oldversion')
self.assertEqual(apk['versionCode'], 1444412523)
self.assertEqual(apk['minSdkVersion'], '4')
@ -321,7 +321,7 @@ class UpdateTest(unittest.TestCase):
fdroidserver.update.options.clean = False
read_from_json = fdroidserver.update.get_cache()
self.assertEqual(17, len(read_from_json))
self.assertEqual(18, len(read_from_json))
for f in glob.glob('repo/*.apk'):
self.assertTrue(os.path.basename(f) in read_from_json)
@ -623,7 +623,7 @@ class UpdateTest(unittest.TestCase):
knownapks = fdroidserver.common.KnownApks()
apks, cachechanged = fdroidserver.update.process_apks({}, 'repo', knownapks, False)
fdroidserver.update.translate_per_build_anti_features(apps, apks)
self.assertEqual(len(apks), 15)
self.assertEqual(len(apks), 16)
foundtest = False
for apk in apks:
if apk['packageName'] == 'com.politedroid' and apk['versionCode'] == 3:

Loading…
Cancel
Save