Pixelstat: battery history access premission

Test: manually, relate seploicy not show; battery history log printed
      05-24 13:29:19.637  2829  2829 D pixelstats_BatteryEEPROM:
      checkAndReport: 0940 0a80 0500 0200 0200 0000
Bug: 189050725
Change-Id: I20567e168db43fe2168a9a30ac7a4b0cec65a665
Signed-off-by: Denny cy Lee <dennycylee@google.com>
This commit is contained in:
Denny cy Lee 2021-05-24 13:32:21 +08:00
parent d74e989739
commit 0b21a2d44a
4 changed files with 14 additions and 0 deletions

View file

@ -53,3 +53,5 @@ type fingerprint_device, dev_type;
# AMCS device
type amcs_device, dev_type;
# Battery history
type battery_history_device, dev_type;

View file

@ -361,6 +361,9 @@
# pixelstats binary
/vendor/bin/pixelstats-vendor u:object_r:pixelstats_vendor_exec:s0
# battery history
/dev/battery_history u:object_r:battery_history_device:s0
# Vendor_kernel_modules
/vendor_dlkm/lib/modules/.*\.ko u:object_r:vendor_kernel_modules:s0

View file

@ -18,3 +18,9 @@ allow pixelstats_vendor sysfs_pixelstats:file r_file_perms;
allow pixelstats_vendor sysfs_wlc:dir search;
allow pixelstats_vendor sysfs_wlc:file rw_file_perms;
# OrientationCollector
allow pixelstats_vendor fwk_sensor_hwservice:hwservice_manager find;
# Batery history
allow pixelstats_vendor battery_history_device:chr_file r_file_perms;

View file

@ -3,3 +3,6 @@ binder_call(system_server, gpsd);
binder_call(system_server, hal_camera_default);
# Allow system server to find vendor uwb service
allow system_server uwb_vendor_service:service_manager find;
# pixelstats_vendor/OrientationCollector
binder_call(system_server, pixelstats_vendor)