Skip to content

Commit

Permalink
sepolicy: Add LiveDisplay policies
Browse files Browse the repository at this point in the history
Change-Id: I00c1a619c39e694a28c666f10eaad4c946cddab7
  • Loading branch information
lifehackerhansol committed Dec 25, 2023
1 parent f19e442 commit afcf293
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions sepolicy/vendor/file_contexts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
/(vendor|system/vendor)/bin/hw/vendor\.lge\.hardware\.audio\.dac\.control@1\.0-service u:object_r:hal_dac_control_default_exec:s0
/(vendor|system/vendor)/bin/hw/android\.hardware\.vibrator(@1\.[1-3])?-service\.lge u:object_r:hal_vibrator_default_exec:s0
/(vendor|system/vendor)/bin/hw/android\.hardware\.ir@1\.2-service\.lge u:object_r:hal_ir_default_exec:s0
/(vendor|system/vendor)/bin/hw/vendor\.lineage\.livedisplay@2\.0-service\.lge u:object_r:hal_lineage_livedisplay_qti_exec:s0

# Sysfs
/sys/bus/i2c/drivers/es9218-codec(/.*)? u:object_r:sysfs_dac:s0
Expand Down
12 changes: 12 additions & 0 deletions sepolicy/vendor/hal_lineage_livedisplay_qti.te
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Allow hal_lineage_livedisplay_qti to find qdisplay_service
allow hal_lineage_livedisplay_qti qdisplay_service:service_manager find;

# Allow hal_lineage_livedisplay_qti to call hal_sensors_default via binder
binder_call(hal_lineage_livedisplay_qti, hal_graphics_composer_default)

# Allow hal_lineage_livedisplay_qti to write to DisplayMode nodes
r_dir_file(hal_lineage_livedisplay_qti, sysfs_livedisplay_tuneable);
allow hal_lineage_livedisplay_qti sysfs_livedisplay_tuneable:file rw_file_perms;

# Allow hal_lineage_livedisplay_qti to set vendor display prop
set_prop(hal_lineage_livedisplay_qti, vendor_display_prop)
2 changes: 2 additions & 0 deletions sepolicy/vendor/legacy-um/hal_lineage_livedisplay_qti.te
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Allow hal_lineage_livedisplay_qti to write to DisplayMode nodes
r_dir_file(hal_lineage_livedisplay_qti, sysfs_graphics);
2 changes: 2 additions & 0 deletions sepolicy/vendor/vndr/hal_lineage_livedisplay_qti.te
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Allow hal_lineage_livedisplay_qti to write to DisplayMode nodes
r_dir_file(hal_lineage_livedisplay_qti, vendor_sysfs_graphics);

0 comments on commit afcf293

Please sign in to comment.