Commit Graph

51 Commits

Author SHA1 Message Date
Peter Cai
140cb9d3b0 sm6375-common: sepolicy: Make recovery permissive
Change-Id: I5b273c9c10b7c69df82fdf1c5c341385abddfec2
2023-07-05 02:59:09 +07:00
ghostrider-reborn
d49bf5fde6 sm6375-common: Define OEM fast charge sysfs node
* required for oem fast charger detection
 * this forces android to display "charging rapidly" whenever our
   proprietary 33w charger is connected, based on the value of
   this node (0/1)

Change-Id: I5094dfcd721a56e3ede62b16cdf187c898bdedf2
2023-07-05 02:59:09 +07:00
Jackeagle
1779f36fec sm6375-common: sepolicy: Address camera prop denials
E libc    : Access denied finding property "vendor.camera.aux.packagelist"
E libc    : Access denied finding property "vendor.camera.aux.packageblacklist"
2023-07-05 02:59:09 +07:00
Kshitij Gupta
ed151f16ad sm6375-common: sepolicy: dontaudit untrusted_app to open ashmem_device
- Fixes scroll lag in many apps, such as Twitter:
    W RenderThread: type=1400 audit(0.0:12371): avc: denied { open } for path=/dev/ashmem dev=tmpfs ino=10848 scontext=u:r:untrusted_app:s0:c123,c256,c512,c768 tcontext=u:object_r:ashmem_device:s0 tclass=chr_file permissive=0 app=com.twitter.android
- Apps are no longer allowed open access to /dev/ashmem, unless they
  target API level < Q.
  (8b12ff5f21)
2023-07-05 02:59:09 +07:00
nnippon99
784a053951 sm6375-common: sepolicy: fixup some_proses_hal_files
Signed-off-by: nnippon99 <adamayyad1999@hotmail.com>
2023-07-05 02:59:09 +07:00
nnippon99
c4ef298dd6 sm6375-common: sepolicy: label audio sysfs_wakeup node
E android.system.suspend@1.0-service: Error opening kernel wakelock stats for: wakeup135 (../../devices/platform/soc/soc:qcom,msm-audio-apr/soc:qcom,msm-audio-apr:qcom,q6core-audio/soc:qcom,msm-audio-apr:qcom,q6core-audio:sound/Listen 2 Audio Service/wakeup/wakeup135): Permission denied

Signed-off-by: nnippon99 <adamayyad1999@hotmail.com>
2023-07-05 02:59:09 +07:00
nnippon99
5aba25ec6e sm6375-common: sepolicy: address qr code denial
Signed-off-by: nnippon99 <adamayyad1999@hotmail.com>
2023-07-05 02:59:09 +07:00
nnippon99
9721283f0e sm6375-common: sepolicy: fix MiuiCamera denial
avc: denied { read } for name="com.xiaomi.dcal.wu.data" dev="dm-32" ino=1379 scontext=u:r:platform_app:s0:c512,c768 tcontext=u:object_r:vendor_camera_data_file:s0 tclass=file permissive=0 app=com.android.camera
Signed-off-by: nnippon99 <adamayyad1999@hotmail.com>
2023-07-05 02:59:09 +07:00
EndCredits
483962c2f1 sm6375-common: sepolicy: Allow perf hal to set { stop/irq_balance } props 2023-07-05 02:59:09 +07:00
Beru Hinode
f108a45c9e sm6375-common: sepolicy: Address a denial related to fast charge overlay
Signed-off-by: nnippon99 <adamayyad1999@hotmail.com>
2023-07-05 02:59:09 +07:00
nnippon99
546e0114a9 sm6375-common: sepolicy: address ro.miui.build.region denial
Signed-off-by: nnippon99 <adamayyad1999@hotmail.com>
2023-07-05 02:59:09 +07:00
nnippon99
e22b86c0c7 Revert "sepolicy: Make fastrpc_shell_3 publicly available"
This reverts commit 503d7c4cb5c60d1ea9ec0fbcdcfbb752faa71e13.

Change-Id: I0ec697cb8a26b9cf311bd96fb59edfdb6b0fe551
2023-07-05 02:59:09 +07:00
Arian
13fc1e36c2 sm6375-common: Move to common sensors multihal
Change-Id: Iba4df5ebb5d653cb2d3f68fce9e682d946d20935

Change-Id: I0cd62a7487b5b6188e95f318804fdb9ab7828822
2023-07-05 02:59:09 +07:00
Adithya R
75414e8a7b sm6375-common: Switch back to HWC for brightness control
Analysis of disassembled code in IDA revealed that the stock
libsdmcore is just writing the brightness to a custom sysfs node
in mi_display. Bind mount the real brightness node to that so it
gets written to the real node instead.

Change-Id: I3aa840e50b7a067667b949b0ba1f36d187602547
2023-07-05 02:59:09 +07:00
nnippon99
26be43ff39 [SQUASH] sm6375-common: sepolicy: Address more denials
* This is a squash commit from nnippon99:thirteen

veux: Address some missing denials

veux: Address wcnss denials

veux: Set ro.product.mod_device correctly and label sepolicy for it
* Proper set ro.product.mod_device depending on variant
* This needed for MIUICamera to work

veux: Add support for MiuiCamera!

veux: sepolicy: allow last_kmsg and fix denial
W init    : type=1400 audit(0.0:7): avc: denied { setattr } for name="last_kmsg" dev="proc" ino=4026532174 scontext=u:r:init:s0 tcontext=u:object_r:proc:s0 tclass=file permissive=0

W BootReceiver: cannot read last msg
W BootReceiver: java.io.FileNotFoundException: /proc/last_kmsg: open failed: EACCES (Permission denied)
W BootReceiver:	at libcore.io.IoBridge.open(IoBridge.java:574)
W BootReceiver:	at java.io.FileInputStream.<init>(FileInputStream.java:160)
W BootReceiver:	at android.os.FileUtils.readTextFile(FileUtils.java:637)
W BootReceiver:	at com.android.server.BootReceiver.logFsShutdownTime(BootReceiver.java:649)
W BootReceiver:	at com.android.server.BootReceiver.logBootEvents(BootReceiver.java:305)
W BootReceiver:	at com.android.server.BootReceiver.-$$Nest$mlogBootEvents(Unknown Source:0)
W BootReceiver:	at com.android.server.BootReceiver$1.run(BootReceiver.java:139)
W BootReceiver: Caused by: android.system.ErrnoException: open failed: EACCES (Permission denied)
W BootReceiver:	at libcore.io.Linux.open(Native Method)
W BootReceiver:	at libcore.io.ForwardingOs.open(ForwardingOs.java:563)
W BootReceiver:	at libcore.io.BlockGuardOs.open(BlockGuardOs.java:274)
W BootReceiver:	at libcore.io.IoBridge.open(IoBridge.java:560)
W BootReceiver:	... 6 more

veux: sepolicy: Fix logspam
* This is a SQUASH commit for multiple commits for fixing some logspam

veux: sepolicy: Label more sysfs wakeup nodes

veux: sepolicy: Label more graphics nodes
E WiredAccessoryManager: file /sys/devices/platform/soc/soc:qcom,msm-ext-disp/extcon/extcon3/name not found
E WiredAccessoryManager: file /sys/devices/platform/soc/soc:qcom,msm-ext-disp/extcon/extcon2/name not found
E WiredAccessoryManager: file /sys/devices/platform/soc/soc:qcom,msm-ext-disp/extcon/extcon1/name not found
E WiredAccessoryManager: file /sys/devices/platform/soc/soc:qcom,msm-ext-disp/extcon/extcon0/name not found

veux: sepolicy: address radio.qcriNvOpt hwservice denial

veux: sepolicy: Allow user apps to read proc/zoneinfo files

* E nightwatch-target: /proc/zoneinfo open: errno=13
* E nightwatch-target: sysmeminfo parse failed

* avc: denied { read } for name="zoneinfo" dev="proc" ino=4026531859 scontext=u:r:untrusted_app:s0:c61,c257,c512,c768 tcontext=u:object_r:proc_zoneinfo:s0 tclass=file permissive=0 app=com.facebook.katana

veux: sepolicy: Fix Build errors

veux: sepolicy: Resolve qemu_hw_prop denial

avc: denied { read } for name="u:object_r:qemu_hw_prop:s0" dev="tmpfs" ino=1316 scontext=u:r:system_app:s0 tcontext=u:object_r:qemu_hw_prop:s0 tclass=file permissive=0

veux: sepolicy: Fix isolated_app denial

avc: denied { setattr } for comm="CrUtilityMain" name="commands.json" dev="mmcblk0p42" ino=1251111 scontext=u:r:isolated_app:s0:c512,c768 tcontext=u:object_r:app_data_file:s0:c153,c256,c512,c768 tclass=file permissive=0
avc: denied { setattr } for comm="CrUtilityMain" name="commands.json" dev="mmcblk0p42" ino=1251111 scontext=u:r:isolated_app:s0:c512,c768 tcontext=u:object_r:app_data_file:s0:c153,c256,c512,c768 tclass=file permissive=0
avc: denied { setattr } for comm="CrUtilityMain" name="f2" dev="mmcblk0p42" ino=1251128 scontext=u:r:isolated_app:s0:c512,c768 tcontext=u:object_r:app_data_file:s0:c153,c256,c512,c768 tclass=file permissive=0
avc: denied { setattr } for comm="CrUtilityMain" name="f2" dev="mmcblk0p42" ino=1251128 scontext=u:r:isolated_app:s0:c512,c768 tcontext=u:object_r:app_data_file:s0:c153,c256,c512,c768 tclass=file permissive=0

veux: Label some radio property
W libc    : Unable to set property "ro.vendor.ril.svlte1x" to "false": error code: 0xb
W libc    : Unable to set property "ro.vendor.ril.svdo" to "false": error code: 0xb

veux: prop: set some props and fix log
W libc    : Unable to set property "ro.telephony.call_ring.multiple" to "false": error code: 0xb
W libc    : Unable to set property "ro.vendor.ril.svlte1x" to "false": error code: 0xb
W libc    : Unable to set property "ro.vendor.ril.svdo" to "false": error code: 0xb

veux: sepolicy: fix some denials
* Rearranges sepolicy/vendor/genfs_contexts properly too

W libc    : Access denied finding property "ro.miui.singlesim"
W libc    : Access denied finding property "ro.product.marketname"
W libc    : Access denied finding property "ro.miui.ui.version.code"
W libc    : Access denied finding property "ro.hardware.chipname"
W libc    : Access denied finding property "ro.vendor.aware_available"
W libc    : Access denied finding property "ro.vendor.gfx.32bit.target"

W libc    : Access denied finding property 'wifi.interface'

W binder:2540_3: type=1400 audit: avc: denied { open } for path="/dev/__properties__/u:object_r:vendor_aware_available_prop:s0" dev="tmpfs" ino=1946 scontext=u:r:system_app:s0 tcontext=u:object_r:vendor_aware_available_prop:s0 tclass=file permissive=0

E android.system.suspend@1.0-service: Error opening kernel wakelock stats for: wakeup63 (../../devices/virtual/misc/msm_g711mlaw/wakeup63): Permission denied

E android.system.suspend@1.0-service: Error opening kernel wakelock stats for: wakeup58 (../../devices/virtual/misc/msm_amrwb/wakeup58): Permission denied

veux: sepolicy: Allow perf hal to read graphics composer
W/perf@2.2-servic(882): type=1400 audit(0.0:120396): avc: denied { search } for name="880" dev="proc" ino=394316 scontext=u:r:vendor_hal_perf_default:s0 tcontext=u:r:hal_graphics_composer_default:s0 tclass=dir permissive=0

veux: sepolicy: fix denial
avc: denied { read } for comm="e2fsck" name="sde26" dev="tmpfs" ino=15571 scontext=u:r:fsck:s0 tcontext=u:object_r:vendor_custom_ab_block_device:s0 tclass=blk_file permissive=0
avc: denied { read write } for comm="e2fsck" name="sde26" dev="tmpfs" ino=15571 scontext=u:r:fsck:s0 tcontext=u:object_r:vendor_custom_ab_block_device:s0 tclass=blk_file permissive=0

veux: sepolicy: Fix avc denials related to vendor/toolbox.te
avc: denied { kill } for comm="mkswap" capability=5 scontext=u:r🧰s0 tcontext=u:r🧰s0 tclass=capability permissive=0

veux: sepolicy: Resolve system_app denial

veux: sepolicy: KANG missing entries from sm8350-common

Signed-off-by: nnippon99 <adamayyad1999@hotmail.com>
Change-Id: Ica2495d4c2833b0c0509db802115ca720cc7511a
2023-07-05 02:59:01 +07:00
Tri Vo
ffa3258380 sm6375-common: sepolicy: Neverallow app open access to /dev/ashmem
- Fixes scroll lag in apps such as twitter etc.

Apps are no longer allowed open access to /dev/ashmem, unless they
target API level < Q.

Bug: 113362644
Test: device boots, Chrome, instant apps work
Signed-off-by: Ahmad Rulim <personal@rulim34.dev>
2023-06-30 20:18:49 +07:00
Michael Bestas
465da3b8b8 sm6375-common: sepolicy: Remove duplicate wakeup nodes
Needed after I026cd6930459262c31c401e57444cfe2b60357b7

Change-Id: I0522bafab2605b3d0ab5a147154b32fa9ee3ce37
Signed-off-by: Ahmad Rulim <personal@rulim34.dev>
2023-06-30 20:18:17 +07:00
Ahmad Rulim
038874ac3c sm6375-common: sepolicy: Move vendor property context to vendor folder
Also label and rename camera prop

Signed-off-by: Ahmad Rulim <personal@rulim34.dev>
2023-06-30 20:17:41 +07:00
Michael Bestas
b58a74ac4f sm6375-common: sepolicy: Fix fingerprint labels
Also incorporate fix from 839b9cd5a2 (commitcomment-99088748)

Change-Id: I66188247ce9268929763236c0ac2fa483273f1cc
Signed-off-by: Ahmad Rulim <personal@rulim34.dev>
2023-06-30 20:16:57 +07:00
Ramii Ahmed
5764745153 sm6375-common: sepolicy: Label goodix debug fingerprint properties
* W libc    : Access denied finding property "gf.debug.dump_talog_data"
* W fingerprint@2.3: type=1400 audit(0.0:689): avc: denied { read } for name="u:object_r:default_prop:s0" dev="tmpfs" ino=1797 scontext=u:r:hal_fingerprint_default:s0 tcontext=u:object_r:default_prop:s0 tclass=file permissive=0

Signed-off-by: Ahmad Rulim <personal@rulim34.dev>
2023-06-30 20:14:29 +07:00
Ahmad Rulim
bb6f15f04a sm6375-common: sepolicy: Label more camera props
* W libc    : Access denied finding property "ro.camera.res.fmq.size"
  W libc    : Unable to set property "vendor.camera.sensor.rearMain.fuseID" to "sunn001206141BC64DB800000000000000000000000000000000000000000000": error code: 0x18
  W libc    : Unable to set property "vendor.camera.sensor.rearMain.fuseSnID" to "": error code: 0x18
  W libc    : Unable to set property "vendor.camera.sensor.frontMain.fuseID" to "sunn00321F160A011A1E0F1C0404080001252B81000000000000000000000000": error code: 0x18
  W libc    : Unable to set property "vendor.camera.sensor.frontMain.fuseSnID" to "": error code: 0x18
  W libc    : Unable to set property "vendor.camera.sensor.rearMacro.fuseID" to "ofil00220F1A4230373235394130000000000000000000000000000000000000": error code: 0x18
  W libc    : Unable to set property "vendor.camera.sensor.rearMacro.fuseSnID" to "": error code: 0x18
  W libc    : Unable to set property "vendor.camera.sensor.rearUltra.fuseID" to "aaca002217203553320202110E0B620000000000000000000000000000000000": error code: 0x18
  W libc    : Unable to set property "vendor.camera.sensor.rearUltra.fuseSnID" to "": error code: 0x18
  W provider@2.4-se: type=1400 audit(0.0:153): avc: denied { read } for name="u:object_r:default_prop:s0" dev="tmpfs" ino=11118 scontext=u:r:hal_camera_default:s0 tcontext=u:object_r:default_prop:s0 tclass=file permissive=0
  W /system/bin/init: type=1107 audit(0.0:144): uid=0 auid=4294967295 ses=4294967295 subj=u:r:init:s0 msg='avc: denied { set } for property=vendor.camera.sensor.rearMain.fuseID pid=9788 uid=1047 gid=1005 scontext=u:r:hal_camera_default:s0 tcontext=u:object_r:vendor_default_prop:s0 tclass=property_service permissive=0'
  W /system/bin/init: type=1107 audit(0.0:145): uid=0 auid=4294967295 ses=4294967295 subj=u:r:init:s0 msg='avc: denied { set } for property=vendor.camera.sensor.rearMain.fuseSnID pid=9788 uid=1047 gid=1005 scontext=u:r:hal_camera_default:s0 tcontext=u:object_r:vendor_default_prop:s0 tclass=property_service permissive=0'
  W /system/bin/init: type=1107 audit(0.0:146): uid=0 auid=4294967295 ses=4294967295 subj=u:r:init:s0 msg='avc: denied { set } for property=vendor.camera.sensor.frontMain.fuseID pid=9788 uid=1047 gid=1005 scontext=u:r:hal_camera_default:s0 tcontext=u:object_r:vendor_default_prop:s0 tclass=property_service permissive=0'
  W /system/bin/init: type=1107 audit(0.0:147): uid=0 auid=4294967295 ses=4294967295 subj=u:r:init:s0 msg='avc: denied { set } for property=vendor.camera.sensor.frontMain.fuseSnID pid=9788 uid=1047 gid=1005 scontext=u:r:hal_camera_default:s0 tcontext=u:object_r:vendor_default_prop:s0 tclass=property_service permissive=0'
  W /system/bin/init: type=1107 audit(0.0:148): uid=0 auid=4294967295 ses=4294967295 subj=u:r:init:s0 msg='avc: denied { set } for property=vendor.camera.sensor.rearMacro.fuseID pid=9788 uid=1047 gid=1005 scontext=u:r:hal_camera_default:s0 tcontext=u:object_r:vendor_default_prop:s0 tclass=property_service permissive=0'

Signed-off-by: Ahmad Rulim <personal@rulim34.dev>
2023-06-30 20:13:58 +07:00
Arian
b6fe0414f1 sm6375-common: sepolicy: Allow camera hal to read mnt_vendor_file
This is necessary to find the dualcamera calibration in persist

Change-Id: I89d5d7839e13aeb2f5373b8bdc2e03830407cfb0
Signed-off-by: Ahmad Rulim <personal@rulim34.dev>
2023-06-30 20:13:24 +07:00
Ahmad Rulim
1c21542d64 sm6375-common: sepolicy: Label soc:fpc1020/wakeup_enable
* W fingerprint@2.3: type=1400 audit(0.0:159): avc: denied { write } for name="wakeup_enable" dev="sysfs" ino=46603 scontext=u:r:hal_fingerprint_default:s0 tcontext=u:object_r:sysfs_wakeup:s0 tclass=file permissive=0

Signed-off-by: Ahmad Rulim <personal@rulim34.dev>
2023-06-30 20:12:55 +07:00
Ahmad Rulim
33d14449b7 sm6375-common: Reformat sepolicy file
Signed-off-by: Ahmad Rulim <personal@rulim34.dev>
Change-Id: I863a8276214eb7c3060572ee3f0cfddcbf1e90e8
2023-06-30 17:49:14 +07:00
Kevin F. Haggerty
8c3313fca4 sm6375-common: sepolicy: Allow system_app to read /proc/pagetypeinfo
avc: denied { read } for name="pagetypeinfo" dev="proc" ino=4026543033
scontext=u:r:system_app:s0 tcontext=u:object_r:proc_pagetypeinfo:s0
tclass=file permissive=0

Change-Id: I16465eb9acca9ff64a755d47f86f4ff424ebe4de
2023-06-30 17:39:00 +07:00
UtsavBalar1231
be3cd0ee39 sm6375-common: sepolicy: Grant perms to mount tracefs when CONFIG_DEBUG_FS
avc:  denied  { mounton } for  pid=1 comm="init" path="/sys/kernel/tracing"
dev="tracefs" ino=1 scontext=u:r:init:s0 tcontext=u:object_r:debugfs_tracing_debug:s0 tclass=dir permissive=0

Change-Id: Ia71539ff4b622d5130f2051e8ae490f3b7a4722b
2023-06-30 17:37:45 +07:00
kleidione Freitas
a14c8f3254 sm6375-common: sepolicy: Add more genfs contexts label
Signed-off-by: kleidione <kleidione@gmail.com>
2023-06-30 17:35:37 +07:00
UtsavBalar1231
b5fd59e349 sm6375-common: sepolicy: Allow init to write discard_max_bytes on /data partition
Change-Id: I90195164a4842857bbb94833d94a108010fe8703
2023-06-30 17:35:10 +07:00
UtsavBalar1231
19023e1884 sm6375-common: sepolicy: Allow setting read_ahead_kb on /data partition
Change-Id: I905cab4f3991a3f33b21426e2ec4f20562665aee
2023-06-30 17:34:08 +07:00
kleidione Freitas
85f54c659f sm6375-common: sepolicy: Add more sepolicy rule for hal default sensor
- [ 7206.619148] type=1400 audit(1666291831.667:316): avc: denied { ioctl } for comm="sensors@2.1-ser" path="socket:[441443]" dev="sockfs" ino=441443 ioctlcmd=0xc502 scontext=u:r:hal_sensors_default:s0 tcontext=u:r:hal_sensors_default:s0 tclass=qipcrtr_socket permissive=0

Signed-off-by: kleidione <kleidione@gmail.com>
2023-06-30 17:32:35 +07:00
kleidione Freitas
cfd18872f3 sm6375-common: sepolicy: Label more sysfs wakeup nodes
Signed-off-by: kleidione <kleidione@gmail.com>
Change-Id: I852c384d872051bc34def484caafbcbb258e6609
2023-06-30 17:31:15 +07:00
daniml3
8dfc22528b sm6375-common: sepolicy: Silence system_suspend denials
Change-Id: I71ae8fbdbdb9101298e82de47aace1af72db8c55
2023-06-30 17:27:36 +07:00
Ivan Vecera
5edcc73369 sm6375-common: sepolicy: Allow system_app to access zram sysfs nodes
04-22 09:15:37.459 19569 19569 I auditd  : type=1400 audit(0.0:570): avc: denied { search } for comm="pool-2-thread-1" name="zram0" dev="sysfs" ino=48559 scontext=u:r:system_app:s0 tcontext=u:object_r:sysfs_zram:s0 tclass=dir permissive=0
04-22 09:15:37.459 19569 19569 I auditd  : type=1400 audit(0.0:571): avc: denied { search } for comm="pool-2-thread-1" name="zram0" dev="sysfs" ino=48559 scontext=u:r:system_app:s0 tcontext=u:object_r:sysfs_zram:s0 tclass=dir permissive=0

Change-Id: Ib8ec06a46239cb6cd8739e888a9abdb88b753b77
2023-06-30 17:26:35 +07:00
Albert I
e71788e025 sm6375-common: sepolicy: Allow apps and camera HAL access to secure ADSP domain
Signed-off-by: Albert I <kras@raphielgang.org>
Change-Id: Ibb1071299632ab53726638dbcc134d4bca59fc52
2022-09-04 23:18:43 +00:00
Albert I
664ba17574 sm6375-common: sepolicy: Allow neural networks HAL to read ADSP properties
Signed-off-by: Albert I <kras@raphielgang.org>
Change-Id: I3fa6f51b746703bab2faf3f5fd6334b221a8636c
Signed-off-by: kleidione <kleidione@gmail.com>
2022-09-04 23:18:35 +00:00
dianlujitao
3f8897df42 sm6375-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
2022-09-04 23:18:08 +00:00
Sebastiano Barezzi
c8e4b762f2 sm6375-common: sepolicy: Don't grant system_server access to fingerprint props
Change-Id: I4f391e43a80c25d7fcedde12a70b3215913fcfd2
2022-09-04 13:00:34 +00:00
Sebastiano Barezzi
ac323ab8e7 sm6375-common: sepolicy: Label fingerprint props as restricted vendor
* System only reads them, but never sets them
* Rename to vendor_fingerprint_prop while at it

Change-Id: Id980731ec53338c5c5a07b81f10a283c428d17aa
2022-09-04 13:00:34 +00:00
Ramii Ahmed
b20ca537ae sm6375-common: sepolicy: switch to lineage hal macros for mlipay attribute definition
Change-Id: Ib6bc419b456f7d4d4277eb882e93e03bfff6d020
2022-09-04 13:00:33 +00:00
Ramii Ahmed
9764d3d544 sm6375-common: add missing mlipay sepolicy from Xiaomi-SM8250 tree
up to HEAD:e2aab9679fea15a8ee0bbf5876bbeb140292e29c

Change-Id: Ic68fb82a72954d8eb94314e79733ac71fbaec221
2022-09-04 13:00:32 +00:00
chaptsand
030ba3085f sm6375-common: sepolicy: Allow platform app to find SoterService
* Fix selinux denied of WeChat fingerprint payment

- E SELinux : avc:  denied  { find } for interface=vendor.qti.hardware.soter::ISoter sid=u:r:platform_app:s0:c512,c768 pid=3613 scontext=u:r:platform_app:s0:c512,c768 tcontext=u:object_r:vendor_hal_soter_hwservice:s0 tclass=hwservice_manager permissive=0

Issue: https://gitlab.com/LineageOS/issues/android/-/issues/4701

Change-Id: I3176f8e709fb31aec16a31094b78f753d1d16b43
2022-09-04 13:00:31 +00:00
Sebastiano Barezzi
59a0c45f72 sm6375-common: Move to common Xiaomi fingerprint HIDL
Change-Id: I6c29a831e985ee440c92a98aad8d33f25b9e5b2d
2022-09-04 13:00:30 +00:00
Edwin Moquete
6a4288e605 sm6375-common: Set TARGET_TAP_TO_WAKE_NODE
Change-Id: I971349c0aaf6b11231ce79cd3260dd758bd88a2b
2022-09-04 13:00:05 +00:00
Albert I
4cd824325b sm6375-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
2022-09-04 12:59:52 +00:00
Erfan Abdi
ac20091f7d sm6375-common: sepolicy: Add mlipay rules
Change-Id: I1023e481d49ed5ec0ae15a513c65133987d6f556
2022-09-04 12:59:44 +00:00
Ramii Ahmed
4abebb1669 sm6375-common: initial SEPolicy
Co-authored-by: Cosmin Tanislav <demonsingur@gmail.com>
Co-authored-by: Arian <arian.kulmer@web.de>
Co-authored-by: ItsVixano <giovanniricca@protonmail.com>
Change-Id: I2ab2e0b5981ec8044c22caa3ff41ba094ccadf38
2022-09-04 12:59:40 +00:00
Ramii Ahmed
956f4d6883 sm6375-common: Adjust Biometrics HIDL for Xiaomi SM6375
* rename all manifest, init & relative files
* adjust chown's & chmod's to fit holi's fingerprint devices

Change-Id: I409847c845620555b8a9b7035682c2f88f8a60a7
2022-09-04 12:59:28 +00:00
Ramii Ahmed
c819742d8c sm6375-common: Import Biometrics HIDL from Xiaomi SM8250
Change-Id: I6a49ac55c29f3ad688f2c6af494a89bda9e809b3
2022-09-04 12:59:27 +00:00
Sebastiano Barezzi
1beb846064 sm6375-common: vibrator: Rebrand to Xiaomi SM6375
Change-Id: Icd0ec7c857574caec085751253fafa39be065d0d
2022-09-04 12:59:00 +00:00
Cosmin Tanislav
77dbd558d5 sm6375-common: sensors: avoid target name conflicts
Change-Id: I32c403cf814c8ebf717ac1b06c25a5b3b65139a8
2022-09-04 12:58:56 +00:00