Commit Graph

7 Commits

Author SHA1 Message Date
Kensuke Miyagi
dfa7971a16 Support all the partitions in privapp_permissions.py
Reference: https://source.android.com/devices/tech/config/perms-whitelist

Test: Tested the example scanarios in the usage description with and
without adb

Change-Id: I3098f67f7c36b11efc9e7e35db0d97a47d152a81
2020-07-06 22:03:15 -07:00
Christian Oder
1ee526c938 privapp_permissions: Check product privapp_permissions
* permission whitelists need to get placed on the same partition as the apps themselves
* check product and system individually and generate XMLs accordingly

Test: Verify missing entries for system and product get generated on hotdog
Test: Verify missing entries for system and system/product get generated on taimen and maple
Change-Id: I37bd5c7b738caaab93019688c6a944dc6bbffa75
2020-02-25 22:48:25 +01:00
changho.shin
b7efebb0bb Support 'uses-permission.*' case
Some applications declare their privileged permission as 'uses-permission-sdk-23(m)',
not 'uses-permission'. Adding '.*' to current regex expression to cover all the cases.

Test: python development/tools/privapp_permissions/privapp_permissions.py

Change-Id: I1ea8c9361bb53035481418631b34607ffecb238c
Signed-off-by: changho.shin <changho.shin@lge.com>
2018-01-30 12:37:11 +09:00
markdr
9066da53f5 Made privapp_permissions.py more dynamic.
This was done largely so automation can make use of
privapp-permissions.xml generation.

Privapp_permissions.py no longer requires the build environment
to be setup. Instead, system files can be pulled from a connected
device, and aapt & adb can be set via the commandline. Otherwise,
they will default to the environment's default aapt/adb.

Priv-apps and the permission lists can be queried from the device
using command flags as well, removing the need for an Android
image to be built locally.

Bug: None
Test: Diff between previous privapp_permissions output and the
      output for these changes was empty for the following runs:

      ./old_privapp_permissions.py
      vs
      ./new_privapp_permissions.py [-d && -s SERIAL]
      ./new_privapp_permissions.py --aapt /path/to/aapt

      ./old_privapp_permissions.py /path/to.apk
      vs
      ./new_privapp_permissions.py /path/to.apk
      ./new_privapp_permissions.py device:/path/to/apk

Change-Id: Ifaf35607d38c1d74111fd2f05628c0192fc791cb
2018-01-26 14:31:33 -08:00
Junda Liu
d0484f9b61 Add support for single apk output.
Test: manual
Change-Id: Ie202f37a92bfa904e4c17662428e71db699ff929
2017-05-10 15:26:33 -07:00
Fyodor Kupolov
7fb7f2bca1 Compute permissions against existing whitelists in /etc
Test: manual
Bug: 31008485
Change-Id: Icbcf2331dddabce06781d4c66eb5bd3a2966e49c
2017-01-18 17:40:51 -08:00
Fyodor Kupolov
62dd222bdb Added privapp_permissions.py tool
Test: privapp_permissions.py > privapp_permissions.xml
Bug: 31008485
Change-Id: I8afb83e4ab41ddefa1e9714442f49e0135289560
2016-11-14 15:02:10 -08:00