Commit graph

147 commits

Author SHA1 Message Date
pix106
58bbd5db55 sdm660-common: sepolicy: Label sysfs wakeup nodes
avc: denied { read } for comm="Binder:514_1" name="event_count" dev="sysfs" ino=53144 scontext=u:r:system_suspend:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0
avc: denied { read } for comm="Binder:514_1" name="max_time_ms" dev="sysfs" ino=53149 scontext=u:r:system_suspend:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0
avc: denied { read } for comm="Binder:514_1" name="wakeup_count" dev="sysfs" ino=53145 scontext=u:r:system_suspend:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0
avc: denied { read } for comm="Binder:514_1" name="total_time_ms" dev="sysfs" ino=53148 scontext=u:r:system_suspend:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0
avc: denied { read } for comm="Binder:514_1" name="expire_count" dev="sysfs" ino=53146 scontext=u:r:system_suspend:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0
avc: denied { read } for comm="Binder:514_1" name="active_count" dev="sysfs" ino=53143 scontext=u:r:system_suspend:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0
avc: denied { read } for comm="Binder:514_1" name="last_change_ms" dev="sysfs" ino=53150 scontext=u:r:system_suspend:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0
avc: denied { read } for comm="Binder:514_1" name="prevent_suspend_time_ms" dev="sysfs" ino=53151 scontext=u:r:system_suspend:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0
avc: denied { read } for comm="Binder:514_1" name="name" dev="sysfs" ino=53142 scontext=u:r:system_suspend:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0
avc: denied { read } for comm="Binder:514_1" name="active_time_ms" dev="sysfs" ino=53147 scontext=u:r:system_suspend:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0

Signed-off-by: pix106 <sbordenave@gmail.com>
2021-11-13 11:31:51 +01:00
pix106
5de9bdae50 Revert "sdm660-common: sepolicy: Adjust sepolicy for qti thermal"
This reverts commit 77c4792ac9.
2021-11-13 11:31:51 +01:00
pix106
9d53e14cc8 sdm660-common: sepolicy: Remove netmgrd set_prop vendor_data_ko_prop
* No need after sepolicy update from LA.UM.9.2.1.r1-07200-sdm660.0

Signed-off-by: pix106 <sbordenave@gmail.com>
2021-11-13 11:31:51 +01:00
Anush02198
6d46319a55 sdm660-common: sepolicy: Remove some wakeup nodes
* As we have merged LA.UM.9.2.1.r1-07000-sdm660.0 sepolicy tag to source this is handeld by source

Signed-off-by: Anush02198 <Anush.4376@gmail.com>
Signed-off-by: pix106 <sbordenave@gmail.com>
2021-11-13 11:31:51 +01:00
raiyanbinmohsin
d995aabb68 Revert "sdm660-common: Awaken-ify"
This reverts commit 635c08ae00.

* also drop awaken ota sepolicy
2021-11-13 11:31:51 +01:00
Sebastiano Barezzi
fa7fa65ffb sdm660-common: ir: Rebrand to Xiaomi SDM660
Change-Id: I20146c0bc065a460f5a86455ed9a21abce5f9417
Signed-off-by: clarencelol <clarencekuiek@icloud.com>
Signed-off-by: OdSazib <odsazib@gmail.com>
2021-11-13 11:31:51 +01:00
ghostrider-reborn
79c64bc007 sdm660-common: Introduce kernelspace battery saver
* Needs Kernel side support
 * This activates kernelspace battery saver via powerhal whenever
   battery saver is enabled in userspace, thereby lowering power
   consumption at kernel-level by disabling boosts and such

Signed-off-by: clarencelol <clarencekuiek@icloud.com>
Change-Id: I2623503db27d7518de519bcaa3f5af6ab83879d0
2021-11-13 11:31:49 +01:00
OdSazib
b8c814713d
sdm660-common: DeviceSettings: Add earpiece gain
- Requires kernel support

Signed-off-by: OdSazib <odsazib@gmail.com>
Change-Id: If28b4dff421cbba5f17cd2ccfab02f2aa616a9f8
2021-07-22 13:21:03 +06:00
OdSazib
5351cc35f9
sdm66-common: sepolicy: Fix labeling sysfs nodes for K4.19
- Address more denials and label some new nodes

Signed-off-by: OdSazib <odsazib@gmail.com>
2021-07-16 15:56:07 +06:00
StyloGey
4ec9f92ace
sdm660-common: Update RIL from AOSPA
- update radio from LA.UM.9.12.r1-10800-SMxx50.0
- update telephony from qcom-common-AOSPA

Signed-off-by: OdSazib <odsazib@gmail.com>
2021-07-15 17:00:40 +06:00
OdSazib
0a263a5716
sdm660-common: sepolicy: Update sepolicy for 4.19 2021-07-13 11:56:43 +06:00
clarencelol
20efaf472b
sdm660-common: Switch to Thermal 2.0 mock
* QTI Thermal couldn't read the temperature for some reason
2021-06-15 21:48:17 +06:00
sairam1411
77c4792ac9
sdm660-common: sepolicy: Adjust sepolicy for qti thermal
Change-Id: Ib8493f164f12614e6d0a7ea5bd060d05991822b8
2021-06-15 17:32:47 +06:00
Wilson Chan
2880603f27
sdm660-common: power-libperfmgr: Add Flipendo powerhint
- Add sepolicy for dex2oat powerhal props to vendor_power_prop

Test: boot and check powerhint parse logs
Test: enabled extreme battery saver and check scaling_max_freq

[clarencelol]: Adapt to sdm660 freq
2021-06-15 17:32:47 +06:00
clarencelol
5ae45246d0
sdm660-common: power-libperfmgr: Add back audio hints
* It works as intended

Signed-off-by: clarencelol <clarencekuiek@icloud.com>
2021-06-15 17:32:47 +06:00
clarencelol
7b3df1cb47
sdm660-common: sepolicy: Label wakeup nodes for 4.19
- also resolve arbitrary sysfs paths for system_suspend
2021-06-07 09:21:11 +06:00
Quallenauge
f9d71135ea
sdm660-common: sepolicy: Add swapper to kill
Fixes:
W swapper/6: type=1400 audit(0.0:63): avc: denied { kill } for capability=5 scontext=u:r:kernel:s0 tcontext=u:r:kernel:s0 tclass=capability permissive=0

Change-Id: Ib3b5c2a173528cb9f63a4dd750634968c060f471
2021-06-07 09:21:11 +06:00
Subhajeet Muhuri
1da7c15388
sdm660-common: /sys/devices/soc -> /sys/devices/platform/soc
Signed-off-by: Subhajeet Muhuri <subhajeet.muhuri@aosip.dev>
2021-06-07 09:21:11 +06:00
OdSazib
478a2b33b6
sdm660-common: sepolicy: Rework sepolicy (No more neverallow)
- Thanks to LineageOS and our sdm660 community

Change-Id: I54c7d76260041b7c383428449e149aa35d51de9b3c
2021-05-18 05:03:51 +06:00
OdSazib
ef00e5f20b
sdm660-common: DeviceSettings: Import in-app Dirac
- Improve code with reference and split gain category

This reverts commits
- 471da74
- de7135d
- f6c011d

All credit goes to Stylog, this is just revert commits with few improvement

Co-authored-by: clarencelol <clarencekuiek@icloud.com>
2021-04-10 02:24:09 +06:00
Sebastiano Barezzi
973fa8d111
sdm660-common: Fix some camera denials
Change-Id: I172349433946883aa1035e91ab3ab703a96e7912
2021-04-04 12:35:05 +06:00
OdSazib
6166317281
sdm660-common: Build power stats and label it 2021-03-15 12:21:09 +06:00
Subhajeet Muhuri
7c3beb85c9
sdm660-common: power-libperfmgr: Switch to AIDL Power HAL
hardware/google/pixel/power-libperfmgr from android-11.0.0_r25

SQUASHED:
Revert all HIDL interface and nuke previous changes
Import Pixel libperfmgr AIDL Power HAL
Adapt and rebrand for xiaomi_sdm660
Remove Google-specific display LPM control
Remove Google-specific camera and audio hints
Remove VR hints handling
Remove audio hints handling
Remove dumpstate support
Initialize powerHAL when boot is completed
Add support for tap-to-wake feature control
Add sepolicy rules for power-libperfmgr
Enable power-libperfmgr

Signed-off-by: Subhajeet Muhuri <subhajeet.muhuri@aosip.dev>
2021-03-10 12:37:27 +06:00
orgesified
373e2fc7e2
sdm660-common: sepolicy: Silence logspam
Co-authored-by: Jarl-Penguin <jarlpenguin@outlook.com>
Change-Id: Iea2d0ec097c4e33a038ce05fba801364c2e8a381
2021-03-07 01:51:46 +06:00
Jeferson
2632c4a4b8
sdm660-common: sepolicy: Adress system_server denials
Change-Id: I7ec0ccc4004a7cf74988e7994ec981e064ba0412
2021-03-07 01:49:33 +06:00
PIPIPIG233666
206f51bad0
sm660-common: Create socket for /dev/socket/audio_hw_socket
Change-Id: If4c5b944efb8dde3093ccb7b8f1dca746a02e043
2021-03-02 23:43:22 +06:00
Bruno Martins
a5de89d28b
sdm660-common: sepolicy: Add rules for older IMS blobs
Since Android 10 blobs are being used, org.codeaurora.ims still runs
as phone UID as seen by these denials:

  m.android.phone: type=1400 audit(0.0:2914): avc: denied { read } for name="u:object_r:qcom_ims_prop:s0" dev="tmpfs" ino=13660 scontext=u:r:radio:s0 tcontext=u:object_r:qcom_ims_prop:s0 tclass=file permissive=0
  m.android.phone: type=1400 audit(0.0:473): avc: denied { call } for scontext=u:r:radio:s0 tcontext=u:r:hal_imsrtp:s0 tclass=binder permissive=0

Change-Id: Ic8c1b7996b9e0e7b63ba2a153441c9e8467a8a31
Signed-off-by: clarencelol <clarencekuiek@icloud.com>
2021-02-20 11:55:48 +06:00
Subhajeet Muhuri
7d8fc30985
sdm660-common: Kang more pixel power HAL sepolicy
* Kanged from mata (with all available nodes on msm4.4)
2021-02-20 11:55:25 +06:00
OdSazib
1edf16f04c
sdm660-common: apex: Symlink metadata to existing sessions
* Better we do this instead of creating extra dir
2021-02-16 18:50:35 +06:00
Chenyang Zhong
851d88070e
sdm660-common: create and symlink a dummy /metadata/apex
Google moved apex sessions directory from /data/apex/sessions to
/metadata/apex/sessions after commit:

"Move apex sessions directory to /metadata"
36cf4bbac6

Devices with a mounted metadata partition will have the needed
directories set up by system/core/rootdir/init.rc. Xiaomi devices
on sm6125 do not have a metadata partition out of the box, so things
like "Google Play system update" will fail to install the update.

Therefore, create a dummy directory under /data/vendor/metadata_apex
and symlink it to /metadata/apex.

The reason why the old /data/apex/sessions directory is not used
for the symlink is that apexd will call migrateSessionsDirIfNeeded()
to recursively copy things from the old directory to the new one.
Creating the symlink from /data/apex/sessions may result in
unintended behaviors.

Signed-off-by: OdSazib <odsazib@gmail.com>
2021-02-09 20:53:35 +06:00
OdSazib
2135c18643
sdm660-common: DeviceSettings: Drop userspace hall switcher
* The sensor works as it is, hence not needed anymore
2021-02-03 23:05:50 +06:00
OdSazib
dd30ca9b1e
sdm660-common: sepolicy: Allow ota updater to access package file 2021-01-27 20:41:45 +06:00
Michael Bestas
0f110dcda2
sdm660-common: sepolicy: Resolve camera HAL denials
Change-Id: I47490bfa19bfb6162d161ba0c5e9f48556ab6eff
2021-01-21 03:26:33 +06:00
Jeff Vander Stoep
e48e418541
sdm660-common: sepolicy: camera HAL is a client of configstore
Addresses:
avc:  denied  { find } for
interface=android.hardware.configstore::ISurfaceFlingerConfigs pid=817
scontext=u:r:hal_camera_default:s0
tcontext=u:object_r:hal_configstore_ISurfaceFlingerConfigs:s0
tclass=hwservice_manager permissive=0

Bug: 65454046
Test: camera app
Change-Id: I84b92e5809b89b7f755322d485b92f5e7175a06a
2021-01-21 03:26:33 +06:00
OdSazib
f2fa84055e
sdm660-common: sepolicy: Address more denials 2020-12-30 22:06:56 +06:00
OdSazib
f6cb7bb46a
sdm660-common: Nuke lineage livedisplay
* Better version is already exist in device settings

Signed-off-by: OdSazib <odsazib@gmail.com>
2020-12-22 20:57:05 +06:00
Subhajeet Muhuri
06dfda6946
sdm660-common: Add sepolicy rules for power-libperfmgr
Signed-off-by: OdSazib <odsazib@gmail.com>
2020-12-22 20:57:05 +06:00
OdSazib
928c7ac4f5
sdm660-common: Remove qti IOP stack
* Useless in EAS

Signed-off-by: OdSazib <odsazib@gmail.com>
2020-12-22 20:57:04 +06:00
OdSazib
9492d1fa58
sdm660-common: Use stock poweroff charging animation
* It's best animation out there with battery level

This reverts commit 9271fec5a4.
Signed-off-by: OdSazib <odsazib@gmail.com>
2020-12-21 09:19:25 +06:00
OdSazib
9a192b7de0
sdm660-common: sepolicy: Update sepolicy and cleanup
* Address some denials from android 11
* Fix video recording
* Sort in alphabetic order

Signed-off-by: OdSazib <odsazib@gmail.com>
2020-12-21 09:16:25 +06:00
Aayush Gupta
ad4a731b53
sdm660-common: Address init denials regarding socket_device
[    9.346918] type=1400 audit(71454275.960:7): avc: denied { create } for comm="init" name="dpmwrapper" scontext=u:r:init:s0 tcontext=u:object_r:socket_device:s0 tclass=sock_file permissive=0

Ref:
[0]: https://source.codeaurora.org/quic/la/device/qcom/sepolicy/commit/?h=LA.UM.9.2.1.r1-03800-sdm660.0&id=79488292273efa5ab89bc405a5f6ae4dec5d011d

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
Change-Id: I262b06821c0625978b3685d0666bd2cf599fbf98
2020-12-13 18:38:07 +06:00
Aayush Gupta
8c68646954
sdm660-common: Allow qti_init_shell to start & stop ril-daemon
[    9.057234] type=1107 audit(71454275.676:6): uid=0 auid=4294967295 ses=4294967295 subj=u:r:init:s0 msg='avc: denied { set } for property=ctl.stop$ril-daemon pid=1122 uid=0 gid=0 scontext=u:r:qti_init_shell:s0 tcontext=u:object_r:ctl_stop_prop:s0 tclass=property_service permissive=0'

Ref:
[0]: https://source.codeaurora.org/quic/la/device/qcom/sepolicy/commit/?h=LA.UM.9.2.1.r1-03800-sdm660.0&id=79488292273efa5ab89bc405a5f6ae4dec5d011d

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
Change-Id: I5f062f8c6be56380b40a9428358c5f6c93dd71c8
2020-12-13 18:38:07 +06:00
LuK1337
bb066620d8
sdm660-common: sepolicy: Address radio denials
Change-Id: If37262e6be3d31f51dcd482db04ce647ecd57e4d
Signed-off-by: Subhajeet Muhuri <subhajeet.muhuri@aosip.dev>
2020-12-13 18:38:07 +06:00
Aayush Gupta
2ccf864f31
sdm660-common: Address denials regarding to access sysfs_kgsl
[   22.419451] type=1400 audit(1601312073.698:17): avc: denied { search } for comm="ImageWallpaper" name="kgsl-3d0" dev="sysfs" ino=29220 scontext=u:r:platform_app:s0:c512,c768 tcontext=u:object_r:sysfs_kgsl:s0 tclass=dir permissive=0 app=com.android.systemui
[    9.476242] type=1400 audit(1601312065.534:13): avc: denied { search } for comm="BootAnimation" name="kgsl-3d0" dev="sysfs" ino=29220 scontext=u:r:bootanim:s0 tcontext=u:object_r:sysfs_kgsl:s0 tclass=dir permissive=0

Change-Id: I80c5de2d9687b3127922d5bc55c26461a797d0f9
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
Signed-off-by: Subhajeet Muhuri <subhajeet.muhuri@aosip.dev>
2020-12-13 18:38:07 +06:00
Nolen Johnson
0d7a7d4ef5
sdm660-common: Move rtc contexts to device/qcom/sepolicy
* In device/qcom/sepolicy-legacy-um now.

Change-Id: I80b877d4b65a3d22cf7a61d70e08e48edeb627de
2020-12-13 18:38:07 +06:00
nebrassy
7821f6dc80
sdm660-common: sepolicy: drop seapp_contexts
now labeled in sepolicy-legacy-um

Change-Id: I284d16905a7e67c3d86f300ac9bf73fa1b9490fc
2020-12-13 18:38:07 +06:00
OdSazib
f614ba1ce6
sdm660-common: Clean up sepolicy for Android 11
checkpolicy:  error(s) encountered while parsing configuration

Changes in Android 11
* dpmd > vendor_dpmd
* persist_camera_prop > vendor_persist_camera_prop
* persist_dpm_prop > vendor_persist_dpm_prop

Signed-off-by: OdSazib <odsazib@gmail.com>
2020-12-13 18:38:07 +06:00
LuK1337
510d313d4e
sdm660-common: sepolicy: Label /persist
Change-Id: I471c0d1fedb51eabc32b54ab35a9823db8efd034
2020-12-13 18:37:01 +06:00
OdSazib
9bd430ff9b
sdm660-common: XiaomiParts: Add Headphone & Mic Gain
* This is manually ported by me from Lavender tree on Corvus-Devices
* Thanks @StyloGey for reviewing the java code and giving me a better solution
* Original repo: https://github.com/Corvus-Devices/device_xiaomi_lavender.git

To get it working, you need these two commits in your kernel:
> c04d6d6e61
> 8e25ac3318

Signed-off-by: OdSazib <odsazib@gmail.com>
Change-Id: I1bb48ced1f23728daa2e5170647ce08a04347110
2020-10-19 11:36:06 +06:00
OdSazib
7580f5f636
sdm660-common: XiamiParts: Add FPS Info Overlay
* Ported from: https://github.com/Corvus-Devices/device_xiaomi_lavender.git

Signed-off-by: OdSazib <odsazib@gmail.com>
2020-10-19 11:36:06 +06:00