Commit Graph

82 Commits

Author SHA1 Message Date
Albert I
cd57ddd383 sm7250-common: sepolicy: Allow apps and camera HAL access to secure ADSP domain
Signed-off-by: Albert I <kras@raphielgang.org>
Change-Id: Ibb1071299632ab53726638dbcc134d4bca59fc52
2021-12-01 13:02:03 +01:00
Albert I
40add99394 sm7250-common: sepolicy: Label more hwservice properties
Signed-off-by: Albert I <kras@raphielgang.org>
Change-Id: I8a791255b46858544c9bedff0cbb764c4c87451e
2021-12-01 13:02:03 +01:00
xSylla
5851056517 sm7250-common: sepolicy: Address more denials
Signed-off-by: Albert I <kras@raphielgang.org>
Change-Id: I17da4904e7571229aef9e2a2b952a6b97b89d032
2021-12-01 13:02:03 +01:00
Albert I
dfb7c8454a sm7250-common: sepolicy: Address more sysfs_wakeup denials
* Also fix some rather botched policy and wrong labelling

Signed-off-by: Albert I <kras@raphielgang.org>
Change-Id: Ie0d80a7e4c0eadf37364a8cc2593c255b8f48e9a
2021-12-01 13:02:03 +01:00
Albert I
779828ff23 sm7250-common: Set Bluetooth MAC address using persist property
The idea is to allow us to not depend on stock QTI Bluetooth HAL, as MAC
addresses fetched from NVRAM by nv_mac script will be saved as hex-encoded
files. We can decode back saved files to then the Bluetooth one be set using
persist property so it can be read by Bluetooth HAL.

This is loosely based on similar techniques used on Mi 9 and ZenFone Max Pro M2.

Signed-off-by: Albert I <kras@raphielgang.org>
Change-Id: I74d07c3c3125a04962c37fe8bfcc8385d1fd3398
2021-12-01 13:02:03 +01:00
dianlujitao
09bb619041 sm7250-common: Make fastrpc_shell_3 publicly available
* Used by GCAM for DSP-accelerated HDR processing
 * Arguably we should label /vendor/dsp/cdsp/fastrpc_shell_3 to
   same_process_hal_file like Pixels, but the partition is prebuilt thus
   we're unable to relabel it.
 * Copy the file to writable tmpfs, setup attributes and bind mount back
   to workaround the limitation.

[ghostrider-reborn]:
Allow adsp/cdsprpcd and neuralnetworks HAL to access fastrpc_shell_3

[kras edit:
 1. rename some contexts as per qva/kona
 2. extend to allow camera HAL and VPP service to access it as well]

Co-authored-by: Adithya R <gh0strider.2k18.reborn@gmail.com>
Change-Id: Ide90e5c7307d413db5ece736e859559f06679545
2021-12-01 13:02:03 +01:00
Albert I
f99724e748 sm7250-common: Import NVRAM blobs
Required to retrieve MAC addresses and save them somewhere in /data/vendor
so stock QTI Bluetooth HAL can read and set correct one, otherwise the HAL
will set a randomized one that always starts with ff:dd.

cnss-daemon isn't affected since nv_mac will write directly to
/mnt/vendor/persist/wlan_mac.bin to be read by WLAN driver.

Signed-off-by: Albert I <kras@raphielgang.org>
Change-Id: I2d95de397c3bab9e3c55171bf0ff833346bef32e
2021-12-01 13:02:03 +01:00
xSylla
c74a5a4f8f sm7250-common: sepolicy: Drop Motor hal
*There are no devices on lito that use motor

Signed-off-by: xSylla <syllamodder@gmail.com>
2021-12-01 13:02:03 +01:00
Sebastiano Barezzi
9b33d47fff sm7250-common: Drop M4DEFS
Change-Id: I43c99687e099d029d99a807bb5384151601c9d36
2021-12-01 13:02:03 +01:00
Sebastiano Barezzi
274205fbfa sm7250-common: fod: We don't use wakelock anymore
Change-Id: I805488ef50d5753e070df8efdcf0e2293ef06279
2021-12-01 13:02:03 +01:00
Sebastiano Barezzi
53f39f7889 sm7250-common: Kill touchfeature
Change-Id: Iea8dbe1a69906627ffdabca70ecea624435fc53e
2021-12-01 13:02:03 +01:00
Demon000
d420784581 sm7250-common: fod: set nit value on sysfs notification
Change-Id: I78069d10677c6704b0bb080ecf76ecbbfd0b2212
2021-12-01 13:02:03 +01:00
Sebastiano Barezzi
0af33e2d34 Revert "sm8250-common: sepolicy: Bring back displayfeature policies"
This reverts commit 2fd2065970.

Change-Id: If2117ae70378a4e3a4c9ace1cfbe1cf6f36f7ecd
2021-12-01 13:02:03 +01:00
TheScarastic
7eaae54a2b Revert "sm8250-common: Add FODService"
This reverts commit 06f816fd6b.

Change-Id: I75216f8439bdf2fa23b478889e6800014e08226a
2021-12-01 13:02:03 +01:00
doc HD
9b1964a51e sm7250-common: sepolicy: Allow system server to read Fast Charging status
Change-Id: I379dd8f0f49b7f9eee06067bd41e773e8f5e933d
Signed-off-by: xSylla <syllamodder@gmail.com>
2021-12-01 13:02:03 +01:00
Bruno Martins
74161382a4 sm7250-common: Migrate to Xiaomi power AIDL HAL
Change-Id: I42170d51a517170b58d532addd9c38496e43457c
2021-12-01 13:02:03 +01:00
SebaUbuntu
5372c713af sm7250-common: lights: Rebrand for Xiaomi SM7250
Signed-off-by: xSylla <syllamodder@gmail.com>
2021-12-01 13:02:03 +01:00
Sebaubuntu
104f3d6f68 sm7250-common: vibrator: Rebrand to Xiaomi SM7250
Signed-off-by: xSylla <syllamodder@gmail.com>
2021-12-01 13:02:03 +01:00
xSylla
35aa84537f sm8250 > sm7250 2021-12-01 13:02:03 +01:00
TheScarastic
06f816fd6b
sm8250-common: Add FODService
Change-Id: I34af976ce5c6cbaaa2a45c96374664119d6ac5c8
2021-06-08 14:53:18 +02:00
Sebastiano Barezzi
2fd2065970
sm8250-common: sepolicy: Bring back displayfeature policies
* FOD devices will use it, sigh

Change-Id: I2712a06f20a3b10c3b5666e1cd17b82f6374c783
2021-06-08 14:53:18 +02:00
dianlujitao
b35142646d sm8250-common: sepolicy: Label TP node
Change-Id: Id55db9b6614320650c8c61e698f71ddc9f04d086
2021-06-03 00:30:15 +02:00
Sebastiano Barezzi
3289131e2b
sm8250-common: sepolicy: Refactor file_contexts and genfs_contexts
Change-Id: Ia55dc04019bbf58a433ae534677896b7563765ab
2021-06-03 00:13:12 +02:00
Sebastiano Barezzi
5d6a65af44
sm8250-common: Redo wakeup sources labels
Change-Id: Ia07572ce7a6435fb5e135839aa5cf3d514de90aa
2021-06-02 23:46:57 +02:00
Sebastiano Barezzi
27f98a746a
sm8250-common: Remove useless sysfs labels
Change-Id: Ic96f11d1a3cea01dd1ae8f952b654ae1ca5ca545
2021-06-02 23:46:57 +02:00
Sebastiano Barezzi
d202c38b35
sm8250-common: Label bq2597x-standalone device
Change-Id: I35cacbcbd9312c87292c3e39cf8f4ac342210238
2021-06-02 23:46:57 +02:00
Sebastiano Barezzi
e17a33df36
sm8250-common: Allow Goodix FOD HAL to access perf HAL
* For somehow reason Xiaomi decided to implement perf locks in the HAL, not in fingerprint HIDL, so I'm forced to allow it

Change-Id: I4472f9768858916231f19c765d8aa74d8c3b401a
2021-05-05 17:36:54 +02:00
Sebastiano Barezzi
1b3fbae7b0
sm8250-common: biometrics: Implement boosting on authentication
Change-Id: Ia9cde9f540a614ad700fb497288a2a986e924dbd
2021-05-05 17:36:54 +02:00
Sebastiano Barezzi
54d643ec3d
sm8250-common: biometrics: Rebrand to Xiaomi SM8250
Change-Id: If1106b9567ec5e138e1404dc49f99d63f7fb6c84
2021-04-22 15:52:30 +02:00
Sebastiano Barezzi
2887577f80
sm8250-common: Drop displayfeature
Co-authored-by: Ramii Ahmed <ramy@ahmedramy.com>

Change-Id: I78719e1f66aa0bc6df366424e3aeb92433d3d899
2021-04-10 23:45:19 +02:00
Sebastiano Barezzi
1d10eddb92
sm8250-common: Label /dev/ir_spi
Change-Id: I75f980c424b11583fc097da1481f4c9ee7ba1b79
2021-04-01 01:39:47 +02:00
Sebastiano Barezzi
c2c941216a
sm8250-common: Initial common sepolicies
* Adapted from xiaomi-sm6150 and xiaomi-sm6250

Co-authored-by: Pig <pig.priv@gmail.com>
Co-authored-by: Zinadin Zidan <zidan.roking@gmail.com>
Co-authored-by: Utsav Balar <utsavbalar1231@gmail.com>
Co-authored-by: Ramii Ahmed <ramy@ahmedramy.com>
Change-Id: Ie64d863d6d36bdebb79d328de9ede5826b1cd486
2021-03-29 08:27:20 +02:00