Commit Graph

60 Commits

Author SHA1 Message Date
xSylla
a03878433c sm7250-common: remove unneeded fm sepolicy rules
Change-Id: I34871314733cad04f80c76d0c7310e9e553a67d6
2022-06-05 14:27:17 +02:00
Inseob Kim
d593816647 sm7250-common: sepolicy: Attach vendor_property_type to properties
We are going to enforce that each property has an explicit owner, such
as system, vendor, or product. This attaches vendor_property_type to
properties defined under vendor sepolicy directories.

Bug: 159097992
Test: m selinux_policy && boot device
Change-Id: I33c40ca345365d8f01f43d3ce7f1f3434b1edfd5
2022-06-05 14:24:13 +02:00
Sebastiano Barezzi
cedd2fecf6 sm7250-common: Move to AOSP NXP NFC HAL
* NXP added snxxx support in AOSP, \o/

Change-Id: Id1b9cdbe1f29d1ff61af8182ae2f8370e5210426
2022-06-05 14:24:12 +02:00
Sebastiano Barezzi
ddfe70d9ae sm7250-common: sepolicy: Reorder {hwservice|vndservice}_contexts
Change-Id: I9765603ba9e053f125f7dc056932569e3603db6b
2022-06-05 14:24:12 +02:00
Sebastiano Barezzi
ad39ce21ee sm7250-common: sepolicy: Bringup property_contexts for Android 12
* Except MIUI global props, they all appear unused/only used for debug/only used with MIUI

Change-Id: I60070ba7658ce262be66ee3bdd0cb6cdcf9b8c49
2022-06-05 14:24:12 +02:00
Sebastiano Barezzi
34db6ec7e6 sm7250-common: Unlabel ro.product.system.manufacturer
* host_init_verifier: Unable to serialize property contexts: Duplicate exact match detected for 'ro.product.system.manufacturer'

Change-Id: I21328a460568217a6b1f445c8a98cd9e4d623426
2022-06-05 14:24:12 +02:00
TheScarastic
e2acea18d7 sm7250-common: biometrics/fod: Uprev to 2.3
* [SebaUbuntu]: Move fingerprint HIDL to 2.3
 * Remove Lineage FOD HIDL
 * Rename fodextension to udfpsextension

Change-Id: I292bbb9509de89eb9031daebab3cb5b2e5411d21
2022-06-05 14:24:12 +02:00
Sebastiano Barezzi
ede9a7fff1 sm7250-common: Move to common Xiaomi light AIDL
Change-Id: I1edcfafce4ea7a76327f8466f8535e63cfc8ed39
2022-06-05 14:22:33 +02:00
LuK1337
a3142c6513 sm7250-common: Drop SSR props & references and set SSR restart_level in init.qcom.rc
Change-Id: I32fc08c9ad36b9c8ebfc019fc87a19eece18f0b4
2021-12-21 01:29:41 +01:00
xSylla
f8582d196e Revert "sm8250-common: biometrics: Implement boosting on authentication"
This reverts commit 1b3fbae7b0.
2021-12-01 16:43:29 +01:00
luk1337
5fe472245e sm7250-common: sepolicy: Regenerate labels for wakeup dirs
The list of folders for genfscon was generated using following script:
  for f in `adb shell "find /sys/devices -name wakeup -type d"`; do
      adb shell "ls -Z '$f' | grep -qv u:object_r:sysfs:s0 || echo '$f'"
  done

While list for regular file_contexts was just a simple grep "wakeup[0-9]".

Signed-off-by: xSylla <syllamodder@gmail.com>
2021-12-01 16:43:28 +01:00
SebaUbuntu
01e51ccb10 sm7250-common: sepolicy: Generic-ify dynamic FPS nodes
Change-Id: Id6df844498c08d7b40fe46045ed8f5f883387bc9
2021-12-01 16:43:28 +01:00
Sebastiano Barezzi
ddece61c69 sm7250-common: sepolicy: Remove fod_ui labeling
* We got it covered with vendor_sysfs_graphics

Change-Id: I40f13e1aa8dc6fb6d04118c0f8bcee9fa66efaa4
2021-12-01 16:43:28 +01:00
Sebastiano Barezzi
8e30fb19cc sm7250-common: sepolicy: Label more wakeup/bq2597x-standalone nodes
Change-Id: Id55786785f7fc7446f454b3deb338d77036a14bb
2021-12-01 16:43:28 +01:00
Sebastiano Barezzi
7b49ef927c sm7250-common: sepolicy: Fix rx_swr_ctrl/wakeup label indentation
Change-Id: Idc10f662f8ea108e4f22315422652661c99cc5f2
2021-12-01 16:43:28 +01:00
Sebastiano Barezzi
9e9a8fcdc9 sm7250-common: sepolicy: Label /data/gf_data
Change-Id: I16097514f7be098c2cd12b290f3db4c803161011
2021-12-01 16:43:28 +01:00
Sebastiano Barezzi
8e67d730cf sm7250-common: sepolicy: Don't grant batterysecret access to generic sysfs
Change-Id: I40a8516f241b2cade49f5dc6e83a2c2ca1165796
2021-12-01 16:43:28 +01:00
Sebastiano Barezzi
e37967e388 sm7250-common: sepolicy: Label bq2597x-standalone in another I2C address
Change-Id: Ia6bc16624d7505b468c8a978536e4e77f9855a45
2021-12-01 16:43:28 +01:00
Sebastiano Barezzi
943e46aa39 sm7250-common: sepolicy: Redo indentation in property_contexts
Change-Id: Icd49f4a9203fd9764c7f784379fdd8ea06508144
2021-12-01 16:43:28 +01:00
Sebastiano Barezzi
79d856e00c sm7250-common: sepolicy: Remove comments from property.te
Change-Id: Iaf899224f9037d412f047e8302f15e0f9906ef19
2021-12-01 16:43:28 +01:00
Sebastiano Barezzi
5457b1b1cd sm7250-common: sepolicy: Remove duplicated allow
Change-Id: I384fead88397fad98b3446fa16900b9d371fd1da
2021-12-01 16:43:28 +01:00
Sebastiano Barezzi
dd29f9fc7e sm7250-common: sepolicy: Reorder file.te
Change-Id: I99e4fe688dacc0e02e4f7bfecfc843edad907e32
2021-12-01 16:43:28 +01:00
erfanoabdi
2d98c6494f sm7250-common: Add support for FMRadio
Signed-off-by: xSylla <syllamodder@gmail.com>
2021-12-01 16:43:28 +01:00
Adithya R
595f021689 sm7250-common: Address more battery secret denials
[   19.924855] type=1400 audit(1617105165.784:140): avc: denied { getattr } for comm="batterysecret" path="/dev/kmsg" dev="tmpfs" ino=12292 scontext=u:r:batterysecret:s0 tcontext=u:object_r:kmsg_device:s0 tclass=chr_file permissive=0

Signed-off-by: Kuba Wojciechowski <nullbytepl@gmail.com>
Change-Id: I9fdd78449973ac8f8f466402d82bc1e77de4d8f3
2021-12-01 13:02:03 +01:00
xSylla
369187b6df sm7250-common: sepolicy: Label few more wakeup nodes
Signed-off-by: xSylla <syllamodder@gmail.com>
2021-12-01 13:02:03 +01:00
xSylla
6943ddddd2 sm7250-common: sepolicy: Label more wakeup nodes
Signed-off-by: xSylla <syllamodder@gmail.com>
2021-12-01 13:02:03 +01:00
SebaUbuntu
fd28bafa34 sm7250-common: sepolicy: Remove generic sysfs references
* We labeled everything

+

* Remove RTC label as we have a duplicate of it

Signed-off-by: xSylla <syllamodder@gmail.com>
2021-12-01 13:02:03 +01:00
Albert I
040196370d sm7250-common: sepolicy: Allow neural networks HAL to read ADSP properties
Signed-off-by: Albert I <kras@raphielgang.org>
Change-Id: I3fa6f51b746703bab2faf3f5fd6334b221a8636c
2021-12-01 13:02:03 +01:00
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