Fix terminal on android 8

No need to handle untrusted_app_all_devpts on modern devices, but devpts policy is different for older devices.
This commit is contained in:
vvb2060 2021-09-24 23:56:36 +08:00 committed by John Wu
parent ecd332c573
commit cb4361b7b7

View File

@ -54,6 +54,14 @@ void sepolicy::magisk_rules() {
allow(SEPOL_CLIENT_DOMAIN, SEPOL_EXEC_TYPE, "file", ALL);
allow(SEPOL_CLIENT_DOMAIN, SEPOL_CLIENT_DOMAIN, ALL, ALL);
const char *pts[]{"devpts", "untrusted_app_devpts", "untrusted_app_25_devpts"};
for (auto type : pts) {
allow(SEPOL_CLIENT_DOMAIN, type, "chr_file", "getattr");
allow(SEPOL_CLIENT_DOMAIN, type, "chr_file", "read");
allow(SEPOL_CLIENT_DOMAIN, type, "chr_file", "write");
allow(SEPOL_CLIENT_DOMAIN, type, "chr_file", "ioctl");
}
// Allow these processes to access MagiskSU
vector<const char *> clients{ "init", "shell", "update_engine", "appdomain" };
for (auto type : clients) {