Commit graph

8 commits

Author SHA1 Message Date
Sina Hassani
e763f3cc9b Allow HAL to access sysfs.
This is so that it can read fw metrics from sysfs and dump them through
dumpsys.

Test: Ran dumpsys and bugreport.
Bug: 193841666
Change-Id: I08c08e35bad35d0eefc3f6ad218fb47e24051b0c
2021-07-16 16:27:34 -07:00
Franklin He
6a488b8a81 Merge "Add new sepolicy to allow Power Hint" into sc-dev 2021-06-18 08:37:19 +00:00
Franklin He
c53c03b843 Add new sepolicy to allow Power Hint
SELinux policy changes to work with https://googleplex-android-review.git.corp.google.com/c/device/google/gs101/+/14997393
This allows the NNAPI HAL to make IPC calls to the Power HAL in order to request power hints

Bug: 191241561
Test: Pushed new SEPolicy to device, verified no AVC problems when making IPC calls
Change-Id: I8209b3677bedf908901389c07304f4478d0431b0
2021-06-17 07:59:11 +00:00
Yu-Chi Cheng
643e5a7123 Allowed EdgeTPU compilation services (tflite and nnapi) to access
overcommit_memory info.

This is required as part of the compilation process, likely part of
the jemalloc which was added recently.

Bug: 190790251
Test: verified on local P21 device.
Change-Id: I4d90ea92afd7beaa4c4efa6ed509d703764932a1
2021-06-16 16:17:14 -07:00
Richard Hsu
753e62f39c Merge "[BugFix] SEPolicy for libedgetpu_darwinn2.so logging to stats service" into sc-dev 2021-06-13 06:11:41 +00:00
Richard Hsu
8c979899cc [BugFix] SEPolicy for libedgetpu_darwinn2.so logging to stats service
In order to access the darwinn metrics library from the google camera
app (product partition), we need to create an SELinux exception for
the related shared library (in vendor) it uses. This CL adds the same_process_hal_file tag to allow this exception.

Bug: 190661153, 151063663

Test: App can load the .so and not crash after this change.
Before: No permission to access namespace.
(https://paste.googleplex.com/6602755121610752)
After: GCA doesn't crash on load.

Change-Id: I8671732184bbbe283c94d1acd3bb1ff397fe651c
2021-06-10 19:36:35 -07:00
Sung-fang Tsai
985aa698c7 qllow priv-app to access Pixel power HAL extension.
SELinux issues to solve:

native  : aion.cc:780 Error loading lib_aion_buffer.so dlopen failed: library "pixel-power-ext-V1-ndk_platform.so" not found: needed by /vendor/lib64/lib_aion_buffer.so in namespace sphal

05-23 10:11:32.055   420   420 E SELinux : avc:  denied  { find } for pid=6630 uid=10089 name=android.hardware.power.IPower/default scontext=u:r:priv_app:s0:c512,c768 tcontext=u:object_r:hal_power_service:s0 tclass=service_manager permissive=0

Bug: 187373665
Test: Passed, procedure listed in b/187373665#comment8 with forrest.
Change-Id: Ice7c69bca4a029a61ca1ccb7087ea01948ae5f24
2021-06-10 17:56:17 +00:00
Adam Shih
e7ed46c52c organize EdgeTPU modules and sepolicy
Bug: 190331327
Bug: 190331548
Bug: 189895600
Bug: 190331108
Bug: 182524105
Bug: 183935302
Test: build ROM and check if the modules and sepolicy are still there
Change-Id: I40391a239a16c4fe79d58fab209dcbd1a8f25ede
2021-06-09 10:39:04 +08:00