Compare commits

...

10 commits

Author SHA1 Message Date
Jens Reidel
23744d303f
sm8450-common: sensors: Add more padding to oem_msg
Change-Id: Id60a1b5a9c3e39cdf8316ca5f94ca43902cbf917
Signed-off-by: Jens Reidel <adrian@travitia.xyz>
2024-09-03 20:33:50 +02:00
Arian
5e7b3eaff5 sm8450-common: sepolicy: Drop nfc rules which are handled by sepolicy_vndr already
Change-Id: Ifa04e62bc2cb5a9b24cdaf5c6de92edda4613525
2024-09-01 18:22:12 +02:00
Arian
a065ab84cc sm8450-common: sepolicy: Remove xiaomi specific gnss rules
We don't use stock GNSS stock anymore, thus these are not necessary anymore

Change-Id: I730e5101ea69e2c9d456d53a82c30433f916706c
2024-09-01 18:22:12 +02:00
SGCMarkus
3a47074b2f sm8450-common: Unset BOARD_USERDATAIMAGE_PARTITION_SIZE
This not only saves a lot of build time when building with
TARGET_USERIMAGES_SPARSE_EXT_DISABLED and/or
TARGET_USERIMAGES_SPARSE_F2FS_DISABLED which is required
on A14, but also removes the need for the build system to
temporarily create a 40+GB userdata image.
Which means that less free space is required to start the
build.

Change-Id: Ibf48e7cdf566a4653e85352a79170b354d917234
2024-08-30 00:54:37 +02:00
Arian
957e7b171b sm8450-common: udfps: Drop leftover reading of fp vendor
Change-Id: I6c4be210f8f7032192d910e47eca2caa767e7fe8
2024-08-29 22:00:24 +02:00
Arian
84c40bc5ce sm8450-common: sensors: Add v2 suffix to sensors.xiaomi
Change-Id: Ie6ef0e5fd4653eae298a3455edf14e05508e1cfd
2024-08-29 21:06:27 +02:00
Michael Bestas
05e15b74f1 sm8450-common: Sync extract scripts with templates
Change-Id: I98a36854c5a0c0390592911bb2558b34eff77efc
2024-08-29 20:13:14 +02:00
Arian
566a47edfa sm8450-common: Drop modemManager blobs
Change-Id: Ic0d8eff53db30254da2c7cbfab0db4ade1fb1bc8
2024-08-29 19:24:23 +02:00
Arian
cf4d92fbc6 sm8450-common: Drop perf lm blobs
Change-Id: I38a0031ea3f325c67277ed34341e532cf4ff060b
2024-08-29 19:24:23 +02:00
Arian
0e5523fc9e sm8450-common: Drop trusted user interface blobs
Change-Id: I6f52fb63b4ca222eacbe49ad5debfd0624a03e07
2024-08-29 19:24:23 +02:00
16 changed files with 52 additions and 169 deletions

View file

@ -164,7 +164,6 @@ BOARD_BOOTIMAGE_PARTITION_SIZE := 0x0C000000
BOARD_DTBOIMG_PARTITION_SIZE := 0x01800000
BOARD_RECOVERYIMAGE_PARTITION_SIZE := 0x06400000
BOARD_SUPER_PARTITION_SIZE := 9126805504 # 0x220000000
BOARD_USERDATAIMAGE_PARTITION_SIZE := 239033364480 # 0x37A77FB000
BOARD_VENDOR_BOOTIMAGE_PARTITION_SIZE := 0x06000000
BOARD_SUPER_PARTITION_GROUPS := qti_dynamic_partitions

View file

@ -302,7 +302,7 @@ PRODUCT_PACKAGES += \
android.hardware.sensors@2.1-service.xiaomi-multihal
PRODUCT_PACKAGES += \
sensors.xiaomi:64
sensors.xiaomi.v2:64
PRODUCT_PACKAGES += \
sensor-notifier

View file

@ -1,8 +1,7 @@
#!/bin/bash
#
# Copyright (C) 2016 The CyanogenMod Project
# Copyright (C) 2017-2023 The LineageOS Project
#
# SPDX-FileCopyrightText: 2016 The CyanogenMod Project
# SPDX-FileCopyrightText: 2017-2024 The LineageOS Project
# SPDX-License-Identifier: Apache-2.0
#
@ -15,6 +14,10 @@ if [[ ! -d "${MY_DIR}" ]]; then MY_DIR="${PWD}"; fi
ANDROID_ROOT="${MY_DIR}/../../.."
export TARGET_ENABLE_CHECKELF="true"
# If XML files don't have comments before the XML header, use this flag
# Can still be used with broken XML files by using blob_fixup
export TARGET_DISABLE_XML_FIXING=true
HELPER="${ANDROID_ROOT}/tools/extract-utils/extract_utils.sh"
if [ ! -f "${HELPER}" ]; then
echo "Unable to find helper script at ${HELPER}"
@ -30,31 +33,33 @@ ONLY_FIRMWARE=
ONLY_TARGET=
KANG=
SECTION=
CARRIER_SKIP_FILES=()
while [ "${#}" -gt 0 ]; do
case "${1}" in
--only-common )
ONLY_COMMON=true
;;
--only-firmware )
ONLY_FIRMWARE=true
;;
--only-target )
ONLY_TARGET=true
;;
-n | --no-cleanup )
CLEAN_VENDOR=false
;;
-k | --kang )
KANG="--kang"
;;
-s | --section )
SECTION="${2}"; shift
CLEAN_VENDOR=false
;;
* )
SRC="${1}"
;;
--only-common)
ONLY_COMMON=true
;;
--only-firmware)
ONLY_FIRMWARE=true
;;
--only-target)
ONLY_TARGET=true
;;
-n | --no-cleanup)
CLEAN_VENDOR=false
;;
-k | --kang)
KANG="--kang"
;;
-s | --section)
SECTION="${2}"
shift
CLEAN_VENDOR=false
;;
*)
SRC="${1}"
;;
esac
shift
done
@ -66,33 +71,50 @@ fi
function blob_fixup() {
case "${1}" in
system_ext/lib64/libwfdservice.so)
[ "$2" = "" ] && return 0
"${PATCHELF_0_17_2}" --replace-needed "android.media.audio.common.types-V2-cpp.so" "android.media.audio.common.types-V3-cpp.so" "${2}"
;;
vendor/bin/hw/android.hardware.security.keymint-service-qti|vendor/lib64/libqtikeymint.so)
[ "$2" = "" ] && return 0
"${PATCHELF_0_17_2}" --replace-needed "android.hardware.security.keymint-V1-ndk_platform.so" "android.hardware.security.keymint-V1-ndk.so" "${2}"
"${PATCHELF_0_17_2}" --replace-needed "android.hardware.security.secureclock-V1-ndk_platform.so" "android.hardware.security.secureclock-V1-ndk.so" "${2}"
"${PATCHELF_0_17_2}" --replace-needed "android.hardware.security.sharedsecret-V1-ndk_platform.so" "android.hardware.security.sharedsecret-V1-ndk.so" "${2}"
grep -q "android.hardware.security.rkp-V1-ndk.so" "${2}" || "${PATCHELF_0_17_2}" --add-needed "android.hardware.security.rkp-V1-ndk.so" "${2}"
;;
vendor/bin/qcc-trd)
[ "$2" = "" ] && return 0
"${PATCHELF_0_17_2}" --replace-needed "libgrpc++_unsecure.so" "libgrpc++_unsecure_prebuilt.so" "${2}"
;;
vendor/etc/media_codecs_c2_audio.xml)
[ "$2" = "" ] && return 0
sed -i '/media_codecs_dolby_audio/d' "${2}"
;;
vendor/etc/media_codecs_cape.xml|vendor/etc/media_codecs_diwali_v0.xml|vendor/etc/media_codecs_diwali_v1.xml|vendor/etc/media_codecs_diwali_v2.xml|vendor/etc/media_codecs_taro.xml|vendor/etc/media_codecs_ukee.xml)
[ "$2" = "" ] && return 0
sed -i -E '/media_codecs_(google_audio|google_c2|google_telephony|vendor_audio)/d' "${2}"
;;
vendor/etc/qcril_database/upgrade/config/6.0_config.sql)
[ "$2" = "" ] && return 0
sed -i '/persist.vendor.radio.redir_party_num/ s/true/false/g' "${2}"
;;
vendor/etc/vintf/manifest/c2_manifest_vendor.xml)
[ "$2" = "" ] && return 0
sed -i '/dolby/d' "${2}"
;;
vendor/lib64/libgrpc++_unsecure_prebuilt.so)
[ "$2" = "" ] && return 0
"${PATCHELF_0_17_2}" --set-soname "libgrpc++_unsecure_prebuilt.so" "${2}"
;;
*)
return 1
;;
esac
return 0
}
function blob_fixup_dry() {
blob_fixup "$1" ""
}
if [ -z "${ONLY_FIRMWARE}" ] && [ -z "${ONLY_TARGET}" ]; then

View file

@ -516,11 +516,6 @@ vendor/etc/vintf/manifest/manifest_vendor.xiaomi.hardware.mlipay.xml
vendor/lib64/libmlipay.so
vendor/lib64/libmlipay@1.1.so
# Modem manager
vendor/bin/modemManager
vendor/etc/init/modemManager.rc
vendor/etc/seccomp_policy/modemManager.policy
# Native public libraries
vendor/etc/public.libraries.txt
@ -542,57 +537,15 @@ vendor/etc/perf/targetsysnodesconfigs.xml
vendor/etc/perf/thermal-boost.conf
vendor/etc/seccomp_policy/qapeservice.policy
vendor/etc/vintf/manifest/vendor.qti.hardware.perf.xml
vendor/lib64/liblearningmodule.so
vendor/lib64/libmeters.so
vendor/lib64/libperfconfig.so
vendor/lib64/libperfgluelayer.so
vendor/lib64/libperfioctl.so
vendor/lib64/libqti-perfd-client.so
vendor/lib64/libqti-perfd.so
vendor/lib64/libqti-util.so
vendor/lib64/libqti-utils.so
vendor/lib64/libskewknob.so
vendor/lib64/libthermalclient.so
# Perf LM
vendor/bin/hw/vendor.qti.hardware.iop@2.0-service
vendor/bin/perf_qesdk_client
vendor/etc/init/qapeservice.rc
vendor/etc/init/vendor.qti.hardware.iop@2.0-service.rc
vendor/etc/lm/AdaptLaunchFeature.xml
vendor/etc/lm/AppClassifierFeature.xml
vendor/etc/lm/LightningLaunchesFeature.xml
vendor/etc/lm/PreKillFeature.xml
vendor/etc/lm/ProCompFeature.xml
vendor/etc/lm/QAPE.xml
vendor/etc/lm/QGPE.xml
vendor/etc/lm/QGPEActionMap.xml
vendor/etc/lm/SilkyScrollsFeature.xml
vendor/etc/lm/prekill/prekill_2GB.data
vendor/etc/lm/prekill/prekill_4GB.data
vendor/etc/lm/prekill/prekill_6GB.data
vendor/etc/lm/sPLHFeature.xml
vendor/lib64/libadaptlaunch.so
vendor/lib64/libapengine.so
vendor/lib64/libappclassifier.so
vendor/lib64/liblightninglaunches.so
vendor/lib64/liblmthermallistner.so
vendor/lib64/liblmutils-ns.so
vendor/lib64/libmemperfd.so
vendor/lib64/libmeters-ns.so
vendor/lib64/libpasrutils.so
vendor/lib64/libprekill.so
vendor/lib64/libprocomp.so
vendor/lib64/libqapesdk.so
vendor/lib64/libqti-iopd-client.so
vendor/lib64/libqti-iopd.so
vendor/lib64/libsilkyscrolls.so
vendor/lib64/libsplh.so
vendor/lib64/vendor.qti.hardware.iop@1.0.so
vendor/lib64/vendor.qti.hardware.iop@2.0.so
vendor/lib64/vendor.qti.memory.pasrmanager@1.0.so
vendor/lib64/vendor.qti.memory.pasrmanager@1.1.so
vendor/lib64/vendor.qti.power.pasrmanager@1.0.so
# Peripheral manager
vendor/bin/pm-proxy
@ -676,12 +629,6 @@ vendor/lib/vendor.qti.qspmhal@1.0.so
vendor/lib64/vendor.qti.qspmhal@1.0-impl.so
vendor/lib64/vendor.qti.qspmhal@1.0.so
# QTI service tracker
vendor/bin/hw/vendor.qti.hardware.servicetracker@1.2-service
vendor/etc/init/vendor.qti.hardware.servicetracker@1.2-service.rc
vendor/etc/vintf/manifest/vendor.qti.hardware.servicetracker@1.2-service.xml
vendor/lib64/hw/vendor.qti.hardware.servicetracker@1.2-impl.so
# RIL
product/app/uimgbaservice/uimgbaservice.apk
product/etc/permissions/UimGba.xml
@ -1002,25 +949,7 @@ vendor/lib64/libQTEEConnector_vendor.so
vendor/lib64/vendor.qti.hardware.qteeconnector@1.0.so
# Trusted User Interface
vendor/bin/hw/vendor.qti.hardware.trustedui@1.0-service-qti
vendor/bin/hw/vendor.qti.hardware.tui_comm@1.0-service-qti
vendor/bin/trusteduilistener
vendor/etc/init/trusteduilistener.rc
vendor/etc/init/vendor.qti.hardware.trustedui@1.0-service-qti.rc
vendor/etc/init/vendor.qti.hardware.tui_comm@1.0-service-qti.rc
vendor/lib64/libTouchInputVM.so
vendor/lib64/libTrustedInput.so
vendor/lib64/libTrustedInputTZ.so
vendor/lib64/libTrustedInputUtils.so
vendor/lib64/libTrustedUI.so
vendor/lib64/libTrustedUITZ.so
vendor/lib64/libTrustedUIVM.so
vendor/lib64/libminksocket_vendor.so
vendor/lib64/libsi.so
vendor/lib64/vendor.qti.hardware.trustedui@1.0.so
vendor/lib64/vendor.qti.hardware.trustedui@1.1.so
vendor/lib64/vendor.qti.hardware.trustedui@1.2.so
vendor/lib64/vendor.qti.hardware.tui_comm@1.0.so
# VM mem
vendor/lib64/libvmmem.so

View file

@ -1 +1 @@
sensors.xiaomi.so
sensors.xiaomi.v2.so

View file

@ -23,7 +23,7 @@ struct _oem_msg {
float unknown2;
float notifyTypeFloat;
float value;
float unused[10];
float unused[16];
};
typedef void (*init_current_sensors_t)(bool debug);

View file

@ -18,10 +18,6 @@ type vendor_sysfs_displayfeature, fs_type, sysfs_type;
type vendor_fingerprint_data_file, data_file_type, file_type;
type vendor_fingerprint_data_file_fpdump, data_file_type, file_type;
# GNSS
type qx_oss_vendor_data_file, data_file_type, file_type;
type vendor_ins_vendor_data_file, data_file_type, file_type;
# Mac Address
type vendor_mac_vendor_data_file, data_file_type, file_type, mlstrustedobject;

View file

@ -50,11 +50,6 @@
/mnt/vendor/persist/goodix(/.*)? u:object_r:vendor_fingerprint_data_file:s0
/(vendor|system/vendor)/bin/hw/android\.hardware\.biometrics\.fingerprint@2\.3-service\.xiaomi u:object_r:hal_fingerprint_default_exec:s0
# GNSS
/data/vendor/ins(/.*)? u:object_r:vendor_ins_vendor_data_file:s0
/data/vendor/qxwz(/.*)? u:object_r:qx_oss_vendor_data_file:s0
/mnt/vendor/persist/qxwz u:object_r:qx_oss_vendor_data_file:s0
# IR
/dev/lirc[0-9]+ u:object_r:lirc_device:s0
/vendor/bin/hw/android\.hardware\.ir-service\.xiaomi u:object_r:hal_ir_default_exec:s0

View file

@ -1,8 +0,0 @@
allow vendor_hal_gnss_qti vendor_ins_vendor_data_file:dir rw_dir_perms;
allow vendor_hal_gnss_qti vendor_ins_vendor_data_file:file create_file_perms;
allow vendor_hal_gnss_qti vendor_persist_sensors_file:dir rw_dir_perms;
allow vendor_hal_gnss_qti vendor_persist_sensors_file:file create_file_perms;
allow vendor_hal_gnss_qti mnt_vendor_file:dir search;
allow vendor_hal_gnss_qti mnt_vendor_file:dir rw_dir_perms;
get_prop(vendor_hal_gnss_qti, vendor_sensors_prop)
get_prop(vendor_hal_gnss_qti, vendor_mi_ins_prop)

View file

@ -1,2 +0,0 @@
allow hal_nfc_default vendor_nfc_vendor_data_file:dir create_dir_perms;
allow hal_nfc_default vendor_nfc_vendor_data_file:file create_file_perms;

View file

@ -2,5 +2,4 @@ set_prop(vendor_init, vendor_fp_prop)
set_prop(vendor_init, vendor_fp_info_prop)
set_prop(vendor_init, vendor_thermal_normal_prop)
set_prop(vendor_init, vendor_ssr_prop)
set_prop(vendor_init, vendor_edgnss_qxwz_downloadak_prop)
set_prop(vendor_init, vendor_qcc_prop)

View file

@ -11,10 +11,6 @@ vendor_public_prop(vendor_cpuid_prop)
vendor_restricted_prop(vendor_fp_info_prop)
vendor_public_prop(vendor_fp_prop)
# GNSS
vendor_public_prop(vendor_edgnss_qxwz_downloadak_prop)
vendor_public_prop(vendor_mi_ins_prop)
# Mlipay
vendor_public_prop(vendor_payment_security_prop)

View file

@ -19,9 +19,6 @@ vendor.fps_hal. u:object_r:vendor_fp_prop:s0
vendor.panel.display. u:object_r:vendor_fp_prop:s0
ro.hardware.fp.udfps u:object_r:vendor_fp_prop:s0
# GNSS
ro.vendor.gnss.edgnss.downloadQxwzAk u:object_r:vendor_edgnss_qxwz_downloadak_prop:s0
# Panel
vendor.panel. u:object_r:vendor_panel_info_prop:s0
@ -35,9 +32,5 @@ persist.vendor.sys.provision.status u:object_r:vendor_payment_security_prop:s0
vendor.sys.feature_state u:object_r:vendor_payment_security_prop:s0
vendor.sys.rpmb_state u:object_r:vendor_payment_security_prop:s0
# Sensors
persist.vendor.sensors.ins. u:object_r:vendor_mi_ins_prop:s0
persist.vendor.sensors.ins_debug u:object_r:vendor_mi_ins_prop:s0
# Thermal
vendor.sys.thermal.data.path u:object_r:vendor_thermal_normal_prop:s0

View file

@ -1,8 +1,7 @@
#!/bin/bash
#
# Copyright (C) 2016 The CyanogenMod Project
# Copyright (C) 2017-2023 The LineageOS Project
#
# SPDX-FileCopyrightText: 2016 The CyanogenMod Project
# SPDX-FileCopyrightText: 2017-2024 The LineageOS Project
# SPDX-License-Identifier: Apache-2.0
#

View file

@ -95,10 +95,6 @@ class XiaomiSm8450UdfpsHander : public UdfpsHandler {
touch_fd_ = android::base::unique_fd(open(TOUCH_DEV_PATH, O_RDWR));
disp_fd_ = android::base::unique_fd(open(DISP_FEATURE_PATH, O_RDWR));
std::string fpVendor = android::base::GetProperty("persist.vendor.sys.fp.vendor", "none");
LOG(DEBUG) << __func__ << "fingerprint vendor is: " << fpVendor;
isFpcFod = fpVendor == "fpc_fod";
// Thread to notify fingeprint hwmodule about fod presses
std::thread([this]() {
int fd = open(FOD_PRESS_STATUS_PATH, O_RDONLY);
@ -220,7 +216,6 @@ class XiaomiSm8450UdfpsHander : public UdfpsHandler {
fingerprint_device_t* mDevice;
android::base::unique_fd touch_fd_;
android::base::unique_fd disp_fd_;
bool isFpcFod;
uint32_t lastPressX, lastPressY;
void setFingerDown(bool pressed) {

View file

@ -422,16 +422,6 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<instance>default</instance>
</interface>
</hal>
<!-- IOP HAL service -->
<hal format="hidl">
<name>vendor.qti.hardware.iop</name>
<transport>hwbinder</transport>
<version>2.0</version>
<interface>
<name>IIop</name>
<instance>default</instance>
</interface>
</hal>
<!-- Secure image data processor HAL Service -->
<hal format="hidl">
<name>vendor.qti.hardware.secureprocessor.device</name>
@ -480,17 +470,6 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<instance>default</instance>
</interface>
</hal>
<!--TuiComm-->
<hal format="hidl">
<name>vendor.qti.hardware.tui_comm</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>ITuiComm</name>
<instance>default</instance>
</interface>
</hal>
<!--TuiComm-->
<!-- Soter service -->
<hal format="hidl">
<name>vendor.qti.hardware.soter</name>
@ -564,15 +543,6 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<instance>default</instance>
</interface>
</hal>
<!-- Trusted UI HAL Service -->
<hal format="hidl">
<name>vendor.qti.hardware.trustedui</name>
<transport>hwbinder</transport>
<fqname>@1.2::ITrustedUI/default</fqname>
<fqname>@1.2::ITrustedUI/qtee-vm</fqname>
<fqname>@1.1::ITrustedInput/default</fqname>
<fqname>@1.1::ITrustedInput/qtee-vm</fqname>
</hal>
<!-- BluetoothSar service-->
<hal format="hidl">
<name>vendor.qti.hardware.bluetooth_sar</name>