From 21a557a1840392e1b802480814cbb86607534814 Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Sun, 11 Mar 2018 07:23:30 +0800 Subject: [PATCH] Add rules for Android P --- rules.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/rules.c b/rules.c index f42ace60e..7865e8f06 100644 --- a/rules.c +++ b/rules.c @@ -2,6 +2,8 @@ #include "sepolicy.h" void allowSuClient(char *target) { + if (!sepol_exists(target)) + return; sepol_allow(target, "rootfs", "file", ALL); sepol_allow(target, "rootfs", "lnk_file", ALL); sepol_allow(target, "su", "unix_stream_socket", "connectto"); @@ -140,10 +142,9 @@ void sepol_magisk_rules() { allowSuClient("untrusted_app"); allowSuClient("system_app"); allowSuClient("platform_app"); - if (sepol_exists("priv_app")) - allowSuClient("priv_app"); - if (sepol_exists("untrusted_app_25")) - allowSuClient("untrusted_app_25"); + allowSuClient("priv_app"); + allowSuClient("untrusted_app_25"); + allowSuClient("untrusted_app_27"); // Some superuser stuffs suRights();