Commit Graph

838 Commits

Author SHA1 Message Date
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
Arian
0a41f5cd2a
sm6150-common: parts: AodSensor: Remove useless SystemClock include
Change-Id: Iad54508f27fe2ef45af58e9b10655ee673d53ae1
2021-08-24 11:54:34 +02:00
Martin Liu
d299288eaf
sm6150-common: mm: Adjust zram write back policy
The first default zram write back time is 3 hours which
is for go device to quickly save more ram. For Pixel
devices, we have more working set and could bring launch
time impact if we write back too fast. Thus, adjust the
first time write back time to 24 hours which is aligned
with periodic write back time.

Bug: 166739872
Test: boot
Signed-off-by: Martin Liu <liumartin@google.com>
Change-Id: I2388dd6d75ab0a938fe0edae0563fd26e48c9908
2021-08-06 19:28:33 +02:00
YH_Lin
997e8f03cd
sm6150-common: fstab: Correct zram parameter names
[libfs_mgr]Warning: unknown flag: zram_loopback_path=/data/per_boot/zram_swap
[libfs_mgr]Warning: unknown flag: zram_loopback_size=512M

We don't use zram_loopback_path any longer so remove it.
We also changed zram_loopback_size with zram_backingdev_size so correct it.

Bug: 145330273
Bug: 145116439
Test: confirmed there is no warning and zram backing device was configured

Change-Id: I51be34c59203813a2f493eee6ab442c9940b75d7
Signed-off-by: Minchan Kim <minchan@google.com>
Signed-off-by: YH_Lin <yhli@google.com>
2021-08-06 19:27:29 +02:00
YH_Lin
30494c543a
sm6150-common: fstab: Switch zram swap to /data/per_boot
Put zram writeback backing store into /data/per_boot

Bug: 144354600
Bug: 140882488

Change-Id: I405bc12d4b90b9f236deba23c7c8973311ad7bf4
Signed-off-by: YH_Lin <yhli@google.com>
2021-08-06 19:26:28 +02:00
Jenhao Chen
9010fc737d
sm6150-common: Enable zram writeback
Bug: 128889899
Test: Boot to home

Change-Id: I48ae06e54a66a7d6965afbe8db3d2f157cf8a1f4
2021-08-06 19:25:07 +02:00
Tim Murray
560aefb174
sm6150-common: Increase ZRAM to 2GB
Test: boots, works
bug 119988524

Change-Id: I09272e7c753569d16f2be0771835bfdbdc0bf270
2021-07-23 22:59:07 +02:00
Wei Wang
73becf7452
sm6150-common: Tune zram performance
-Switch to LZ4 for better overall performance
-Set max_comp_streams to num of cores since upstream also moves this to
percpu.
-Set page-cluster to 0 as the incremental cost of reading 1 page at a
time is negligible for zram

Bug: 38249616
Test: boot and run zram-perf showing better performance
Change-Id: I0b92b246d773db85aa03d033b2cecee54347cbd1
2021-07-23 22:54:56 +02:00
Adithya R
b2d8bf6c26
sm6150-common: Configure zram from separate fstab
Change-Id: I3d093f06b08ad1cc049325d0136b60cab70c29d0
2021-07-23 22:53:14 +02:00
Arian
2df667662f
sm6150-common: releasetools: Make firmware assertions region specific
Change-Id: Idfe58815a2623a29a81d23ee7e8d7d75aff967f2
2021-07-16 00:19:26 +02:00
Arian
9dcfed3a3f
sm6150-common: releasetools: Drop support for '*' in modem version
* In case we don't need to assert, it's easier to just leave it empty.

Change-Id: I3d58081315f69d065c4f5694102c3ff5fbf68a24
2021-07-15 18:16:14 +02:00
Arian
7de8311de3
sm6150-common: releasetools: Drop support for multiple modem version
* The modem version is a minimum requirement, hence it's useless to
  assert on multiple modem versions.

Change-Id: I206b05365681d2292417dfbdc78b9faf11e2a295
2021-07-15 18:11:57 +02:00
Arian
2c30dfedda
sm6150-common: releaseteools: Rename timestamp to modem_version
Change-Id: Ieb258d37fccd1a4371183ca73d5c836d9d8d4941
2021-07-15 18:07:04 +02:00
Arian
514f6bb6b0
sm6150-common: sepolicy: Allow power HAL to read idle_state node
Change-Id: I53e0f3ed275a93d6d5cd0001a438221a043e3ea8
2021-07-14 21:05:07 +02:00
Arian
5875449baa
sm6150-common: sepolicy: Label fastrpc adsprpc wakeup nodes
Change-Id: Ia0268c7aa4cc9344e5a2a76dd661ff1a15b747ef
2021-07-14 20:59:14 +02:00
Arian
a73e27936f
sm6150-common: Set permissions on /dev/xiaomi-touch
Change-Id: I94f9b64f983098b6497ffcdee9817c72d471528f
2021-07-13 22:13:56 +02:00
Arian
18ee1a3486
sm6150-common: parts: Rename doze brightness to always on brightness
Change-Id: I0950ee3d5b4bae6ada1a8defcd6a13c20ae222a9
2021-07-12 18:26:36 +02:00