mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-11-28 12:35:26 +00:00
Add rules for Android P
This commit is contained in:
parent
26dfbb3028
commit
21a557a184
9
rules.c
9
rules.c
@ -2,6 +2,8 @@
|
|||||||
#include "sepolicy.h"
|
#include "sepolicy.h"
|
||||||
|
|
||||||
void allowSuClient(char *target) {
|
void allowSuClient(char *target) {
|
||||||
|
if (!sepol_exists(target))
|
||||||
|
return;
|
||||||
sepol_allow(target, "rootfs", "file", ALL);
|
sepol_allow(target, "rootfs", "file", ALL);
|
||||||
sepol_allow(target, "rootfs", "lnk_file", ALL);
|
sepol_allow(target, "rootfs", "lnk_file", ALL);
|
||||||
sepol_allow(target, "su", "unix_stream_socket", "connectto");
|
sepol_allow(target, "su", "unix_stream_socket", "connectto");
|
||||||
@ -140,10 +142,9 @@ void sepol_magisk_rules() {
|
|||||||
allowSuClient("untrusted_app");
|
allowSuClient("untrusted_app");
|
||||||
allowSuClient("system_app");
|
allowSuClient("system_app");
|
||||||
allowSuClient("platform_app");
|
allowSuClient("platform_app");
|
||||||
if (sepol_exists("priv_app"))
|
allowSuClient("priv_app");
|
||||||
allowSuClient("priv_app");
|
allowSuClient("untrusted_app_25");
|
||||||
if (sepol_exists("untrusted_app_25"))
|
allowSuClient("untrusted_app_27");
|
||||||
allowSuClient("untrusted_app_25");
|
|
||||||
|
|
||||||
// Some superuser stuffs
|
// Some superuser stuffs
|
||||||
suRights();
|
suRights();
|
||||||
|
Loading…
Reference in New Issue
Block a user