Commit Graph

113 Commits

Author SHA1 Message Date
Peter Cai
978ccd40f9 gsi: Initial implementation of sysbta, a system-side bluetooth audio HAL
On platform release T, the legacy `audio.a2dp.default` HAL no longer
exists, and cannot be trivially restored for generic system-side A2DP
audio support. Rather than trying to cling on to its existence (which
does not even work anymore even if one did so), it is time to come up
with a new solution.

This commit introduces a system-side implementation of the generic
bluetooth audio HAL. The HAL itself is modelled after the default
bluetooth audio HAL, while substantial components of the default audio
HAL are also included as it has to also implement the audio HAL
interfaces.

The audio HAL implementation is delegated to `audio.sysbta.default`,
forked from `audio.bluetooth.default` from the Bluetooth apex package.
It then communicates with the bluetooth audio HAL interfaces, which need
to live in the same process (in this case, the process of the sysbta
HAL). This is why we cannot just load `audio.sysbta.default` into the
default audio HAL or the audioserver process directly, but rather have
to include our own simplistic audio HAL implementation.

For now, the audio HAL implementation only includes one for the 6.0
version, but technically, an interface for *every* audio HAL version
needs to exist. This, along with other messiness in the sysbta
implementation, will be addressed in a future commit.

Note that to actually make use of the sysbta audio hal, patches in
frameworks/av and packages/modules/Bluetooth are required to introduce
support for the property `persist.bluetooth.system_audio_hal.enabled`.
2022-10-04 16:26:52 -04:00
haridhayal11
6c3350b249 sepolicy: address persist.sys.sf.hs_mode prop denials 2022-08-07 16:09:26 +05:30
Pierre-Hugues Husson
56295977db Additional sepolicy for OTA
See https://github.com/phhusson/treble_experimentations/issues/2289
2022-04-23 08:02:55 -04:00
Alberto Ponces
a66fa56752 Fix DT2W on Xiaomi Mi 11 Lite 5G by using xiaomi-touch
It may also fix for other Xiaomi devices
2022-02-09 21:07:02 +00:00
Pierre-Hugues Husson
089dcc7bc0 WIP continue on ota 2022-02-01 19:22:27 -05:00
Pierre-Hugues Husson
59a5f1a447 Improve phh-ota, to be theorically usable without root 2022-01-31 16:12:35 -05:00
Pierre-Hugues Husson
8c908a0f51 Upgrade selinux rights for oplus fingerprint access 2021-12-19 16:28:36 -05:00
Pierre-Hugues Husson
b66b7aa968 Let treble app set ims props 2021-11-18 16:42:15 -05:00
Pierre-Hugues Husson
9152974ac7 Allow rild access to more props. Help fix RIL on Pixel 1 2021-10-27 19:32:33 -04:00
Pierre-Hugues Husson
46d7d94e9f Allow more props reading from keymaster and gatekeeper 2021-10-27 14:38:43 -04:00
Pierre-Hugues Husson
fc4969ac98 Keystore2 needs to call getpidcon 2021-10-20 09:55:33 -04:00
Pierre-Hugues Husson
1bb44a597e Merge keymaster into their group
This fixes issue of no-boot on Samsung Galaxy A71
which was caused by hal_keymaster_qti being typealias rather than type
2021-10-18 15:33:31 -04:00
Pierre-Hugues Husson
9e30f63a84 Fix build for Android 12 2021-10-13 11:00:32 -04:00
Pierre-Hugues Husson
6a1917d307 Keymaster need access to our ro.xxx properties 2021-10-13 10:48:35 -04:00
Pierre-Hugues Husson
6f2be782fb Ugly: mark tkcore as permissive. It requires accessing some props to boot 2021-10-07 17:35:05 -04:00
Pierre-Hugues Husson
c117a13dad Oplus fingerprint HAL needs to set some persist.vendor properties
On stock rom, those properties' SELinux context is set in /system
To prevent SELinux conflicts, just allow all vendor props
2021-08-10 17:23:50 -04:00
Pierre-Hugues Husson
2b6440d5ac Need to set selinux context for oplus hal too 2021-08-10 16:11:03 -04:00
Pierre-Hugues Husson
f0cac6df49 Add MTK IMS services 2021-08-08 21:37:14 +02:00
Pierre-Hugues Husson
7a9ce0e848 Add support for treble app to control HCT touchscreen gestures HAL 2021-06-03 16:09:38 -04:00
Pierre-Hugues Husson
a52cbb93d5 Revert "Fix not booting on A6+"
This reverts commit 33d1b1c196.
2021-03-05 14:34:49 +01:00
Pierre-Hugues Husson
b0b0b7cfe2 Revert "typo"
This reverts commit c1ef009983.
2021-03-05 14:34:35 +01:00
Pierre-Hugues Husson
c1ef009983 typo 2021-03-05 14:19:55 +01:00
roynatech2544
33d1b1c196
Fix not booting on A6+ 2021-03-04 16:57:50 +09:00
DarkJoker360
9e81647de7 Address more Huawei fp denials 2021-03-01 09:58:41 +01:00
Victor Bo
d6aed01c48 sepolicy/init: fix adb in some cases
logs:
  02-06 17:28:44.560     1     1 I auditd  : type=1400
  audit(0.0:11): avc: denied { read } for comm="init"
  name="adbd" dev="mmcblk0p31" ino=11 scontext=u:r:init:s0
  tcontext=u:object_r:adbd_exec:s0 tclass=lnk_file permissive=0

  thanks HamiDo for hotfix
2021-02-15 12:54:48 -05:00
Victor Bo
19d8a296fa sepolicy/treble_app: add rule fix cam2api option
logs:
      17 00:47:48.796     1     1 W /system/bin/init: type=1107
      audit(0.0:357): uid=0 auid=4294967295 ses=4294967295
      subj=u:r:init:s0 msg='avc: denied { set } for
      property=persist.vendor.camera.eis.enable pid=4411 uid=1000
      gid=1000 scontext=u:r:system_app:s0
      tcontext=u:object_r:vendor_default_prop:s0 tclass=property_service
      permissive=0'

      01-17 00:47:48.796     1     1 W /system/bin/init: type=1107
      audit(0.0:356): uid=0 auid=4294967295 ses=4294967295
      subj=u:r:init:s0 msg='avc: denied { set } for
      property=persist.vendor.camera.HAL3.enabled pid=4411 uid=1000
      gid=1000 scontext=u:r:system_app:s0
      tcontext=u:object_r:vendor_default_prop:s0 tclass=property_service
      permissive=0'
2021-02-15 12:53:43 -05:00
DarkJoker360
49a4d5ce06 Address Huawei fingerprint denials
* Fixes fingerprint enrollment issues on P vendor devices.
2021-01-22 10:46:46 +01:00
Pierre-Hugues Husson
43f324824a Fix video crashing on apps targetting Android 11, on some Mediatek devices (like Redmi 9) 2021-01-21 10:00:15 -05:00
Peter Cai
70950fd8ee sepolicy: add spreadtrum IMS services 2020-12-16 19:42:09 +08:00
Pierre-Hugues Husson
f121aba763 Allow more blockdev --setrw 2020-11-30 11:00:38 +01:00
Pierre-Hugues Husson
30b84072fc Allow treble_app to set persist.vendor.vilte_support (to 0) 2020-11-29 09:36:05 -05:00
Pierre-Hugues Husson
3489a71cf2 Allow init to create system_file symlinks for A-only, see https://github.com/phhusson/treble_experimentations/issues/1553 2020-11-08 13:13:10 +01:00
Pierre-Hugues Husson
d1a638f4f8 Allow treble_app to access mediatek radio hal to detect it 2020-10-26 22:45:37 +01:00
Pierre-Hugues Husson
0ed42b1d02 Allow treble app to set more props 2020-10-25 21:11:27 +01:00
DarkJoker360
4388860aed Address charger denials on Huawei devices
Thanks to phh and Hamido for the help
2020-06-23 16:45:08 +02:00
Pierre-Hugues Husson
282728cf70 Fix denial preventing Moto One Macro to boot, because init cant mount /mnt/product/persist 2020-06-17 13:36:15 +02:00
Andy CrossGate Yan
d357dec2d4 Quick fixup
Building is different from on-the-fly testing
2020-06-11 13:59:47 +00:00
Andy CrossGate Yan
44fe1f36aa More rights
"Here's Sammy!"
2020-06-11 21:34:36 +08:00
Pierre-Hugues Husson
545be46423 Allow phh-su to blockdev --setrw dm partitions to mount / read-write on logical partition devices 2020-06-06 13:13:25 +02:00
Pierre-Hugues Husson
34170ee087 vendor policy requires a _29_0 type to apply 2020-05-29 12:52:56 +02:00
Pierre-Hugues Husson
d917563900 Add smcinvoke dev type. Should fix widevine on Redmi Note 9S 2020-05-29 10:12:28 +02:00
Pierre-Hugues Husson
167c3bb4c1 Add /efs, needed on Galaxy A51 for fingerprint sensor calibration 2020-05-13 13:10:53 +02:00
Pierre-Hugues Husson
fd46dfb49a [su] Give more right to control dynamic partitions 2020-05-13 10:03:26 +02:00
Pierre-Hugues Husson
53df615cca More phhsu perms 2020-04-14 09:50:38 +02:00
Pierre-Hugues Husson
6f2d3e5d29 Never forget access to ourselves 2020-04-14 09:50:38 +02:00
Pierre-Hugues Husson
a8c3c6124b Add persist.sys.phh.no_vendor_overlay property to ignore vendor overlay 2020-04-05 00:55:24 +02:00
Pierre-Hugues Husson
4bc2f864df Fix pm install through a file provided by su
See https://github.com/phhusson/treble_experimentations/issues/1214
2020-03-30 23:50:57 +02:00
Michael Cheah
510e1c01d9
[xiaomi] Use persist.sys.phh.xiaomi.dt2w prop to control DT2W 2020-03-26 09:44:58 +08:00
Pierre-Hugues Husson
0031326e7d Add Oppo fingerprint support, tested on Realme X2 Pro 2020-03-10 23:26:03 +01:00
Pierre-Hugues Husson
e0c0285eb2 Fix huawei touchscreen hal for treble app (used for glove mode) 2019-12-04 23:42:44 +01:00