pipa: sepolicy: Initial xiaomi-keyboard sepolicy

Change-Id: Ibde2e31a78cd05eb6c8f5f8dfb0697cd0b079298
This commit is contained in:
Luka Panio
2023-11-02 19:38:59 +01:00
committed by Abdulwahab Isam
parent cd9f1f5701
commit 94f7eaa1bc
5 changed files with 27 additions and 0 deletions

View File

@@ -1,2 +1,5 @@
# Xiaomi Touch
type xiaomi_touch_device, dev_type;
# Xiaomi Keyboard
type xiaomi_keyboard_device, dev_type;

View File

@@ -1,5 +1,11 @@
# Pen
/vendor/bin/xiaomi-pen u:object_r:xiaomi_pen_exec:s0
# Keyboard
/vendor/bin/xiaomi-keyboard u:object_r:xiaomi_keyboard_exec:s0
# Xiaomi Touch
/dev/xiaomi-touch u:object_r:xiaomi_touch_device:s0
# Xiaomi Keyboard
/dev/nanodev0 u:object_r:xiaomi_keyboard_device:s0

1
sepolicy/vendor/hwservicemanager.te vendored Normal file
View File

@@ -0,0 +1 @@
binder_call(hwservicemanager, xiaomi_keyboard)

1
sepolicy/vendor/system_server.te vendored Normal file
View File

@@ -0,0 +1 @@
binder_call(system_server, xiaomi_keyboard)

16
sepolicy/vendor/xiaomi_keyboard.te vendored Normal file
View File

@@ -0,0 +1,16 @@
# Keyboard
type xiaomi_keyboard, domain;
type xiaomi_keyboard_exec, exec_type, vendor_file_type, file_type;
init_daemon_domain(xiaomi_keyboard)
get_prop(xiaomi_keyboard, hwservicemanager_prop)
binder_call(xiaomi_keyboard, hwservicemanager)
binder_call(xiaomi_keyboard, system_server)
allow xiaomi_keyboard xiaomi_keyboard_device:chr_file { open read write };
allow xiaomi_keyboard fwk_sensor_hwservice:hwservice_manager find;
allow xiaomi_keyboard fwk_sensor_service:service_manager find;
allow xiaomi_keyboard input_device:dir search;
allow xiaomi_keyboard servicemanager:binder { call transfer };