Android file permissions on Android 6.0

泪湿孤枕 提交于 2019-12-04 13:05:29
netsplit

Android 5 and above use SELinux which uses two forms of access control. Traditional Linux uses a Discretionary Access Control List. The SE component also enforces a Mandatory Access Control List. The former is default allow, the latter is default deny.

You, or a process, only have access to an object if both sets of permissions allow you. Access is determined by SE contexts. Shell and app contexts have different permissions, and unfortunately there isn't any known way to give an app shell context.

You can view Security Contexts using:

ls -Z

I don't have a Marshmallow device to test, however what might give your app the necessary context is getting the usagestatsmanager permission. A user would have to enable it security settings, and I'm told Samsung devices don't have the necessary menu. Shot in the dark mind you.

If you want to try it, see this question: How to check if "android.permission.PACKAGE_USAGE_STATS" permission is given?

This page might give you more info on permissions: https://su.chainfire.eu/#selinux

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!