sm8550-common: add shim for libhypervintf

* Needed by camera, we don't use hyper HAL.

Co-authored-by: chaptsand <chaptsand@gmail.com>
Co-authored-by: pckotzer <thegamethis@outlook.com>
Change-Id: I823e9286fe2b8ad2320b83cca0e6f59707c30f5b
This commit is contained in:
Josip Kelecic
2022-12-10 17:38:33 +01:00
committed by chaptsand
parent e8ab765331
commit 4649cac293
13 changed files with 43 additions and 42 deletions

View File

@@ -39,7 +39,6 @@ lib_fixups: lib_fixups_user_type = {
'vendor.qti.diaghal@1.0', 'vendor.qti.diaghal@1.0',
'libsecril-client', 'libsecril-client',
'vendor.qti.hardware.fm@1.0', 'vendor.qti.hardware.fm@1.0',
'libhyper',
): lib_fixup_vendor_suffix, ): lib_fixup_vendor_suffix,
( (
'libagmclient', 'libagmclient',

11
libshims/Android.bp Normal file
View File

@@ -0,0 +1,11 @@
//
// Copyright (C) 2024 The LineageOS Project
//
// SPDX-License-Identifier: Apache-2.0
//
cc_library_shared {
name: "libhypervintf",
srcs: ["libhypervintf/libhypervintf.cpp"],
vendor: true,
}

View File

@@ -0,0 +1,32 @@
/*
* Copyright (C) 2024 The LineageOS Project
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <string>
#include <vector>
struct HyPerToken {
};
void hyper_getNewHyPerToken(void) {
}
void hyper_setTokenProcName(HyPerToken*, std::string) {
}
void hyper_checkResourceExist(int) {
}
void hyper_acquire(HyPerToken, std::vector<int>) {
}
void hyper_setProcName(std::string) {
}
void hyper_getSupportedFrequency(int, int) {
}
void hyper_release(HyPerToken) {
}

View File

@@ -875,11 +875,6 @@ system_ext/etc/permissions/com.android.hotwordenrollment.common.util.xml
system_ext/framework/com.android.hotwordenrollment.common.util.jar system_ext/framework/com.android.hotwordenrollment.common.util.jar
# HyPer # HyPer
vendor/bin/hw/vendor.samsung.hardware.hyper-service
vendor/etc/init/hyper-default-sec.rc
vendor/etc/vintf/manifest/hyper-default-sec.xml
vendor/lib64/libhyper.so;MODULE_SUFFIX=_vendor
vendor/lib64/libhypervintf.so
vendor/lib64/vendor.samsung.hardware.hyper-V2-ndk.so vendor/lib64/vendor.samsung.hardware.hyper-V2-ndk.so
# IMS # IMS

View File

@@ -1,4 +0,0 @@
# Hyper
attribute hal_hyper;
attribute hal_hyper_server;
attribute hal_hyper_client;

View File

@@ -78,7 +78,6 @@
/(vendor|system/vendor)/bin/hw/nxp\.android\.hardware\.nfc@1\.2-service u:object_r:hal_nfc_default_exec:s0 /(vendor|system/vendor)/bin/hw/nxp\.android\.hardware\.nfc@1\.2-service u:object_r:hal_nfc_default_exec:s0
/(vendor|system/vendor)/bin/hw/sehradiomanager u:object_r:sehradiomanager_exec:s0 /(vendor|system/vendor)/bin/hw/sehradiomanager u:object_r:sehradiomanager_exec:s0
/(vendor|system/vendor)/bin/hw/vendor\.samsung\.hardware\.camera\.provider-service_64 u:object_r:hal_camera_default_exec:s0 /(vendor|system/vendor)/bin/hw/vendor\.samsung\.hardware\.camera\.provider-service_64 u:object_r:hal_camera_default_exec:s0
/(vendor|system/vendor)/bin/hw/vendor\.samsung\.hardware\.hyper-service u:object_r:hal_hyper_default_exec:s0
/(vendor|system/vendor)/bin/hw/vendor\.samsung\.hardware\.thermal@1\.0-service u:object_r:hal_thermal_default_exec:s0 /(vendor|system/vendor)/bin/hw/vendor\.samsung\.hardware\.thermal@1\.0-service u:object_r:hal_thermal_default_exec:s0
/(vendor|system/vendor)/bin/hw/vendor\.samsung\.hardware\.vibrator-service u:object_r:hal_vibrator_default_exec:s0 /(vendor|system/vendor)/bin/hw/vendor\.samsung\.hardware\.vibrator-service u:object_r:hal_vibrator_default_exec:s0
/(vendor|system/vendor)/bin/secril_config_svc u:object_r:vendor_secril_config_svc_exec:s0 /(vendor|system/vendor)/bin/secril_config_svc u:object_r:vendor_secril_config_svc_exec:s0

View File

@@ -23,7 +23,6 @@ r_dir_file(hal_camera_default, vendor_sysfs_sensors)
# Allow camera HAL to read proc_meminfo # Allow camera HAL to read proc_meminfo
allow hal_camera_default proc_meminfo:file r_file_perms; allow hal_camera_default proc_meminfo:file r_file_perms;
hal_client_domain(hal_camera_default, hal_hyper)
hal_client_domain(hal_camera_default, hal_thermal) hal_client_domain(hal_camera_default, hal_thermal)
get_prop(hal_camera_default, sec_camera_prop) get_prop(hal_camera_default, sec_camera_prop)

View File

@@ -1,15 +0,0 @@
type hal_hyper_default, domain;
hal_server_domain(hal_hyper_default, hal_hyper)
type hal_hyper_default_exec, exec_type, vendor_file_type, file_type;
init_daemon_domain(hal_hyper_default)
binder_call(hal_hyper_client, hal_hyper_server)
add_service(hal_hyper_server, hal_hyper_service)
allow hal_hyper_client hal_hyper_service:service_manager find;
allow hal_hyper_default servicemanager:binder { call transfer };
get_prop(hal_hyper_default, product_ship_prop)

View File

@@ -15,5 +15,3 @@ allow hal_power_default vendor_sysfs_touchscreen_writable:file rw_file_perms;
# Allow power HAL to to read/write vendor_sysfs_battery # Allow power HAL to to read/write vendor_sysfs_battery
allow hal_power_default vendor_sysfs_battery:dir r_dir_perms; allow hal_power_default vendor_sysfs_battery:dir r_dir_perms;
allow hal_power_default vendor_sysfs_battery:file rw_file_perms; allow hal_power_default vendor_sysfs_battery:file rw_file_perms;
hal_client_domain(hal_power_default, hal_hyper)

View File

@@ -12,7 +12,6 @@ allow hal_thermal_default fwk_camera_hwservice:hwservice_manager find;
binder_call(hal_thermal_default, cameraserver) binder_call(hal_thermal_default, cameraserver)
hal_client_domain(hal_thermal_default, hal_audio) hal_client_domain(hal_thermal_default, hal_audio)
hal_client_domain(hal_thermal_default, hal_hyper)
unix_socket_connect(hal_thermal_default, property, rild) unix_socket_connect(hal_thermal_default, property, rild)
get_prop(hal_thermal_default, vendor_thermal_prop) get_prop(hal_thermal_default, vendor_thermal_prop)

View File

@@ -1 +0,0 @@
type hal_hyper_service, hal_service_type, service_manager_type;

View File

@@ -1,6 +1,3 @@
# Hyper
vendor.samsung.hardware.hyper.ISehHyPer/default u:object_r:hal_hyper_service:s0
# Gnss # Gnss
vendor.samsung.hardware.gnss.ISehGnss/default u:object_r:hal_gnss_service:s0 vendor.samsung.hardware.gnss.ISehGnss/default u:object_r:hal_gnss_service:s0

View File

@@ -109,14 +109,6 @@
<instance>default</instance> <instance>default</instance>
</interface> </interface>
</hal> </hal>
<hal format="aidl" optional="true">
<name>vendor.samsung.hardware.hyper</name>
<version>2</version>
<interface>
<name>ISehHyPer</name>
<instance>default</instance>
</interface>
</hal>
<hal format="aidl" optional="true"> <hal format="aidl" optional="true">
<name>vendor.samsung.hardware.bluetooth.audio</name> <name>vendor.samsung.hardware.bluetooth.audio</name>
<interface> <interface>