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
dirline, then thefileline - Use macros whenever possible
(look for
te_macros,global_macrosinsystem/sepolicy/public/)
Recommended Order
- Documentation, if any
domain,mydomain_execinit_daemon_domainorapp_domainhal_server_domain()and equivalentstypeattributeviolation 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 stuffdeviceaccess- File permissions, ioctl
kerneland module requestsdontaudit