sm7250-common: biometrics/fod: Uprev to 2.3

* [SebaUbuntu]: Move fingerprint HIDL to 2.3
 * Remove Lineage FOD HIDL
 * Rename fodextension to udfpsextension

Change-Id: I292bbb9509de89eb9031daebab3cb5b2e5411d21
This commit is contained in:
TheScarastic 2022-03-25 23:32:52 +01:00 committed by xSylla
parent 945f0e2b6d
commit e2acea18d7
17 changed files with 139 additions and 378 deletions

View File

@ -72,10 +72,12 @@ TARGET_ENABLE_MEDIADRM_64 := true
TARGET_FS_CONFIG_GEN := $(COMMON_PATH)/config.fs
# Fingerprint
SOONG_CONFIG_NAMESPACES += XIAOMI_LITO_FINGERPRINT
SOONG_CONFIG_XIAOMI_LITO_FINGERPRINT := FOD
SOONG_CONFIG_XIAOMI_LITO_FINGERPRINT_FOD ?= false
ifeq ($(TARGET_HAS_FOD),true)
SOONG_CONFIG_NAMESPACES += XIAOMI_LITO_FOD
SOONG_CONFIG_XIAOMI_LITO_FOD := POS_X POS_Y SIZE
TARGET_SURFACEFLINGER_FOD_LIB := //$(COMMON_PATH):libfod_extension.xiaomi_lito
SOONG_CONFIG_XIAOMI_LITO_FINGERPRINT_FOD := true
TARGET_SURFACEFLINGER_UDFPS_LIB := //$(COMMON_PATH):libudfps_extension.xiaomi_lito
endif
# FM

View File

@ -1,20 +1,43 @@
soong_config_module_type {
name: "xiaomi_lito_fingerprint_hal_cc_defaults",
module_type: "cc_defaults",
config_namespace: "XIAOMI_LITO_FINGERPRINT",
bool_variables: ["FOD"],
properties: ["cppflags"],
}
xiaomi_lito_fingerprint_hal_cc_defaults {
name: "xiaomi_lito_fingerprint_hal_defaults",
soong_config_variables: {
FOD: {
cppflags: ["-DFOD"],
},
},
}
cc_binary {
name: "android.hardware.biometrics.fingerprint@2.1-service.xiaomi_lito",
defaults: ["hidl_defaults"],
name: "android.hardware.biometrics.fingerprint@2.3-service.xiaomi_lito",
defaults: [
"hidl_defaults",
"xiaomi_lito_fingerprint_hal_defaults",
],
relative_install_path: "hw",
init_rc: ["android.hardware.biometrics.fingerprint@2.1-service.xiaomi_lito.rc"],
vintf_fragments: ["android.hardware.biometrics.fingerprint@2.1-service.xiaomi_lito.xml"],
init_rc: ["android.hardware.biometrics.fingerprint@2.3-service.xiaomi_lito.rc"],
vintf_fragments: ["android.hardware.biometrics.fingerprint@2.3-service.xiaomi_lito.xml"],
srcs: [
"BiometricsFingerprint.cpp",
"service.cpp",
],
shared_libs: [
"libbase",
"libcutils",
"liblog",
"libhidlbase",
"libhardware",
"libutils",
"android.hardware.biometrics.fingerprint@2.1",
"android.hardware.biometrics.fingerprint@2.2",
"android.hardware.biometrics.fingerprint@2.3",
"//hardware/xiaomi:vendor.xiaomi.hardware.fingerprintextension@1.0",
],
vendor: true,

View File

@ -14,22 +14,25 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#define LOG_TAG "android.hardware.biometrics.fingerprint@2.1-service.xiaomi_lito"
#define LOG_VERBOSE "android.hardware.biometrics.fingerprint@2.1-service.xiaomi_lito"
#define LOG_TAG "android.hardware.biometrics.fingerprint@2.3-service.xiaomi_lito"
#define LOG_VERBOSE "android.hardware.biometrics.fingerprint@2.3-service.xiaomi_lito"
#include <android-base/logging.h>
#include <hardware/hw_auth_token.h>
#include "xiaomi_fingerprint.h"
#include "BiometricsFingerprint.h"
#include <inttypes.h>
#include <poll.h>
#include <thread>
#include <unistd.h>
namespace android {
namespace hardware {
namespace biometrics {
namespace fingerprint {
namespace V2_1 {
namespace V2_3 {
namespace implementation {
// Supported fingerprint HAL version
@ -47,6 +50,31 @@ using RequestStatus =
BiometricsFingerprint *BiometricsFingerprint::sInstance = nullptr;
#define COMMAND_NIT 10
#define PARAM_NIT_FOD 1
#define PARAM_NIT_NONE 0
#define FOD_UI_PATH "/sys/devices/platform/soc/soc:qcom,dsi-display-primary/fod_ui"
static bool readBool(int fd) {
char c;
int rc;
rc = lseek(fd, 0, SEEK_SET);
if (rc) {
LOG(ERROR) << "failed to seek fd, err: " << rc;
return false;
}
rc = read(fd, &c, sizeof(char));
if (rc != 1) {
LOG(ERROR) << "failed to read bool from fd, err: " << rc;
return false;
}
return c != '0';
}
BiometricsFingerprint::BiometricsFingerprint() : mClientCallback(nullptr), mDevice(nullptr) {
sInstance = this; // keep track of the most recent instance
for (const auto& class_name : kHALClasses) {
@ -58,6 +86,32 @@ BiometricsFingerprint::BiometricsFingerprint() : mClientCallback(nullptr), mDevi
break;
}
}
#ifdef FOD
std::thread([this]() {
int fd = open(FOD_UI_PATH, O_RDONLY);
if (fd < 0) {
LOG(ERROR) << "failed to open fd, err: " << fd;
return;
}
struct pollfd fodUiPoll = {
.fd = fd,
.events = POLLERR | POLLPRI,
.revents = 0,
};
while (true) {
int rc = poll(&fodUiPoll, 1, -1);
if (rc < 0) {
LOG(ERROR) << "failed to poll fd, err: " << rc;
continue;
}
extCmd(COMMAND_NIT, readBool(fd) ? PARAM_NIT_FOD : PARAM_NIT_NONE);
}
}).detach();
#endif
}
BiometricsFingerprint::~BiometricsFingerprint() {
@ -369,13 +423,30 @@ void BiometricsFingerprint::notify(const fingerprint_msg_t *msg) {
}
}
Return<bool> BiometricsFingerprint::isUdfps(uint32_t /*sensorId*/) {
#if FOD
return true;
#else
return false;
#endif
}
Return<void> BiometricsFingerprint::onFingerDown(uint32_t /*x*/, uint32_t /*y*/,
float /*minor*/, float /*major*/) {
return Void();
}
Return<void> BiometricsFingerprint::onFingerUp() {
return Void();
}
Return<int32_t> BiometricsFingerprint::extCmd(int32_t cmd, int32_t param) {
return mDevice->extCmd(mDevice, cmd, param);
}
} // namespace implementation
} // namespace V2_1
} // namespace V2_3
} // namespace fingerprint
} // namespace biometrics
} // namespace hardware
} // namespace android
} // namespace android

View File

@ -15,25 +15,27 @@
* limitations under the License.
*/
#ifndef ANDROID_HARDWARE_BIOMETRICS_FINGERPRINT_V2_1_BIOMETRICSFINGERPRINT_H
#define ANDROID_HARDWARE_BIOMETRICS_FINGERPRINT_V2_1_BIOMETRICSFINGERPRINT_H
#ifndef ANDROID_HARDWARE_BIOMETRICS_FINGERPRINT_V2_3_BIOMETRICSFINGERPRINT_H
#define ANDROID_HARDWARE_BIOMETRICS_FINGERPRINT_V2_3_BIOMETRICSFINGERPRINT_H
#include <log/log.h>
#include <android/log.h>
#include "xiaomi_fingerprint.h"
#include <hidl/MQDescriptor.h>
#include <hidl/Status.h>
#include <android/hardware/biometrics/fingerprint/2.1/IBiometricsFingerprint.h>
#include <android/hardware/biometrics/fingerprint/2.3/IBiometricsFingerprint.h>
#include <vendor/xiaomi/hardware/fingerprintextension/1.0/IXiaomiFingerprint.h>
namespace android {
namespace hardware {
namespace biometrics {
namespace fingerprint {
namespace V2_1 {
namespace V2_3 {
namespace implementation {
using ::android::hardware::biometrics::fingerprint::V2_1::IBiometricsFingerprint;
using ::android::hardware::biometrics::fingerprint::V2_3::IBiometricsFingerprint;
using ::android::hardware::biometrics::fingerprint::V2_1::FingerprintAcquiredInfo;
using ::android::hardware::biometrics::fingerprint::V2_1::FingerprintError;
using ::android::hardware::biometrics::fingerprint::V2_1::IBiometricsFingerprintClientCallback;
using ::android::hardware::biometrics::fingerprint::V2_1::RequestStatus;
using ::android::hardware::Return;
@ -64,6 +66,11 @@ public:
Return<RequestStatus> setActiveGroup(uint32_t gid, const hidl_string& storePath) override;
Return<RequestStatus> authenticate(uint64_t operationId, uint32_t gid) override;
// Methods from ::android::hardware::biometrics::fingerprint::V2_3::IBiometricsFingerprint follow.
Return<bool> isUdfps(uint32_t sensorId) override;
Return<void> onFingerDown(uint32_t x, uint32_t y, float minor, float major) override;
Return<void> onFingerUp() override;
// Methods from ::vendor::xiaomi::hardware::fingerprintextension::V1_0::IXiaomiFingerprint follow.
Return<int32_t> extCmd(int32_t cmd, int32_t param) override;
@ -81,10 +88,10 @@ private:
};
} // namespace implementation
} // namespace V2_1
} // namespace V2_3
} // namespace fingerprint
} // namespace biometrics
} // namespace hardware
} // namespace android
#endif // ANDROID_HARDWARE_BIOMETRICS_FINGERPRINT_V2_1_BIOMETRICSFINGERPRINT_H
#endif // ANDROID_HARDWARE_BIOMETRICS_FINGERPRINT_V2_3_BIOMETRICSFINGERPRINT_H

View File

@ -1,4 +1,4 @@
service vendor.fps_hal /vendor/bin/hw/android.hardware.biometrics.fingerprint@2.1-service.xiaomi_lito
service vendor.fps_hal /vendor/bin/hw/android.hardware.biometrics.fingerprint@2.3-service.xiaomi_lito
# "class hal" causes a race condition on some devices due to files created
# in /data. As a workaround, postpone startup until later in boot once
# /data is mounted.
@ -42,6 +42,9 @@ on boot
chmod 0744 /sys/class/drm/card0-DSI-1/panel_info
chmod 0666 /dev/input/event2
chown system system /sys/devices/platform/soc/soc:qcom,dsi-display-primary/fod_ui
chmod 0444 /sys/devices/platform/soc/soc:qcom,dsi-display-primary/fod_ui
on post-fs-data
mkdir /data/vendor/fpc 0770 system system
mkdir /data/vendor/goodix 0770 system system

View File

@ -2,7 +2,7 @@
<hal format="hidl">
<name>android.hardware.biometrics.fingerprint</name>
<transport>hwbinder</transport>
<version>2.1</version>
<version>2.3</version>
<interface>
<name>IBiometricsFingerprint</name>
<instance>default</instance>

View File

@ -14,18 +14,18 @@
* limitations under the License.
*/
#define LOG_TAG "android.hardware.biometrics.fingerprint@2.1-service.xiaomi_lito"
#define LOG_TAG "android.hardware.biometrics.fingerprint@2.3-service.xiaomi_lito"
#include <android/log.h>
#include <hidl/HidlSupport.h>
#include <hidl/HidlTransportSupport.h>
#include <android/hardware/biometrics/fingerprint/2.1/IBiometricsFingerprint.h>
#include <android/hardware/biometrics/fingerprint/2.1/types.h>
#include <android/hardware/biometrics/fingerprint/2.3/IBiometricsFingerprint.h>
#include <android/hardware/biometrics/fingerprint/2.2/types.h>
#include <vendor/xiaomi/hardware/fingerprintextension/1.0/IXiaomiFingerprint.h>
#include "BiometricsFingerprint.h"
using android::hardware::biometrics::fingerprint::V2_1::IBiometricsFingerprint;
using android::hardware::biometrics::fingerprint::V2_1::implementation::BiometricsFingerprint;
using android::hardware::biometrics::fingerprint::V2_3::IBiometricsFingerprint;
using android::hardware::biometrics::fingerprint::V2_3::implementation::BiometricsFingerprint;
using android::hardware::configureRpcThreadpool;
using android::hardware::joinRpcThreadpool;
using android::sp;

View File

@ -4,56 +4,9 @@
// SPDX-License-Identifier: Apache-2.0
//
soong_config_module_type {
name: "xiaomi_lito_fod_hal_cc_defaults",
module_type: "cc_defaults",
config_namespace: "XIAOMI_LITO_FOD",
value_variables: ["POS_X", "POS_Y", "SIZE"],
properties: ["cppflags"],
}
xiaomi_lito_fod_hal_cc_defaults {
name: "xiaomi_lito_fod_hal_defaults",
soong_config_variables: {
POS_X: {
cppflags: ["-DFOD_POS_X=%s"],
},
POS_Y: {
cppflags: ["-DFOD_POS_Y=%s"],
},
SIZE: {
cppflags: ["-DFOD_SIZE=%s"],
},
},
}
cc_binary {
name: "vendor.lineage.biometrics.fingerprint.inscreen@1.0-service.xiaomi_lito",
defaults: [
"hidl_defaults",
"xiaomi_lito_fod_hal_defaults",
],
relative_install_path: "hw",
init_rc: ["vendor.lineage.biometrics.fingerprint.inscreen@1.0-service.xiaomi_lito.rc"],
vintf_fragments: ["vendor.lineage.biometrics.fingerprint.inscreen@1.0-service.xiaomi_lito.xml"],
srcs: ["service.cpp", "FingerprintInscreen.cpp"],
shared_libs: [
"libbase",
"libhardware",
"libhardware_legacy",
"libhidlbase",
"liblog",
"libutils",
"vendor.lineage.biometrics.fingerprint.inscreen@1.0",
"//hardware/xiaomi:vendor.goodix.hardware.biometrics.fingerprint@2.1",
"//hardware/xiaomi:vendor.xiaomi.hardware.fingerprintextension@1.0",
],
vendor: true,
}
cc_library_static {
name: "libfod_extension.xiaomi_lito",
srcs: ["FodExtension.cpp"],
name: "libudfps_extension.xiaomi_lito",
srcs: ["UdfpsExtension.cpp"],
include_dirs: [
"frameworks/native/services/surfaceflinger/CompositionEngine/include"
],

View File

@ -1,149 +0,0 @@
/*
* Copyright (C) 2019-2021 The LineageOS Project
*
* SPDX-License-Identifier: Apache-2.0
*/
#define LOG_TAG "FingerprintInscreenService"
#include "FingerprintInscreen.h"
#include <android-base/logging.h>
#include <hardware_legacy/power.h>
#include <cmath>
#include <fcntl.h>
#include <fstream>
#include <thread>
#include <poll.h>
#include <sys/stat.h>
#define COMMAND_NIT 10
#define PARAM_NIT_FOD 1
#define PARAM_NIT_NONE 0
#define FOD_UI_PATH "/sys/devices/platform/soc/soc:qcom,dsi-display-primary/fod_ui"
namespace vendor {
namespace lineage {
namespace biometrics {
namespace fingerprint {
namespace inscreen {
namespace V1_0 {
namespace implementation {
static bool readBool(int fd) {
char c;
int rc;
rc = lseek(fd, 0, SEEK_SET);
if (rc) {
LOG(ERROR) << "failed to seek fd, err: " << rc;
return false;
}
rc = read(fd, &c, sizeof(char));
if (rc != 1) {
LOG(ERROR) << "failed to read bool from fd, err: " << rc;
return false;
}
return c != '0';
}
FingerprintInscreen::FingerprintInscreen() {
mXiaomiFingerprintService = IXiaomiFingerprint::getService();
std::thread([this]() {
int fd = open(FOD_UI_PATH, O_RDONLY);
if (fd < 0) {
LOG(ERROR) << "failed to open fd, err: " << fd;
return;
}
struct pollfd fodUiPoll = {
.fd = fd,
.events = POLLERR | POLLPRI,
.revents = 0,
};
while (true) {
int rc = poll(&fodUiPoll, 1, -1);
if (rc < 0) {
LOG(ERROR) << "failed to poll fd, err: " << rc;
continue;
}
mXiaomiFingerprintService->extCmd(COMMAND_NIT,
readBool(fd) ? PARAM_NIT_FOD : PARAM_NIT_NONE);
}
}).detach();
}
Return<void> FingerprintInscreen::onStartEnroll() {
return Void();
}
Return<void> FingerprintInscreen::onFinishEnroll() {
return Void();
}
Return<void> FingerprintInscreen::onPress() {
return Void();
}
Return<void> FingerprintInscreen::onRelease() {
return Void();
}
Return<void> FingerprintInscreen::onShowFODView() {
return Void();
}
Return<void> FingerprintInscreen::onHideFODView() {
return Void();
}
Return<bool> FingerprintInscreen::handleAcquired(int32_t acquiredInfo, int32_t vendorCode) {
LOG(ERROR) << "acquiredInfo: " << acquiredInfo << ", vendorCode: " << vendorCode;
return false;
}
Return<bool> FingerprintInscreen::handleError(int32_t error, int32_t vendorCode) {
LOG(ERROR) << "error: " << error << ", vendorCode: " << vendorCode;
return false;
}
Return<void> FingerprintInscreen::setLongPressEnabled(bool) {
return Void();
}
Return<int32_t> FingerprintInscreen::getDimAmount(int32_t /* brightness */) {
return 0;
}
Return<bool> FingerprintInscreen::shouldBoostBrightness() {
return false;
}
Return<void> FingerprintInscreen::setCallback(const sp<IFingerprintInscreenCallback>& /* callback */) {
return Void();
}
Return<int32_t> FingerprintInscreen::getPositionX() {
return FOD_POS_X;
}
Return<int32_t> FingerprintInscreen::getPositionY() {
return FOD_POS_Y;
}
Return<int32_t> FingerprintInscreen::getSize() {
return FOD_SIZE;
}
} // namespace implementation
} // namespace V1_0
} // namespace inscreen
} // namespace fingerprint
} // namespace biometrics
} // namespace lineage
} // namespace vendor

View File

@ -1,58 +0,0 @@
/*
* Copyright (C) 2019-2021 The LineageOS Project
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef VENDOR_LINEAGE_BIOMETRICS_FINGERPRINT_INSCREEN_V1_0_FINGERPRINTINSCREEN_H
#define VENDOR_LINEAGE_BIOMETRICS_FINGERPRINT_INSCREEN_V1_0_FINGERPRINTINSCREEN_H
#include <vendor/lineage/biometrics/fingerprint/inscreen/1.0/IFingerprintInscreen.h>
#include <vendor/xiaomi/hardware/fingerprintextension/1.0/IXiaomiFingerprint.h>
namespace vendor {
namespace lineage {
namespace biometrics {
namespace fingerprint {
namespace inscreen {
namespace V1_0 {
namespace implementation {
using ::android::sp;
using ::android::hardware::Return;
using ::android::hardware::Void;
using ::vendor::xiaomi::hardware::fingerprintextension::V1_0::IXiaomiFingerprint;
class FingerprintInscreen : public IFingerprintInscreen {
public:
FingerprintInscreen();
Return<void> onStartEnroll() override;
Return<void> onFinishEnroll() override;
Return<void> onPress() override;
Return<void> onRelease() override;
Return<void> onShowFODView() override;
Return<void> onHideFODView() override;
Return<bool> handleAcquired(int32_t acquiredInfo, int32_t vendorCode) override;
Return<bool> handleError(int32_t error, int32_t vendorCode) override;
Return<void> setLongPressEnabled(bool enabled) override;
Return<int32_t> getDimAmount(int32_t cur_brightness) override;
Return<bool> shouldBoostBrightness() override;
Return<void> setCallback(const sp<IFingerprintInscreenCallback>& callback) override;
Return<int32_t> getPositionX() override;
Return<int32_t> getPositionY() override;
Return<int32_t> getSize() override;
private:
sp<IXiaomiFingerprint> mXiaomiFingerprintService;
};
} // namespace implementation
} // namespace V1_0
} // namespace inscreen
} // namespace fingerprint
} // namespace biometrics
} // namespace lineage
} // namespace vendor
#endif // VENDOR_LINEAGE_BIOMETRICS_FINGERPRINT_INSCREEN_V1_0_FINGERPRINTINSCREEN_H

View File

@ -4,16 +4,16 @@
* SPDX-License-Identifier: Apache-2.0
*/
#include <compositionengine/FodExtension.h>
#include <compositionengine/UdfpsExtension.h>
#include <drm/sde_drm.h>
uint32_t getFodZOrder(uint32_t z, bool touched) {
uint32_t getUdfpsZOrder(uint32_t z, bool touched) {
if (touched) {
z |= FOD_PRESSED_LAYER_ZORDER;
}
return z;
}
uint64_t getFodUsageBits(uint64_t usageBits, bool) {
uint64_t getUdfpsUsageBits(uint64_t usageBits, bool) {
return usageBits;
}

View File

@ -1,40 +0,0 @@
/*
* Copyright (C) 2019-2021 The LineageOS Project
*
* SPDX-License-Identifier: Apache-2.0
*/
#define LOG_TAG "vendor.lineage.biometrics.fingerprint.inscreen@1.0-service.xiaomi_lito"
#include <android-base/logging.h>
#include <hidl/HidlTransportSupport.h>
#include "FingerprintInscreen.h"
using android::hardware::configureRpcThreadpool;
using android::hardware::joinRpcThreadpool;
using vendor::lineage::biometrics::fingerprint::inscreen::V1_0::IFingerprintInscreen;
using vendor::lineage::biometrics::fingerprint::inscreen::V1_0::implementation::FingerprintInscreen;
using android::OK;
using android::status_t;
int main() {
android::sp<IFingerprintInscreen> service = new FingerprintInscreen();
configureRpcThreadpool(1, true);
status_t status = service->registerAsService();
if (status != OK) {
LOG(ERROR) << "Cannot register FOD HAL service.";
return 1;
}
LOG(INFO) << "FOD HAL service ready.";
joinRpcThreadpool();
LOG(ERROR) << "FOD HAL service failed to join thread pool.";
return 1;
}

View File

@ -1,10 +0,0 @@
on boot
chown system system /sys/devices/platform/soc/soc:qcom,dsi-display-primary/fod_ui
chmod 0444 /sys/devices/platform/soc/soc:qcom,dsi-display-primary/fod_ui
service vendor.fingerprint-inscreen-1-0 /vendor/bin/hw/vendor.lineage.biometrics.fingerprint.inscreen@1.0-service.xiaomi_lito
interface vendor.lineage.biometrics.fingerprint.inscreen@1.0::IFingerprintInscreen default
class hal
user system
group system
shutdown critical

View File

@ -1,20 +0,0 @@
<manifest version="1.0" type="device">
<hal format="hidl">
<name>vendor.goodix.hardware.biometrics.fingerprint</name>
<transport>hwbinder</transport>
<version>2.1</version>
<interface>
<name>IGoodixFingerprintDaemon</name>
<instance>default</instance>
</interface>
</hal>
<hal format="hidl">
<name>vendor.lineage.biometrics.fingerprint.inscreen</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IFingerprintInscreen</name>
<instance>default</instance>
</interface>
</hal>
</manifest>

View File

@ -203,21 +203,15 @@ PRODUCT_PACKAGES += \
# Fingerprint
ifeq ($(TARGET_HAS_FOD),true)
PRODUCT_PACKAGES += \
vendor.lineage.biometrics.fingerprint.inscreen@1.0-service.xiaomi_lito
PRODUCT_PACKAGES += \
vendor.goodix.hardware.biometrics.fingerprint@2.1.vendor
PRODUCT_PACKAGES += \
KeyHandler
PRODUCT_COPY_FILES += \
vendor/lineage/config/permissions/vendor.lineage.biometrics.fingerprint.inscreen.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/vendor.lineage.biometrics.fingerprint.inscreen.xml
endif
PRODUCT_PACKAGES += \
android.hardware.biometrics.fingerprint@2.1-service.xiaomi_lito
android.hardware.biometrics.fingerprint@2.3-service.xiaomi_lito
PRODUCT_PACKAGES += \
vendor.xiaomi.hardware.fingerprintextension@1.0.vendor

View File

@ -27,8 +27,7 @@
/dev/mius(.*)? u:object_r:ultrasound_device:s0
# Fingerprint
/vendor/bin/hw/android\.hardware\.biometrics\.fingerprint@2.1-service\.xiaomi_lito u:object_r:hal_fingerprint_default_exec:s0
/vendor/bin/hw/vendor\.lineage\.biometrics\.fingerprint\.inscreen@1.0-service\.xiaomi_lito u:object_r:hal_lineage_fod_lito_exec:s0
/vendor/bin/hw/android\.hardware\.biometrics\.fingerprint@2.3-service\.xiaomi_lito u:object_r:hal_fingerprint_default_exec:s0
# Fingerprint - devices
/dev/goodix_fp u:object_r:fingerprint_device:s0

View File

@ -1,14 +0,0 @@
type hal_lineage_fod_lito, domain;
hal_server_domain(hal_lineage_fod_lito, hal_lineage_fod)
type hal_lineage_fod_lito_exec, exec_type, vendor_file_type, file_type;
init_daemon_domain(hal_lineage_fod_lito)
# Allow access to the HALs
hal_client_domain(hal_lineage_fod_lito, hal_fingerprint)
# Allow binder communication with hal_fingerprint_lito
binder_call(hal_lineage_fod_lito, hal_fingerprint_default)
allow hal_lineage_fod_lito vendor_sysfs_graphics:dir r_dir_perms;
allow hal_lineage_fod_lito vendor_sysfs_graphics:file rw_file_perms;