For example you can write to /data/local/tmp with adb shell but not a common terminal application. Why is that?
2 Answers
In short, a normal terminal application runs with "normal user" privileges. ADB shell is designed for debugging purposes, so it has more privileges.
adb shell is basically used for debugging an application on android. It has increased no.of permissions because, it checks the android device compatibility, rooted or not, manifest files and other sensor based checks.
you can list the permissions by punching in...
$adb shell pm list permissions
It has the ability to minimise the permissions, and the ability to increase the no.of permissions for rooted devices.
$shell pm [grant|revoke] com.my.app
-
You don't need to be rooted to grant permissions with pm through adb– V0idst4rJun 20, 2017 at 19:36