113
CHAPTER 7: Permissions
Permissions Handling Using a Terminal
To see the permissions you have registered on your device, you
can scan through the apps
list in the system settings app or, more easily, use the ADB shell
to get various permission-
related information in a terminal.
For that aim, connect the hardware-device via USB to your laptop or PC,
open a terminal, cd
to the platform-tools folder in your SDK installation, find your device in ./adb devices, and
then enter the following:
./adb shell -s
If there is only one device, you can omit that -s switch.
Once inside the shell, you can use a couple of commands to get permission information.
First you can list all packages installed via this:
cmd package list package
To show all Dangerous permissions, to see the permission state for a certain package, or to
grant or revoke one or more permissions, you can use the following:
cmd package list permissions -d -g
dumpsys package
pm [grant|revoke]
...
Do'stlaringiz bilan baham: