mirror of
https://github.com/androguard/androguard.git
synced 2024-11-27 06:50:41 +00:00
even more testing
This commit is contained in:
parent
7128eb2395
commit
7e4f21f1ff
5
examples/tests/README.md
Normal file
5
examples/tests/README.md
Normal file
@ -0,0 +1,5 @@
|
||||
a2dp.Vol_137.apk was downloaded from F-Droid: https://f-droid.org/packages/a2dp.Vol/
|
||||
and is released under GPLv3
|
||||
|
||||
|
||||
hello-world.apk is from the viper-test-files: https://github.com/viper-framework/viper-test-files/blob/master/test_files/hello-world.apk
|
BIN
examples/tests/a2dp.Vol_137.apk
Normal file
BIN
examples/tests/a2dp.Vol_137.apk
Normal file
Binary file not shown.
@ -124,6 +124,29 @@ class APKTest(unittest.TestCase):
|
||||
self.assertEqual(a.get_declared_permissions(), [])
|
||||
self.assertTrue(a.is_valid_APK())
|
||||
|
||||
def testAPKPermissions(self):
|
||||
from androguard.core.bytecodes.apk import APK
|
||||
a = APK("examples/tests/a2dp.Vol_137.apk", testzip=True)
|
||||
|
||||
self.assertEqual(a.get_package(), "a2dp.Vol")
|
||||
self.assertListEqual(sorted(a.get_permissions()), sorted(["android.permission.RECEIVE_BOOT_COMPLETED",
|
||||
"android.permission.CHANGE_WIFI_STATE",
|
||||
"android.permission.ACCESS_WIFI_STATE",
|
||||
"android.permission.KILL_BACKGROUND_PROCESSES",
|
||||
"android.permission.BLUETOOTH",
|
||||
"android.permission.BLUETOOTH_ADMIN",
|
||||
"com.android.launcher.permission.READ_SETTINGS",
|
||||
"android.permission.RECEIVE_SMS",
|
||||
"android.permission.MODIFY_AUDIO_SETTINGS",
|
||||
"android.permission.READ_CONTACTS",
|
||||
"android.permission.ACCESS_COARSE_LOCATION",
|
||||
"android.permission.ACCESS_FINE_LOCATION",
|
||||
"android.permission.ACCESS_LOCATION_EXTRA_COMMANDS",
|
||||
"android.permission.WRITE_EXTERNAL_STORAGE",
|
||||
"android.permission.READ_PHONE_STATE",
|
||||
"android.permission.BROADCAST_STICKY",
|
||||
"android.permission.GET_ACCOUNTS"]))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
Loading…
Reference in New Issue
Block a user