mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-09-06 06:36:58 +00:00
90ff602ecd1519da0585a6fad9487c395dce68f4
Injects allow rules into binary SELinux kernel policies
$ ./sepolicy-inject -s shell -t system -c file -p read -P sepolicy -o sepolicy2
libsepol.policydb_index_others: security: 1 users, 2 roles, 518 types, 14 bools
libsepol.policydb_index_others: security: 1 sens, 1024 cats
libsepol.policydb_index_others: security: 84 classes, 4539 rules, 162 cond rules
$ sesearch -A -s shell -t system -c file sepolicy
Found 1 semantic av rules:
allow appdomain domain : file { ioctl read getattr lock open } ;
$ sesearch -A -s shell -t system -c file sepolicy2
Found 2 semantic av rules:
allow shell system : file read ;
allow appdomain domain : file { ioctl read getattr lock open } ;
TODO:
Insert multiple rules at the same time
Remove rules
Use attributes
Add permissive domains
Magisk v29.0
Latest
Languages
Kotlin
30.8%
Rust
29.8%
C++
23.7%
Java
8.5%
Shell
4.5%
Other
2.6%