Commit Graph

704 Commits

Author SHA1 Message Date
Arian
dc759f6420 sm6150-common: sepolicy: Label additional usb related wakeup nodes
Change-Id: I21b3a00d504938f0b1da02f606c8f0fb729aa089
2022-06-28 00:23:34 +02:00
Arian
08b94607f0 Revert "davinci: sepolicy: Remove qcom PMIC devices wakeup nodes"
* These are not labelled by qcom sepolicy on 19.1 anymore

This reverts commit a02dd0dd72.

Change-Id: I5beb0916a1942507f13720de0d0d986422e5eb2e
2022-06-28 00:23:34 +02:00
Sebastiano Barezzi
4ba3c81098 sm6150-common: Remove TARGET_ENABLE_MEDIADRM_64
* It's only used when building drm@1.0 HIDL

Change-Id: I06412e2dd2bb48d798be4ef6e9a26a17b65277a7
2022-06-28 00:23:34 +02:00
Michael Bestas
29a3f78a3a sm6150-common: Automatically add apk/jar/vintf fragments to PRODUCT_PACKAGES
$ sed -i "s/^-\(.*.\(apk\|jar\)\)/\1/g" proprietary-files.txt

Change-Id: Iaa9d66b0bbdc55f046ee1347cbf83c7eecebb35e
2022-06-28 00:23:20 +02:00
LuK1337
e6fa02024b sm6150-common: Sort blobs list /w sort-blobs-list.py
Change-Id: I197c6353dc50baf4ee76ed6ebf083dc00879bd96
2022-06-28 00:21:46 +02:00
Arian
b3bb71aebc sm6150-common: Add gnss seccomp_policy
Change-Id: Iab89aaa86ccc69b90d0e16cdb5c02e8533ab94c2
2022-06-28 00:21:36 +02:00
Nolen Johnson
7b73446642 sm6150-common: Remove deprecated TARGET_USES_QTI_CAMERA_DEVICE
* Dead as of https://review.lineageos.org/c/LineageOS/android_vendor_lineage/+/331507.
* We never needed this.

Change-Id: I8ec420d6264fee70a1602eecdbb4f34f2e5db3dc
2022-06-22 16:31:02 +02:00
Marc Bourgoin
d5d80a5347 sm6150-common: Drop QCOM WFD
Change-Id: I3dd591444dc54ebe3a32e0385cbfc3db6bfc5e1f
2022-06-22 16:23:58 +02:00
Nicolas Geoffray
ef38d89538 sm6150-common: Remove odex/oat files from pinner list
The pinner now asks the runtime for these files.

Test: adb shell dumpsys pinner
Bug: 144773394
Change-Id: I8de2a2935901cbd3eaa50ce2d8aa09f61080ba02
Merged-In: Ie633ea788dab3389a3407ec9a461b5837befca46
2022-04-19 19:35:09 +02:00
Kevin Jeon
cb96f74c9c sm6150-common: Update SurfaceFlinger pin on all targets
This change replaces the '/system/lib64/libsurfaceflinger.so' pin, as
the file was removed in ag/12524602. The updated pin relies on
go/aog/1552085, as system_service needs read access to SurfaceFlinger.

Bug: 176197656
Test: adb shell dumpsys pinner (coral)
      - shows that /system/bin/surfaceflinger is successfully pinned
      adb logcat | grep PinnerService (coral)
      - no longer shows a file-not-found error in PinnerService
Change-Id: Iae2a96c5fe4b1f5698d21de9970140321d11c460
2022-04-19 19:34:50 +02:00
Arian
b01b18c6fd sm6150-common: Drop renderscript pin
Change-Id: I231931f202adc0209db8e6c7d3449bf1c318b820
2022-04-19 19:34:28 +02:00
Felix
a13246a7fc sm6150-common: Force restorecon for /mnt/vendor/persist
The restorecon_recursive directive in init is only applied if the
file_contexts file changed between builds, but not necessarily if any
file or folder inside /mnt/vendor/persist/ has changed.

The restorecon code checks whether an xattr named
"security.sehash" contains a string that matches the current
combined hashes of the SELinux context files and skips restoring labels
if there is a match, see
https://android.googlesource.com/platform/external/selinux/+/refs/tags/android-9.0.0_r35/libselinux/src/android/android_platform.c#1546

Force wiping that xattr so that restorecon always runs since it's not
very expensive (there are currently only about 50 files on /persist).

The restorecon is needed to fix issues such as wrong stock labels on
/mnt/vendor/persist/sensors/:
sensors_persist_file -> persist_sensors_file

Change-Id: Ic0cd848836ee550499d9236f56ed6e939e35f01e
2022-03-27 13:38:12 +02:00
Arian
f23eac1c98 sm6150-common: sepolicy: Add vendor prefix to camera persist file type
Change-Id: Ia42113acb0fcf5667c0b89ecdd7def13681ca0be
2022-03-27 13:38:07 +02:00
Arian
fd47aee8f1 sm6150-common: Provide partition dependent module names if necessary
Change-Id: I7b113c34775d65081485580d0f36543d6caeed6f
2022-03-17 01:28:20 +01:00
Tim Zimmermann
6b0b6fa895 sm6150-common: Make all elf prebuilts packages
* To get rid of BUILD_BROKEN_ELF_PREBUILT_PRODUCT_COPY_FILES

echo "$(cat proprietary-files.txt | sed 's/.*\.so$/-&/g' | sed 's/.*\.so|.*/-&/g' | sed 's/.*\/bin.*/-&/g' | sed "s/\-\-/\-/g")" > proprietary-files.txt

Change-Id: I0034a5732f522a2dd42d89d9c9ee6c8c1981f302
2022-03-17 01:28:13 +01:00
Arian
a07caa8f8f sm6150-common: releasetools: Use unique version-baseband strings for different regions
Android 12 forbids to assign version-baseband multiple times with
different values for different regions, hence append the hwc value
to the version-baseband string.

The lines have to follow this syntax now:
require version-baseband-${ro.boot.hwc}=${modem_version},${firmware_version}

Example for a device that wants assertions for global and chinese devices:
require version-baseband-CN=4.3.c5-00100,21.4.21
require version-baseband-GLOBAL=4.3.c5-00100,V12.1.2.0.RFJMIXM

Change-Id: Ib2c5b1c4588e6bfff1ebf5b7b1d8933d71e09251
2022-03-17 00:49:16 +01:00
Georg Veichtlbauer
fc459f07b0 sm6150-common: Remove CLANG compile flag
Defaults to true now project-wide.

Change-Id: I1e0ff5adadc889d81c90c816457a72d2621e4b5a
2022-03-17 00:14:36 +01:00
Timi Rautamäki
b112b01134 sm6150-common: Drop Snap
It's not included anymore since LineageOS 19

Change-Id: Ie3f908234cf7a3d94d33ad0e9d170d3738bb9752
2022-03-17 00:14:02 +01:00
Arian
5a4c03d68e sm6150-common: sepolicy: Move xiaomi specific property labels to vendor
Change-Id: I4f2f5e2ee9b0751e3af14fbb1cd4ab93814755f8
2021-12-29 10:19:42 +00:00
Arian
1edab42a1a Revert "davinci: sepolicy: Label manufacturer prop used by camera hal"
This is labelled in system/sepolicy as build_prop now

This reverts commit 50625df1c3.

Change-Id: Ia744a2c2eba1c6aade04e29c975c6b8bc26c9fee
2021-12-29 10:19:01 +00:00
Inseob Kim
87b0b914b1 sm6150-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: Ibed833cd9e5d786e82985ded6bc62abdf8cd9ded
Merged-In: Ibed833cd9e5d786e82985ded6bc62abdf8cd9ded
(cherry picked from commit 44eb8e1f89adf04fd413a69391fd444ba68af742)
(cherry picked from commit 1922128397116d551a663d5344b4456a84bf46eb)
2021-12-29 10:18:50 +00:00
Michael Bestas
3dfec47b60 sm6150-common: sepolicy: Switch to SYSTEM_EXT_{PUBLIC,PRIVATE}_SEPOLICY_DIRS
Fixes:
warning: BOARD_PLAT_PRIVATE_SEPOLICY_DIR has been deprecated.
    Use SYSTEM_EXT_PRIVATE_SEPOLICY_DIRS instead.
warning: BOARD_PLAT_PUBLIC_SEPOLICY_DIR has been deprecated.
    Use SYSTEM_EXT_PUBLIC_SEPOLICY_DIRS instead.
Change-Id: I752602079de8ff4c5370fe3ec861b8746838d878
2021-12-29 10:18:38 +00:00
TheScarastic
3152b1a1cf sm6150-common: fingerprint: Add surfaceflinger udfps extension lib
Squashed in this commit:
Author: TheScarastic <warabhishek@gmail.com>
Date:   Tue Oct 12 13:29:07 2021 +0200

    sm6150-common: fingerprint: Rename fod extension to udfps extension

Author: Vincent Vidal <vinvidal@gmail.com>
Date:   Tue Aug 18 14:42:49 2020 +0200

    sm6150-common: fod: Use FOD_PRESSED_LAYER_ZORDER instead of magic number

Author: Vincent Vidal <vinvidal@gmail.com>
Date:   Tue Aug 18 14:40:50 2020 +0200

    sm6150-common: fod: Include generated_kernel_headers to build libfod_extension

Change-Id: I51fb56c0a20e3cac83afb46ed6a6e2f967159d18
2021-12-29 10:18:16 +00:00
Arian
f0e2002d43 sm6150-common: fingerprint: Setup goodix file permissions
* from MIUI 21.1.20

Change-Id: Iabe5ea1125d44c1189e6227722f9f440c4dcf47a
2021-12-29 10:18:09 +00:00
Arian
a457bbfa8f sm6150-common: fingerprint: Disable fod_status on fod_ui changes
onFingerUp is not called when the finger is kept at the fod area
after it was accepted, which leads to cases where fod_status stays
enabled.

Change-Id: I95da8e12d5cac83dafdfcca286fb4145396a154b
2021-12-29 10:17:59 +00:00
Cosmin Tanislav
bd7d6d7d59 sm6150-common: fingerprint: Add thread listening for fod_ui sysfs event
Change-Id: I36f5789657daa70cf39fbdfe501392b9f96dbf2e
2021-12-29 10:17:39 +00:00
Arian
3cf7b626a4 sm6150-common: fingerprint: Conditionally implement UDFPS
hardware/fingerprint.h is imported from android-12.0.0_r1.
The xiaomi fingerprint extension command was added to the
fingerprint_device struct and it was clang-formatted.

Change-Id: I5c5f876eb47a558059a2423ca5f6cc75afaf3e1d
2021-12-29 10:16:45 +00:00
Arian
a54d369435 sm6150-common: fingerprint: Uprev to 2.3 HAL
Change-Id: I56ea1646ef464f7e533add5a0017620e21db686d
2021-12-29 10:13:58 +00:00
Arian
e8054c433c sm6150-common: fingerprint: Clang-format the code
Change-Id: I78ca8f67846290826bd8c75c0db794bb5f477cde
2021-12-29 10:13:58 +00:00
Arian
4b3307491a sm6150-common: fingerprint: Drop unused includes
Change-Id: I8a1c4f8c396e9574ff6a6b10cd1e0624f93b31a3
2021-12-29 10:13:58 +00:00
Arian
b261c7e5ff Revert "sm6150-common: fingerprint: Add Xiaomi fingerprintextension support"
This reverts commit 3f9ee454dc.
2021-12-29 10:13:58 +00:00
Arian
565809d0b5 Revert "sm6150-common: fingerprint: Allow to build without fingerprintextension"
This reverts commit a8c1391091.

Change-Id: I78244b2491b8ba824907cf1cb056c2f26bffbc72
2021-12-29 10:13:58 +00:00
Arian
62f89dcba7 Revert "sm6150-common: fingerprint: Setup goodix file permissions"
This reverts commit 8a8299ea1c.
2021-12-29 10:13:49 +00:00
TheScarastic
ffc917c1e3 sm6150-common: parts: Adapt to S style
* Use Theme.SubSettingsBase for theme
 * Replace PreferenceActivity with CollapsingToolbarBaseActivity
 * Add Titles to prefernce screen
 * Remove onOptionsItemSelected and where neccessary move to activity

Change-Id: I25f6dce7cf202487898facfa66e57ced86a85594
2021-12-29 10:13:09 +00:00
Edwin Wong
81eed3a59a sm6150-common: Update clearkey plugin to drm HAL v1.4
Test: atest
  atest CtsMediaTestCases:android.media.cts.MediaDrmClearkeyTest#testGetPlaybackComponent

Bug: 182525516
Change-Id: I106a727f2f29bf5472484402b2801a630b0d6301
2021-12-29 10:12:43 +00:00
Arian
d0f9f39f19 sm6150-common: Provide bluetooth and gatekeeper interfaces on vendor
Change-Id: I482503cafaab16d50241ad90b1f51e882727c6f2
2021-12-29 10:12:06 +00:00
Pavel Dubrova
dd3827764f sm6150-common: Provide android.frameworks.sensorservice@1.0 on vendor
Following the commit f19703e ("common-treble: Provide radio, keymaster
and secure_element HAL on vendor"), starting with Android 12 most HAL
libraries are not included in VNDK anymore - they need to be explicitly
pulled in to `/vendor` for odm blobs to be allowed to access them:

    QCamera : <MCI><ERROR> mm_camera_load_shim_lib: 3306: dlopen failed
    with error dlopen failed: library
    "android.frameworks.sensorservice@1.0.so" not found: needed by
    /odm/lib/libmmcamera2_stats_modules.so in namespace (default)

android.frameworks.sensorservice@1.0 is used by at least mm-camera
framework.

Signed-off-by: Pavel Dubrova <pashadubrova@gmail.com>
Change-Id: I72d9bcda1fdfd48c5fb9cb21666edd995ae4d9af
2021-12-29 10:11:45 +00:00
Marijn Suijten
52e32c0ddd sm6150-commone: Provide android.system.net.netd@1.1 on vendor for netmgrd
Following the previous commit, starting with Android S most HAL
libraries are not included in VNDK anymore - they need to be explicitly
pulled in to `/vendor` for odm blobs to be allowed to access them:

    linker  : CANNOT LINK EXECUTABLE "/odm/bin/netmgrd": library "android.system.net.netd@1.1.so" not found: needed by main executable

Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
Change-Id: Ide8adad466a61412a984a46d1562f8f2f6a62be3
2021-12-29 10:11:45 +00:00
Marijn Suijten
4e1847ceca sm6150-common: Provide radio, keymaster and secure_element HAL on vendor
In [1] Google removed many HIDL HAL libraries from VNDK, causing them to
only be installed to the system partition.  This is inaccessible for
vendor apps and results in the usual:

    linker  : CANNOT LINK EXECUTABLE "/odm/bin/hw/android.hardware.keymaster@4.0-service-qti": library "android.hardware.keymaster@4.0.so" not found: needed by main executable
    linker  : CANNOT LINK EXECUTABLE "/odm/bin/hw/android.hardware.keymaster@4.0-service-qti": library "android.hardware.keymaster@4.1.so" not found: needed by /odm/lib64/libqtikeymaster4.so in namespace (default)
    linker  : CANNOT LINK EXECUTABLE "/odm/bin/hw/vendor.somc.hardware.modemswitcher@1.0-service": library "android.hardware.radio.config@1.0.so" not found: needed by /odm/lib64/libril-qc-hal-qmi.so in namespace (default)
    linker  : CANNOT LINK EXECUTABLE "/odm/bin/hw/qcrild": library "android.hardware.secure_element@1.1.so" not found: needed by /odm/lib64/libril-qc-hal-qmi.so in namespace (default)
    linker  : CANNOT LINK EXECUTABLE "/odm/bin/hw/qcrild": library "android.hardware.secure_element@1.2.so" not found: needed by /odm/lib64/libril-qc-hal-qmi.so in namespace (default)
    linker  : CANNOT LINK EXECUTABLE "/odm/bin/hw/qcrild": library "android.hardware.radio.deprecated@1.0.so" not found: needed by /odm/lib64/libril-qc-hal-qmi.so in namespace (default)

These libraries are listed in common-treble because they're used by ODM
apps but have no explicit vendor dependency (ie. a binary placed on
/vendor) to put them in a vendor-available space.  The default is to
include system variants which is why the dependencies have to be
suffixed with `.vendor` so that they're shipped in `/vendor` and are
available for our ODM blobs even on GSIs.

[1]: d610435ac4

Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
Change-Id: I8344b85fb4e86a913bd8d9071ce49150ed093575
2021-12-29 10:11:39 +00:00
Arian
3182cdfce9 sm6150-common: parts: Semantic fixes
Change-Id: I26ad700931e8b104ee21666eff1ce73eafbac56d
2021-12-29 10:11:12 +00:00
Arian
b3b6b7c683 sm6150-common: overlay: Decommonize vibration patterns
Our devices have different haptics devices which can
benefit from specific configuration.

Change-Id: Ida902a89162ee6befacda3bd014e57a828c78d8f
2021-12-29 10:08:52 +00:00
Jiyong Park
cd2df7634f sm6150-common: Add updatable_apex.mk
The product abstracts configs that need to be set to support updating of APEXes.

Change-Id: Id5aa944ceba6a6846308f1c18a08af8b3bb38589
2021-12-29 10:08:35 +00:00
Arian
5b735a2c68 sm6150-common: Declare the origin of extracted proprietary files
Change-Id: Id8c9102fbddded34ff9f2e522231285c1484ee31
2021-12-29 10:07:12 +00:00
Jaegeuk Kim
778c3c7f4a sm6150-common: sepolicy: Allow ioctl to zram_swap for performance
This fixes permission denied when setting F2FS_PIN_FILE.

[   46.726131] init: [libfs_mgr]Failed to set pin_file for f2fs: /data/per_boot/zram_swap: Permission denied
[   46.726151] init: [libfs_mgr]Failure of zram backing device file for '/dev/block/zram0'
[   46.726341] type=1400 audit(1601025878.312:17): avc: denied { ioctl } for comm="init" path="/data/per_boot/zram_swap" dev="dm-9" ino=4868 ioctlcmd=0xf50d scontext=u:r:init:s0 tcontext=u:object_r:per_boot_file:s0 tclass=file permissive=0

Bug: 169311165
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
Change-Id: I982f70556284ac55d659bae6aff93b84d71e67f0
2021-12-29 09:59:07 +00:00
Mimi Wu
479a60f41c sm6150-common: sepolicy: Modify sepolicy for toolbox to rm -rf /data/per_boot
type=1400 audit(1581489923.612:571): avc: denied { getattr } for comm="rm" path="/data/per_boot" dev="dm-9" ino=4577 scontext=u:r:toolbox:s0 tcontext=u:object_r:per_boot_file:s0 tclass=dir permissive=1
type=1400 audit(1581489923.612:572): avc: denied { read } for comm="rm" name="per_boot" dev="dm-9" ino=4577 scontext=u:r:toolbox:s0 tcontext=u:object_r:per_boot_file:s0 tclass=dir permissive=1
type=1400 audit(1581489923.612:573): avc: denied { open } for comm="rm" path="/data/per_boot" dev="dm-9" ino=4577 scontext=u:r:toolbox:s0 tcontext=u:object_r:per_boot_file:s0 tclass=dir permissive=1
type=1400 audit(1581489923.616:574): avc: denied { getattr } for comm="rm" path="/data/per_boot/ft09,GYyRLUL4NXv4BjupD" dev="dm-9" ino=4578 scontext=u:r:toolbox:s0 tcontext=u:object_r:per_boot_file:s0 tclass=file permissive=1
type=1400 audit(1581489923.616:575): avc: denied { write } for comm="rm" name="per_boot" dev="dm-9" ino=4577 scontext=u:r:toolbox:s0 tcontext=u:object_r:per_boot_file:s0 tclass=dir permissive=1
type=1400 audit(1581489923.616:576): avc: denied { remove_name } for comm="rm" name="ft09,GYyRLUL4NXv4BjupD" dev="dm-9" ino=4578 scontext=u:r:toolbox:s0 tcontext=u:object_r:per_boot_file:s0 tclass=dir permissive=1
type=1400 audit(1581489923.619:577): avc: denied { unlink } for comm="rm" name="ft09,GYyRLUL4NXv4BjupD" dev="dm-9" ino=4578 scontext=u:r:toolbox:s0 tcontext=u:object_r:per_boot_file:s0 tclass=file permissive=1
type=1400 audit(1581489923.656:578): avc: denied { rmdir } for comm="rm" name="per_boot" dev="dm-9" ino=4577 scontext=u:r:toolbox:s0 tcontext=u:object_r:per_boot_file:s0 tclass=dir permissive=1

Bug: 147469156
Test: flash full build and find avc errors gone
Change-Id: I22706c63fb13ea2aae0cd9fe8b92edc578fd459e
Signed-off-by: Mimi Wu <mimiwu@google.com>
2021-12-29 09:59:01 +00:00
Mimi Wu
73025604d6 sm6150-common: sepolicy: Add sepolicy for kernel to access /data/per_boot/zram_swap
type=1400 audit(1581485243.256:88): avc: denied { read } for comm="loop29" path="/data/per_boot/zram_swap" dev="dm-9" ino=9820 scontext=u:r:kernel:s0 tcontext=u:object_r:system_data_file:s0 tclass=file permissive=0

Bug: 147469156
Test: flash full build and find avc errors gone
Change-Id: I48d7684ce3b4ca1ada81011b1cab21007c758ba5
Signed-off-by: Mimi Wu <mimiwu@google.com>
2021-12-29 09:58:35 +00:00
raghavt20
8a938dd6e1 sm6150-common: Kang libqdp.so and libril-qc-hal-qmi.so from surya
Change-Id: Id3f60d5c30705fc31b8f51e49c7aa493d25c6f0e
2021-12-29 09:57:01 +00:00
Arian
defa5a1681 sm6150-common: Update vendor security patch level from sweet RKQ1.200826.002 V12.5.8.0.RKFMIXM
Change-Id: Iba8cf8c64970058ae79f3c71d67fcbc444bfbb00
2021-12-29 09:56:49 +00:00
Arian
9bf8cf0548 sm6150-common: Pin PowerOffAlarm.apk from sweet 12.5.1.0
This was removed in global 12.5.8.0 but is required for
power off alarm functionality.

Change-Id: I6f7e03643cc5a541e50930b4e2399e9982c37deb
2021-12-29 09:56:40 +00:00
Dyneteve
59c2522990
sm6150-common: CarrierConfigOverlay: Disable HD logo
Signed-off-by: Henrique Pereira <hlcpereira@pixelexperience.org>
Change-Id: I2f3f2fc9f0e797170ab34d82b00b46259a5c7348
2021-09-09 21:24:04 +02:00