Commit graph

243 commits

Author SHA1 Message Date
SamarV-121
bcd346f7e6 universal7885: Correct board platform
* as per stock

Signed-off-by: SamarV-121 <samarvispute121@pm.me>
Change-Id: Id19c9afbbe6eb6b7dd2ab5f27f6b6088444760dc
2021-10-21 22:12:08 +09:00
SamarV-121
e44015122d universal7885: Decommonize board-info.txt
Signed-off-by: SamarV-121 <samarvispute121@pm.me>
Change-Id: Iee2bfc56173aeb2c07e2ab731de23c67da6ae696
2021-10-21 22:12:08 +09:00
ѕαмαя νιѕρυтє
237ccdbcd2 universal7885: Track slsi sepolicy repo
Change-Id: I44fa22d5eb43d1c31697fcd97beb5b3011e143a8
Signed-off-by: SamarV-121 <samarvispute121@pm.me>
2021-10-21 22:12:08 +09:00
Anton Hansson
f1ff6e2d9c universal7885: Use TARGET_SCREEN_DENSITY
This variable is used to auto-populate the ro.sf.lcd_density as
well as selecting density bucket for resources in recovery.

Bug: 118676832
Test: adb shell getprop ro.sf.lcd_density
Test: boot into recovery
Change-Id: Ib383d18b61e7a2058a69ae26136aa053fdba4df2
Signed-off-by: SamarV-121 <samarvispute121@pm.me>
2021-10-21 22:12:08 +09:00
SamarV-121
0bba914af2 universal7885: recovery: Initialize usb.configfs
Change-Id: I092daa2b489f51f78b530253c1c1370e8c0f6a8a
Signed-off-by: SamarV-121 <samarvispute121@gmail.com>
2021-10-21 22:12:08 +09:00
SamarV-121
ae24c2ca02 universal7885: Label more power supply nodes
* seen on a40

Change-Id: If0ab64794d9805bb2310d085e15c72c1c9190078
Signed-off-by: SamarV-121 <samarvispute121@pm.me>
2021-10-21 22:12:08 +09:00
SamarV-121
3cb8448da3 universal7885: Label another rtc node
* seen on a40

Change-Id: Ibaa65145a2e3874e33677acb0b2fd7350c004f23
Signed-off-by: SamarV-121 <samarvispute121@pm.me>
2021-10-21 22:12:08 +09:00
Tim Zimmermann
8968b33f19 universal7885: Assert on firmware version
* <= Pie firmwares aren't supported

Change-Id: Ibe4ba20f05141c5bf0726f4f4a5a6c0cc5672e29
Signed-off-by: SamarV-121 <samarvispute121@pm.me>
2021-10-21 22:12:08 +09:00
SamarV-121
9a5bc701e2 universal7885: Run shfmt
Change-Id: I835dccd7143af8a6d6ab2012cd37822db4fe0d97
Signed-off-by: SamarV-121 <samarvispute121@gmail.com>
2021-10-21 22:12:08 +09:00
SamarV-121
98d5cfb583 universal7885: extract-files: Use pipe in case to assign the multiple expressions
Change-Id: Ibaeacd4f5d6090e14b15e347f9ff4a7cf83e491f
Signed-off-by: SamarV-121 <samarvispute121@gmail.com>
2021-10-21 22:12:08 +09:00
Francescodario Cuzzocrea
55a20a7518 universal7885: Kang RIL blobs from A405FMPUU3CUC2
* needed to fix incall audio

Change-Id: I6462faae62ed18c512306d0068a18528ad8614d8
Signed-off-by: SamarV-121 <samarvispute121@gmail.com>
2021-10-21 22:12:08 +09:00
SamarV-121
0d34c0e460 universal7885: Allow wifi HAL to read vendor_wifi_prop
Change-Id: I3af8cb34f0555bfe8b1d4eeb629c80fcfb865afc
Signed-off-by: SamarV-121 <samarvispute121@gmail.com>
2021-10-21 22:12:08 +09:00
Arne Coucheron
d0e9e5ef6a universal7885: sepolicy: Allow radio to make binder calls to gpuservice
I have no idea why it needs to.

avc: denied { call } for scontext=u:r:radio:s0 tcontext=u:r:gpuservice:s0 tclass=binder permissive=0

Change-Id: I2a1eac04bb90423c2c2f4fb7a524cd03f3d31df2
Signed-off-by: SamarV-121 <samarvispute121@gmail.com>
2021-10-21 22:12:08 +09:00
SamarV-121
c73e82afaf universal7885: sepolicy: Allow hwc HAL to write ion_device
`W composer@2.1-se: type=1400 audit(0.0:144): avc: denied { write } for name="ion" dev="tmpfs" ino=13333 scontext=u:r:hal_graphics_composer_default:s0 tcontext=u:object_r:ion_device:s0 tclass=chr_file permissive=0`
`E libacryl: Failed to open /dev/ion [Permission denied]`

Change-Id: I4f6475d00981a21adddd7a99d5cfb902ee0959da
Signed-off-by: SamarV-121 <samarvispute121@gmail.com>
2021-10-21 22:12:08 +09:00
SamarV-121
681aa46ba9 universal7885: Re-add mx140 debugging files
`E [6:wifi@1.0-servic: 3650] wlbt: [MX_FILE]: mx140_request_file: vfs_stat() failed for /vendor/etc/wifi/mx140/debug/common/log-strings.bin`
 `E [6:wifi@1.0-servic: 3650] wlbt: [MX_FW]: mxlog_init: Failed to read common/log-strings.bin needed by MXlog Phase 5`

Change-Id: Ic28c7ff3dee15a3c26bd59cf0e61f1025cb96b58
Signed-off-by: SamarV-121 <samarvispute121@gmail.com>
2021-10-21 22:12:08 +09:00
SamarV-121
f0353ae729 universal7885: Update memetrack HAL from A405FMPUU3CUC2
Signed-off-by: SamarV-121 <samarvispute121@gmail.com>
Change-Id: Ie70d9554921353fb4cd0322ae9805c01715c30c8
2021-10-21 22:12:08 +09:00
SamarV-121
959d155c73 universal7885: sepolicy: Cleanup unused rules
Change-Id: Idcf765bab4f43f67ecc21cd572b6264d691f9185
Signed-off-by: SamarV-121 <samarvispute121@gmail.com>
2021-10-21 22:12:08 +09:00
SamarV-121
cdae24b850 universal7885: sepolicy: Allow zygote to read cmdline
Signed-off-by: SamarV-121 <samarvispute121@gmail.com>
Change-Id: Ieb498872e834939da48da56ac13554b78da21915
2021-10-21 22:12:08 +09:00
dhacker29
94ca3b4cde universal7885: rootdir: Allow telephony access to proc/cmdline
`D/TelephonyManager(  131): No /proc/cmdline exception=java.io.FileNotFoundException: /proc/cmdline: open failed: EACCES (Permission denied)`

Change-Id: I2685959d485be3e29a738bc6287fdd99dc52b771
Signed-off-by: SamarV-121 <samarvispute121@gmail.com>
2021-10-21 22:12:08 +09:00
SamarV-121
c01abf68d7 universal7885: sepolicy: Label /mnt/vendor/cpefs
`W vold    : Failed to open /mnt/vendor/cpefs: Permission denied`
`I auditd  : type=1400 audit(0.0:78): avc: denied { read } for comm="Binder:3484_2" name="/" dev="mmcblk0p4" ino=2 scontext=u:r:vold:s0 tcontext=u:object_r:mnt_vendor_file:s0 tclass=dir permissive=0`

Change-Id: Id8a194322977d4a697dd525df27f1b1a691a2475
Signed-off-by: SamarV-121 <samarvispute121@pm.me>
2021-10-21 22:12:08 +09:00
SamarV-121
bea423e4a5 universal7885: sepolicy: Silence tee denial
- `I auditd  : type=1107 audit(0.0:15): uid=0 auid=4294967295 ses=4294967295 subj=u:r:init:s0 msg='avc: denied { set } for propertteey=sys.mobicoredaemon.enable pid=3585 uid=1000 gid=1000 scontext=u:r:tee:s0 tcontext=u:object_r:system_prop:s0 tclass=property_service permissive=0'`
- this prop is used nowhere

Signed-off-by: SamarV-121 <samarvispute121@gmail.com>
Change-Id: I823e09cd6ee98fded5855d71ccec2d5f91454611
2021-10-21 22:12:08 +09:00
SamarV-121
c4c7efdbac universal7885: sepolicy: Nuke neverallows
Signed-off-by: SamarV-121 <samarvispute121@gmail.com>
Change-Id: Ie0339184617873ffe3b5dc25c277e740b34c8d86
2021-10-21 22:12:08 +09:00
SamarV-121
aed3c1f464 universal7885: sepolicy: Allow kernel to read sysfs_virtual nodes
`avc: denied { read } for name="hall_detect" dev="sysfs" ino=29566 scontext=u:r:kernel:s0 tcontext=u:object_r:sysfs_virtual:s0 tclass=file permissive=0`

Signed-off-by: SamarV-121 <samarvispute121@gmail.com>
Change-Id: I8fb01d8c4ce8b48fbf58a0688b04dc79664d2964
2021-10-21 22:12:08 +09:00
SamarV-121
0b3a75c212 universal7885: sepolicy: Allow hwc HAL to read hwc.exynos.vsync_mode prop
`W composer@2.1-se: type=1400 audit(0.0:23509): avc: denied { read } for name="u:object_r:default_prop:s0" dev="tmpfs" ino=2518 scontext=u:r:hal_graphics_composer_default:s0 tcontext=u:object_r:default_prop:s0 tclass=file permissive=0`
`E libc    : Access denied finding property "hwc.exynos.vsync_mode"`

Change-Id: Ib259886ae5560dc3b2e427890e46877c732ff7ba
Signed-off-by: SamarV-121 <samarvispute121@gmail.com>
2021-10-21 22:12:08 +09:00
SamarV-121
6cfb2d5778 universal7885: sepolicy: Remove mobicore and trustonic HAL rules from here
* Moved to common slsi sepolicy

Signed-off-by: SamarV-121 <samarvispute121@gmail.com>
Change-Id: I204b0eaad014f97166180b17678277c48a851491
2021-10-21 22:12:08 +09:00
SamarV-121
ae0130bb13 universal7885: sepolicy: Resolve neverallows
libsepol.report_failure: neverallow on line 9 of device/samsung/universal7885-common/sepolicy/vendor/mediacodec.te (or line 60921 of policy.conf) violated by allow hal_power_default hal_power_hwservice:hwservice_manager { add };
libsepol.report_failure: neverallow on line 5 of system/sepolicy/public/hal_power.te (or line 19140 of policy.conf) violated by allow mediacodec hal_power_hwservice:hwservice_manager { find };
libsepol.report_failure: neverallow on line 5 of system/sepolicy/public/hal_power.te (or line 19132 of policy.conf) violated by allow mediacodec hal_power_hwservice:hwservice_manager { add };
libsepol.report_failure: neverallow on line 990 of system/sepolicy/public/domain.te (or line 13095 of policy.conf) violated by allow zygote vendor_file:file { read };
libsepol.report_failure: neverallow on line 861 of system/sepolicy/public/domain.te (or line 12818 of policy.conf) violated by allow hal_fingerprint_default fingerprintd_data_file:dir { write };
libsepol.report_failure: neverallow on line 861 of system/sepolicy/public/domain.te (or line 12818 of policy.conf) violated by allow rild radio_data_file:dir { search };
libsepol.report_failure: neverallow on line 861 of system/sepolicy/public/domain.te (or line 12818 of policy.conf) violated by allow hal_camera_default camera_data_file:dir { search };
libsepol.report_failure: neverallow on line 861 of system/sepolicy/public/domain.te (or line 12818 of policy.conf) violated by allow hal_drm_widevine media_data_file:dir { search };
libsepol.report_failure: neverallow on line 831 of system/sepolicy/public/domain.te (or line 12761 of policy.conf) violated by allow rild radio_data_file:file { lock open watch watch_reads };

Change-Id: I47cc5117dda055ca4041e666bb7ffa8a51f9a3d9
Signed-off-by: SamarV-121 <samarvispute121@gmail.com>
2021-10-21 22:12:08 +09:00
SamarV-121
a9dab1b0bf universal7885: init: Set correct device model
Signed-off-by: SamarV-121 <samarvispute121@gmail.com>
Change-Id: Ia9db3a1b4009e461b7df8cd677acd9b2bb298dab
2021-10-21 22:12:08 +09:00
Volodymyr Zhdanov
c7c83fdac1 universal7885: Only start NFC service on supported variants
Change-Id: I6c272eca6b45760679aac4effc7c074444692cf1
Signed-off-by: SamarV-121 <samarvispute121@gmail.com>
2021-10-21 22:12:08 +09:00
Pig
f66a5f7574 universal7885: Enable NFC only if hardware sku prop is set
Change-Id: Iac4734657504004c12630dc482dfb9d6c2612282
Signed-off-by: SamarV-121 <samarvispute121@gmail.com>
2021-10-21 22:12:08 +09:00
SamarV-121
75777bf8c1 universal7885: init: Set NFC sku property on supported variants
Change-Id: I30e4f0188c8731e0b3b76ab58ec365808eec96d5
Signed-off-by: SamarV-121 <samarvispute121@gmail.com>
2021-10-21 22:12:08 +09:00
SamarV-121
ba5a120ecf universal7885: rootdir: Create efs nfc dirs
* Taken from stock init.rc

Signed-off-by: SamarV-121 <samarvispute121@gmail.com>
Change-Id: I35b7890363a743902da458bc555b745a27e9204a
2021-10-21 22:12:08 +09:00
SamarV-121
44ba529c7f universal7885: rootdir: Mount sec_efs partition
* only available on A series

Signed-off-by: SamarV-121 <samarvispute121@gmail.com>
Change-Id: If860b66f65667c582d8554d2b5e731392d2dd646
2021-10-21 22:12:08 +09:00
SamarV-121
179ec03067 universal7885: rootdir: Simplify bdaddr_path
why even bother bind mouting it
 also its gonna create conflict with seperate sec_efs partition which A series have

Change-Id: I597af331f53942cce5fa9a3e78af35a5f57ae68e
Signed-off-by: SamarV-121 <samarvispute121@gmail.com>
2021-10-21 22:12:08 +09:00
Tim Zimmermann
9f0f037948 universal7885: move nfc data to /data/vendor/nfc
Signed-off-by: SamarV-121 <samarvispute121@gmail.com>
Change-Id: I1d6453d04cad9bca330801abe27ac4df4c7d76ba
2021-10-21 22:12:08 +09:00
Jan Altensen
4fed82613c universal8890: build nfc hal from source
Change-Id: Ief7ef8f2a597b1a978ea4b0ec4e41391cec03a99
Signed-off-by: SamarV-121 <samarvispute121@gmail.com>
2021-10-21 22:12:08 +09:00
SamarV-121
1875a501a1 universal7885: sepolicy: Adapt for universal7885 and address denials
* Everything's working fine now
 * todo: Cleanup unnecessary rules and vendor init

Change-Id: I4faea56383b5851bbd486f45d103e0bb94ebdd24
Signed-off-by: SamarV-121 <samarvispute121@gmail.com>
2021-10-21 22:12:08 +09:00
Henrik Grimler
1db34af1a0 universal7885: Initial sepolicy
* Based on {exynos9820,universal7880}-common
 * Squashed from https://github.com/exynos8895/android_device_samsung_universal8895-common/commits/lineage-17.1/sepolicy

Co-authored-by: Jan Altensen <info@stricted.net>
Change-Id: I5ff59c00498bc546db70277571e3d5c7595bc2b8
Signed-off-by: SamarV-121 <samarvispute121@gmail.com>
2021-10-21 22:12:08 +09:00
SamarV-121
448dba611a universal7885: Compile Sepolicy from source
Change-Id: I48c4ba7995e10ec3665cc2974c6977fa4d1ce25c
Signed-off-by: SamarV-121 <samarvispute121@gmail.com>
2021-10-21 22:12:08 +09:00
Andreas Schneider
f23750e9db universal7885: Include common samsung_slsi and lineage exynos policy
Change-Id: I45102a4c6849f1efc8ce45051995c378442da72c
2021-10-21 22:12:08 +09:00
Andrew Hexen
548a4cc2a5 universal7885: rro_overlays: Move to Vendor
* For GSI compatibility.

Signed-off-by: Andrew Hexen <SyberHexen@gmail.com>
Change-Id: I21180e80de1109483f8ce0ab67fba021d4a74b08
Signed-off-by: SamarV-121 <samarvispute121@gmail.com>
2021-10-21 22:12:08 +09:00
Roshan Pius
5453c66f29 universal7885: Add WifiOverlay
Bug: 148617260
Test: Device boots up and connects to wifi networks.
Change-Id: Iec27a6d947a232a42451ef095dc73d1a52327db5
Signed-off-by: SamarV-121 <samarvispute121@gmail.com>
2021-10-21 22:12:08 +09:00
SamarV-121
78233e4a8b universal7885: rootdir: Merge a40's ueventd.rc
Change-Id: Ia20e9435d24fd5965347e4e9c9085010e6bd2bc4
Signed-off-by: SamarV-121 <samarvispute121@gmail.com>
2021-10-21 22:12:08 +09:00
SamarV-121
e3b10d19e1 universal7885: Decommonize some init scripts
* A series has partition names in small letters

Change-Id: I603b7f4283a2486c4177f4d4cd8ddc94134f4a1b
Signed-off-by: SamarV-121 <samarvispute121@gmail.com>
2021-10-21 22:12:08 +09:00
Tim Zimmermann
b7a4a02d2c universal7885: rootdir: Cleanup init.exynos7904.rc
Change-Id: I3087f71b17924188f421c91b90804c5133a9e48b
Signed-off-by: SamarV-121 <samarvispute121@gmail.com>
2021-10-21 22:12:08 +09:00
SamarV-121
5d4a8c7d0f universal7885: rootdir: Remove unused service
Change-Id: I99dab18fe6da59782c5cc9e6a00532ddc66370b7
Signed-off-by: SamarV-121 <samarvispute121@gmail.com>
2021-10-21 22:12:08 +09:00
SamarV-121
d4f77e5e74 universal7885: rootdir: Remove non-existent services
Change-Id: I15215cae0d43c6596ab92ec99f8c2860276d5a67
Signed-off-by: SamarV-121 <samarvispute121@gmail.com>
2021-10-21 22:12:08 +09:00
SamarV-121
55862efd57 universal7885: Remove unused sec audio HAL
Signed-off-by: SamarV-121 <samarvispute121@gmail.com>
Change-Id: I5fd996dfa3823d14a072fc03c991b7d13fada0ae
2021-10-21 22:12:08 +09:00
SamarV-121
4150d2479d universal7885: Remove unused audio_policy_volumes_sec.xml
Signed-off-by: SamarV-121 <samarvispute121@gmail.com>
Change-Id: Ib97e3b9161be95b5eb5dcb7732c56e05b44597a9
2021-10-21 22:12:08 +09:00
SamarV-121
017eeb3b01 universal7885: Update graphics blobs from a40 oneui3
* relevant kernel drivers are already merged in kernel
 * r26p0 ftw

Change-Id: Ideb5b69309d0fdc9f0148b454c72b7df1296d369
Signed-off-by: SamarV-121 <samarvispute121@gmail.com>
2021-10-21 22:12:08 +09:00
SamarV-121
aa02f7373b universal7885: Add missing dependency of sec-ril
Change-Id: Id99912c8d3f40976be4142ad6f4f705b28122f4b
Signed-off-by: SamarV-121 <samarvispute121@gmail.com>
2021-10-21 22:12:08 +09:00