20 Commits

Author SHA1 Message Date
Eliot Wong
06c6ca63b5 Merge "Add SEPolicy for vendor_camera_isp_service" into udc-qpr-dev 2023-08-07 16:57:50 +00:00
Eliot Wong
2daad9a814 Add SEPolicy for vendor_camera_isp_service
Allows the Camera HAL to start a new ISP Service.

avc message:
07-31 17:08:46.990   536   536 E SELinux : avc:  denied  { add } for
pid=8308 uid=1000 name=com.google.pixel.camera.isp.IIspService/default
scontext=u:r:hal_camera_default:s0
tcontext=u:object_r:default_android_service:s0 tclass=service_manager
permissive=0

Bug: 293447476
Test: verify no avc errors and ISP Service starts
Test: atest liblyric.services_isp_service_test
Change-Id: Icbd07820d3323c09868d0249c1ef9d7f2952751e
2023-08-02 15:23:27 +00:00
malikakash
89b8a6e02f Allow PCS to bind to LyricConfigProvider
- Sepolicy change

Bug: 280340307
Test: Local Testing

Change-Id: Id2dcf659b3c288b5c4c1756e9bd7ae80915b7942
2023-07-25 23:48:51 +00:00
malikakash
7c32a87d82 Add Sepolicy for LyricConfigProvider to use CameraService
Bug: 280340307
Test: LyricConfigProvider can reach out to CameraService.
Change-Id: I9b1c7f82fdb1cea09b5c520684574c36be8cd15d
2023-07-20 23:29:14 +00:00
malikakash
bdccd2c97b Add sepolicy to allow pbcs to use SysProps
-Add custom domain for our sysprops, of the forms
  -vendor.camera.pbcs.debug.*
  -persist.vendor.camera.pbcs.debug.*
  -Example: vendor.camera.pbcs.debug.enable_lyricconfigprovider
  -This domain will be system + vendor_init writable
-Allow PBCS to read those sysprops

We should now be able to gate our features in PBCS and merge in
successfully. For local dev, we can do:

adb root && adb shell setprop <prop> 1

Bug: 280340307
Test: android.os.SystemProperties.get() works successfully in
  LyricConfigProvider for vendor.camera.pbcs.debug.* props

Change-Id: I4b151f606883c0ae32f99b5f75b70b5d4e228f1d
2023-07-19 21:24:31 +00:00
malikakash
8a5b714f8d Add sepolicy configs for LyricConfigProvider Service
- Introduce service_context for ILyricConfigProvider service
- Allow adding the ILyricConfigProvider to the service manager.
- Allow HAL to find ILyricConfigProvider from servicemanager
- Allow all proceses in com.google.pixel.services:* to have the same domain as the app (vendor_pbcs_app)
  -- We'll be running services in their own processes so this
     is needed.
- TODO: binder_call(vendor_pbcs_app, vendor_pcs_app);
  Allow PBCS appdomain to make binder calls into PCS appdomain
  after ag/24030784 lands.

Bug: 280340307
Test: We can successfully start and register the LyricConfigProvider service with the servicemanager.
Change-Id: Ia0a74065e98761e48aa041bf7f2f34188017cee4
2023-07-19 21:21:39 +00:00
Utku Utkan
88284b922a Add SEPolicy for hal_pixel_remote_camera_service
Bug: 287069860
Test: Manual developer testing with 'setenforce 1'
Change-Id: Iffe22dae7485bd433abdb60249ce8900a1996291
2023-07-18 20:53:59 -07:00
Utku Utkan
ab8b16b905 Revert^2 "Add SEPolicy for Pixel Camera Services Extensions"
Revert submission 24122569-revert-24056607-pixel-camera-services-extensions-sepolicy-OFSULTXSBL

Reason for revert: Relanding the original topic after copying the certificates under `device/google` for `without-vendor` branches

Reverted changes: /q/submissionid:24122569-revert-24056607-pixel-camera-services-extensions-sepolicy-OFSULTXSBL

Bug: 287069860
Test: m && flashall && dev test with Open Camera and Camera2 Ext
Change-Id: I7f9a759ca7b5538441de451eb80f20b3cb1e30a9
2023-07-18 20:37:13 -07:00
Utku Utkan
5896049be5 Revert^2 "Add vendor_pcs_app domain for PixelCameraServices"
Revert submission 24122569-revert-24056607-pixel-camera-services-extensions-sepolicy-OFSULTXSBL

Reason for revert: Relanding the original topic after copying the certificates under `device/google` for `without-vendor` branches

Reverted changes: /q/submissionid:24122569-revert-24056607-pixel-camera-services-extensions-sepolicy-OFSULTXSBL

Bug: 287069860
Test: m && flashall
Change-Id: Ic6ef3d67a518500f0db2cb8c537a3934e64d366b
2023-07-18 20:36:47 -07:00
Inseob Kim
cf2ca49dd5 Merge changes from topic "revert-24056607-pixel-camera-services-extensions-sepolicy-OFSULTXSBL" into udc-qpr-dev
* changes:
  Revert "Add vendor_pcs_app domain for PixelCameraServices"
  Revert "Add SEPolicy for Pixel Camera Services Extensions"
2023-07-19 02:08:56 +00:00
Inseob Kim
34a6dcecf5 Revert "Add vendor_pcs_app domain for PixelCameraServices"
Revert submission 24056607-pixel-camera-services-extensions-sepolicy

Reason for revert: build breakage on git_main-without-vendor

Reverted changes: /q/submissionid:24056607-pixel-camera-services-extensions-sepolicy

Change-Id: Ia18508a9350c4418795b5c861d29eb461e3b9ee6
2023-07-19 01:15:07 +00:00
Inseob Kim
09e3385652 Revert "Add SEPolicy for Pixel Camera Services Extensions"
Revert submission 24056607-pixel-camera-services-extensions-sepolicy

Reason for revert: build breakage on git_main-without-vendor

Reverted changes: /q/submissionid:24056607-pixel-camera-services-extensions-sepolicy

Change-Id: I9b4a52ec3edaa1a19aa4ec938191a26acc475a8a
2023-07-19 01:15:07 +00:00
Utku Utkan
be42c5b12c Don't audit any system_app_data_file:dir access
Lab devices don't do factory reset. So we see 'avc: denied' logs
everynow and then. The fix disables the related audits to avoid any
false negatives.

Bug: 287069860
Test: m && flashall && check for 'avc: denied { write }'
Change-Id: I4f98af849b99f4ece737c85a23e22b817677d917
2023-07-18 16:10:59 -07:00
Utku Utkan
d77ddb4c15 Add SEPolicy for Pixel Camera Services Extensions
Bug: 287069860
Test: m && flashall && dev test with Open Camera and Camera2 Ext
Change-Id: I4eac5697a122b56939bb3c3946b28a17dfdf4c0c
2023-07-18 12:18:34 -07:00
Utku Utkan
6c397defc4 Add vendor_pcs_app domain for PixelCameraServices
Bug: 287069860
Test: lunch <device-type>-userdebug && m
Change-Id: Ib5ee8dd71193b41190e7092e393ab912a4a7676a
2023-07-18 12:18:34 -07:00
Utku Utkan
fb20bc80c4 Add SEPolicy for vendor_camera_binder_service
Bug: 287069860
Test: lunch <device-type>-userdebug && m
Change-Id: Id993e137ebc041e583b4f6c5f6e1ab6e8cdae7b2
2023-07-12 09:45:54 -07:00
Utku Utkan
6b44778e00 Allow vendor_pbcs_app to search system_app_data_file:dir
Bug: 287069860
Test: m && flashall && check for 'avc: denied { search }'
Change-Id: I5d0ff960a6ad5b3359dbeedeeea3cac78471419b
2023-07-12 09:45:48 -07:00
Utku Utkan
049b1dfb53 Add vendor_pbcs_app domain for PersistentBackgroundCameraServices
Bug: 287069860
Test: lunch <device-type>-userdebug && m
Change-Id: I4153daaf3c8c656380333e695cc7f99ecd821e21
2023-07-06 18:34:36 -07:00
Krzysztof Kosiński
eea841f1cd Add shared config for Lyric camera HAL.
The config needs to be moved here to support future PDK builds
where the LyricCameraHAL directory will be absent.

Bug: 280124102
Test: presubmit
Change-Id: If967c3db8bb94cadd761ee19b7665db8b7e4b305
2023-04-29 09:31:41 +00:00
Adam Shih
1a62bec194 move camera dump to gs-common
Bug: 240530709
Test: adb bugreport
Create empty files starting with the following prefix
/data/vendor/camera/profiler/session-ended-
/data/vendor/camera/profiler/high-drop-rate-
/data/vendor/camera/profiler/watchdog-
/data/vendor/camera/profiler/camera-ended-
and do adb bugreport and make sure they end up in dumpstate_board.bin

Change-Id: I2f9dfb74476af295db8a392ebf7757681404841e
2023-03-06 10:02:00 +08:00