Commit Graph

481 Commits

Author SHA1 Message Date
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
boedhack99
d9487373a1 Revert "sm6375-common: extract-files: allow extracting proprietary-files for recovery"
This reverts commit 62eb368550.
2023-06-30 10:37:02 +07:00
boedhack99
aed8a50d6a sm6375-common: blobs: Pinned neuralnetworks from veux
Change-Id: I942dfe55105f959d75d3f32c89a4101f0e6225bd
2023-06-29 23:21:32 +07:00
luk1337
e132db8488 sm6375-common: Add script to update sha1sums of kanged blobs
Squash of:
* Add script to update sha1sums of kanged blobs
* Handle moved blobs in update-sha1sums.py script
* Add unpinning support to update-sha1sums.py script
* Format update-sha1sums.py with yapf
* Better handle line breaks
* Handle line with opts

Signed-off-by: LuK1337 <priv.luk@gmail.com>
Change-Id: Ia5c2a7fcdd6e8472f43b2b2d2f4aa2a0de81b188
2023-06-29 23:18:00 +07:00
boedhack99
999faf7a82 sm6375-common: Update blobs to moonstone MIUI V14.0.3.0.TMPMIXM release-keys
Change-Id: I73698d84baa4949f069a32a19c0098f092a04e06
2023-06-29 23:13:19 +07:00
Georg Veichtlbauer
de42cceb20 sm6375-common: blobs: Remove aptX(HD) encoder shared libs
Encoder shared libraries are no longer required as of Android 13 QPR2.

Change-Id: I893a9000070cb2582ada0af91547f5176e6fea84
Signed-off-by: Henrique Pereira <hlcpereira@outlook.com.br>
2023-06-29 23:13:09 +07:00
boedhack99
169182efab sm6375-common: blobs: Remove prefix for system
Change-Id: I6f55861c855c8167a23d477c5ef08dc7188a9c04
2023-06-28 21:57:44 +07:00
Jiakai Zhang
072bbd162d sm6375-common: Add a system property for System UI compiler filter.
Bug: 227310505
Test: m
Change-Id: I36d6e67e376b723f9ea11f1f5e4400d0a63fcd7a
Signed-off-by: Ahmad Rulim <personal@rulim34.dev>
2023-06-28 09:07:39 +07:00
Pullakavi Srinivas
86d40642f1 sm6375-common: props: Disable SF composition prediction model on 5.4 and lower
CRs-Fixed: 3243885
Change-Id: I64f82a25768b561bb343fdb7686b7d6c020d024a
Signed-off-by: Ahmad Rulim <personal@rulim34.dev>
2023-06-28 09:07:27 +07:00
SamarV-121
9d787599f0 sm6375-common: Disable continuous transaction tracing on all build types
Change-Id: I5b2d3ba03208925f40fd65d6615d027f6c7b3320
Signed-off-by: DarkJoker360 <simoespo159@gmail.com>
Signed-off-by: clarencelol <clarencekuiek@icloud.com>
Signed-off-by: Ahmad Rulim <personal@rulim34.dev>
2023-06-28 09:07:19 +07:00
Artem Borisov
9d0b8935da sm6375-common: props: Disable triple buffering
* Historically, triple buffering was used to workaround missed VSYNC
  in GPU composition usecases on devices with high resolution panels.
  As a downside, an additional frame buffer increased input latency.
  Nowadays, most GPUs are fast enough to fit the VSYNC period, rendering
  triple framebuffers useless.

Signed-off-by: popoA3M <pratyayaborborah@gmail.com>
Signed-off-by: Ahmad Rulim <personal@rulim34.dev>
Change-Id: Ic750f5b670f775cad45d8035cae19da4bf59e0f6
2023-06-28 09:07:11 +07:00
XSJoJo
6f19eae81c sm6375-common: Disable sdm rotator downscaler
Rotator down scaler is causing additional delays that are better
handled by GL composition.

Test: Open app, no jank
Bug: 73640835
Signed-off-by: Ahmad Rulim <personal@rulim34.dev>
Change-Id: Ife8227a7f240aaf9c0adc5b6fc7f1a6112a62c85
2023-06-28 09:07:02 +07:00
mvaisakh
2db9beefcc sm6375-common: props: Use HintManager for HWUI
This will send HWUI timings to HintManager for better CPU scheduling.
Setting a 30% margin for CPU should heavily reduce CPU loads for HWUI and
use GPU for the rest.

Signed-off-by: Ahmad Rulim <personal@rulim34.dev>
Change-Id: I1013146a4ffc5ad71a05c1f88dead6cbc319b3a3
2023-06-28 09:06:53 +07:00
Michael Bestas
3dafaab87d sm6375-common: props: Enable aptX(HD) offload
As of Android 13 QPR2, AOSP Bluetooth APEX supports aptX/aptX HD out of
the box with no way to disable it, so we might as well support offload.

Change-Id: I04d3f0c10c767c42a94fdf80b3bd6ff96923f276
Signed-off-by: Ahmad Rulim <personal@rulim34.dev>
2023-06-28 09:06:41 +07:00
Edwin Moquete
1000a850a8 sm6375-common: props: Remove unused persist.bluetooth.a2dp_offload.cap property
This prop has no effect as of T QPR1.

See: cf25e33147

Change-Id: Ic762812dd59429d344ccc55c01bf96b0ffd6dbab
Signed-off-by: Ahmad Rulim <personal@rulim34.dev>
2023-06-28 09:06:32 +07:00
David Sehr
2ba5c28817 sm6375-common: props: Use dex2oat64
Enable dex2oat64 usage on device

Bug: 153380900
Test: boot and install an application.
Change-Id: Ifff726eb2f8bd315a42c02bdca9ff10cf027a06c
Signed-off-by: Ahmad Rulim <personal@rulim34.dev>
2023-06-28 09:06:06 +07:00
Ahmad Rulim
250fe83eb3 sm6375-common: Fix bluetooth power config on props
* Also remove the leftover config from overlay

Signed-off-by: Ahmad Rulim <personal@rulim34.dev>
Change-Id: Ie45534295809edf55def61efe0c0f0b9b899c36c
2023-06-27 21:15:20 +07:00
Omkar Chandorkar
88cbb7dbff sm6375-common: props: Optimize package manager dexopt properties
* first-boot is set to quicken to reduce first boot times
* we are installing with speed-profile to have balance
  between time taken to optimise and runtime performance
* once device is in idle+charging, bg dexopt will compile
  for maximum runtime performance

[ghostrider-reborn]
2023-06-27 21:11:21 +07:00
baalajimaestro
b733ab1915 sm6375-common: props: Optimise dex flags
This is a squash of the following commits:
1. Optimise dex flags for a faster boot

* Used multiple threads and speed profile to hasten the first boot

Signed-off-by: baalajimaestro <me@baalajimaestro.me>
Change-Id: I2cce5ddf7d50308511e81436fcac613b2c6537bf

2. Rework dex flags again

When I went through https://source.android.com/devices/tech/dalvik/configure my previous configs felt wrong, this one should be perfect (I hope).
Even though there is a slight trade-off for boot time by using the speed profile, we do make up for it by using 8 threads.
PRODUCT_DEX_PREOPT_DEFAULT_COMPILER_FILTER attempts to compile all prebuilts fully optimised to speed level, thus the phone doesnt need to deal with it.
I also do know that this might be a trade-off on size, but I do see the first boot time is more worthy to trade-off.
The speed level mentioned here runs dex verification and compiles all AOT methods.

Signed-off-by: baalajimaestro <me@baalajimaestro.me>
Signed-off-by: Omkar Chandorkar <gotenksIN@aosip.dev>
Change-Id: Ic0156ff8956a7c5f53820be6db438f6f6399d3c0

3. Switch certain dexopt profiles to verify

Prebuilt apps like Gmail/Google App, will be updated by google play, and there is no need spend time and space optimising what is going to be replaced.
Switch to Google's recommendation of using verify for an OTA package.
Applications still stay on speed.
Instead, replace the install profile with speed-profile making apps perform better.

Signed-off-by: baalajimaestro <me@baalajimaestro.me>

Change-Id: I2cce5ddf7d50308511e81436fcac613b2c6537bf
2023-06-27 21:10:49 +07:00
Alexander Koskovich
49165fdb0f sm6375-common: props: Drop radio properties that are already default 2023-06-27 21:09:18 +07:00
Juhyung Park
ef73c11fa4 sm6375-common: props: Drop perf pre-rendering feature
* ref: P-404/android_device_qcom_common@87fc9c5

This causes weird inconsistent scrolling behaviors, even on v5.4

Change-Id: I1025014bb31aae15c79579c31cd134c35c2d527f
2023-06-27 21:07:11 +07:00
madmax7896
b0af1f9053 sm6375-common: Set corrert soc manufacturer props
Signed-off-by: kleidione <kleidione@gmail.com>
2023-06-27 21:04:11 +07:00
kubersharma001
5e4750a7fc sm6375-common: Import wcg_composition_dataspace from MIUI
-  Its set in default.prop

Change-Id: I8d94738978b3ef3f146a938a592500437bfc1b00
2023-06-27 21:01:38 +07:00
ririxidev
9334afadf4 sm6375-common: wifi: Switch gEnablePowerSaveOffload to 5
This should improve VoIP calls performance.
Reference: https://android.googlesource.com/device/google/marlin/+/android-7.1.0_r4%5E%21/

Change-Id: Id947f330d516f507b8eff543ffb154e90e1206a2
Signed-off-by: Ahmad Rulim <personal@rulim34.dev>
2023-06-27 20:48:54 +07:00
TheCrazyLex
b820ea37f7 sm6375-common: wifi: Smarter decisions on whether to use 2/5Ghz AP
* Implement a smarter system on whether to connect to the provided 2Ghz or 5Ghz network.

Change-Id: I4f8363c712d07c64b2bad25538474003a56976b3
Signed-off-by: Ahmad Rulim <personal@rulim34.dev>
2023-06-27 20:48:28 +07:00
Abhinav Kumar
6f3c3d2b93 sm6375-common: wifi: Remove entry for gEnableNUDTracking
Currently Min, Max and default values of gEnableNUDTracking in
code are:
Min: 0 (Driver will not track the NUD failures, and ignore the same)
Max: 2 (Driver will track the NUD failures and if honoured will roam
	away from the connected BSSID to a new BSSID to retain the
	data connectivity).
Default: 2

In order to enable NUD tracking after NUD failure by default,
remove entry for gEnableNUDTracking from ini file.

Change-Id: Ie8ed6d12f373891d11727b1f903825a7fc145750
CRs-Fixed: 2559325
Signed-off-by: Ahmad Rulim <personal@rulim34.dev>
2023-06-27 20:47:56 +07:00
kerneltoast
82809aa069 sm6375-common: wifi: Relax WiFi re-association RSSI thresholds
Signed-off-by: DarkAngelGR <asavvo01@gmail.com>
Change-Id: I90e02a27c54230c6b316aca75ce34c8c621a76e5
Signed-off-by: Ahmad Rulim <personal@rulim34.dev>
2023-06-27 20:47:22 +07:00
Luk1337
e35dffe666 sm6375-common: wifi: Disable RX wakelock feature
Signed-off-by: DarkAngelGR <asavvo01@gmail.com>
Change-Id: I9f9327905007f91cd9c39c589b723609f595b9e5
Signed-off-by: Ahmad Rulim <personal@rulim34.dev>
2023-06-27 20:46:53 +07:00
TheCrazyLex
889a772048 sm6375-common: wifi: Enable QPower and Deep sleep at the same time
* This enables Deep Sleep mode, additionally to QPower
* With this configuration, QPower manages the new Deep sleep mode
 -> Leads to amazing power savings

Signed-off-by: DarkAngelGR <asavvo01@gmail.com>
Change-Id: Ie7b8bec94da2707e5ae507682169d0ad26b99163
Signed-off-by: Ahmad Rulim <personal@rulim34.dev>
2023-06-27 20:46:21 +07:00
Roshan Pius
f3eeeaf45e sm6375-common: wifi: Increase max bss count
QCOM's driver can support a max of 512 scan results. Ensure that
wpa_supplicant is in sync with that number.

Bug: 74724482
Test: Device boots up and connects to wifi networks.

Signed-off-by: xNombre <kartapolska@gmail.com>
Signed-off-by: Marco Zanin <mrczn.bb@gmail.com>
Change-Id: I7cc7f0f604a0a16036080256e672d0b3127840bc
Signed-off-by: Ahmad Rulim <personal@rulim34.dev>
2023-06-27 20:45:53 +07:00
Ecco Park
c91f04ca90 sm6375-common: wifi: Add parameters for Hotspot 2.0
Those parameters need to set for Hotspot 2.0 network

interworking=1 : Enable Interworking
hs20=1: Enable Hotspot 2.0
auto_interworking=0 : Do not automatically go through Interworking
                      network selection in wpa_supplicant
Bug: 118633353
Test: live test with Passpoint AP
Signed-off-by: Ecco Park <eccopark@google.com>

Change-Id: I04e77be3d008d012690d4f4185a4c80d9b660df2
Signed-off-by: PainKiller3 <ninadpatil100@gmail.com>
Signed-off-by: Ahmad Rulim <personal@rulim34.dev>
2023-06-27 20:45:20 +07:00
PainKiller3
f99ef70cc1 sm6375-common: wifi: No BSS flush for 2018 devices
Bug: 73301881
Test: Verify that the connected MAC randomization ~3 seconds delay problem is gone

Change-Id: I73dbeb9e9d0e740883c81384f3fee9b074292cd2
Signed-off-by: PainKiller3 <ninadpatil100@gmail.com>
Signed-off-by: Ahmad Rulim <personal@rulim34.dev>
2023-06-27 20:44:46 +07:00
boedhack99
fad8458572 sm6375-common: Decommonize init device-specifics scripts
* we got different configs

Change-Id: Ibd7715bc72d7575afec209cdb962d9cebebec37a
2023-06-27 13:45:56 +07:00