Add rules for Android P

This commit is contained in:
topjohnwu 2018-03-11 07:23:30 +08:00
parent 26dfbb3028
commit 21a557a184

View File

@ -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();