AOSP SELinux Policy Builder
Configures, compiles, and validates SELinux security policies for custom Android system services in AOSP.
Android SELinux Policy Builder guides developers through creating and updating SELinux security policies when introducing or modifying system services in AOSP. Triggered automatically when working in system/sepolicy directories, this skill enforces the standard three-part declaration pattern (service_contexts mapping, type declaration in .te files, and client access rules), executes policy builds, and provides validation steps against AVC denials to prevent boot and permission failures.
Key Features
01Enforces correct SELinux type declarations and client find permission rules
02Guides service_contexts mapping and .te rule authoring for new system services
03Supplies adb verification workflows to detect and resolve avc: denied log events
04Provides automated build commands for compiling AOSP selinux_policy targets
0528 GitHub stars
06Activates contextually when editing files within system/sepolicy paths
Use Cases
01Declaring SELinux policies when adding a new native or Java system service to AOSP
02Diagnosing and resolving runtime avc: denied permission errors in Android builds
03Compiling and verifying isolated selinux_policy targets on Cuttlefish emulators