This sepolicy is suitable for SODP supported devices when building on AOSP. Where possible, we follow the structure, style, and naming conventions found in the sepolicy written for Google devices.
When submitting patches please include the following in the commit message:
- The AVC denial you wish to resolve
- Why you think this is the correct sepolicy
- Steps to reproduce the denial
Failure to include the above may result in your patch being rejected.
This sepolicy also requires device specific file_contexts
and genfs_contexts
that can be found in each platform's git repository.
See LICENSE.md
.
General
- Group declarations of the same type together
- When adding file permissions, first the
dir
line, then thefile
line - Use macros whenever possible
(look for
te_macros
,global_macros
insystem/sepolicy/public/
)
Recommended Order
- Documentation, if any
domain
,mydomain_exec
init_daemon_domain
orapp_domain
hal_server_domain()
and equivalentstypeattribute
violation declarationsbinder_use()
and equivalentsget_prop(..., hwservicemanager_prop)
goes here tooadd_service()
and equivalentsbinder_call()
, finding services and equivalents- Miscellaneous things like
wakelock_use()
andcapability
get/set_prop()
unix_socket_connect()
and other socket stuffdevice
access- File permissions, ioctl
kernel
and module requestsdontaudit