From dc8484b74fb928d400938d87b43e9a5417a1274c Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Sat, 30 Nov 2019 20:38:41 +0100 Subject: [PATCH] Fix fingerprint on Honor View 10 --- board-base.mk | 2 ++ rw-system.sh | 13 +++++++++++++ sepolicy/file_contexts | 3 +++ sepolicy/huawei.te | 10 ++++++++++ 4 files changed, 28 insertions(+) diff --git a/board-base.mk b/board-base.mk index efe5e68..0a2188e 100644 --- a/board-base.mk +++ b/board-base.mk @@ -2,3 +2,5 @@ TARGET_SYSTEM_PROP := device/phh/treble/system.prop $(TARGET_SYSTEM_PROP) BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := device/phh/treble/bluetooth TARGET_EXFAT_DRIVER := exfat DEVICE_FRAMEWORK_MANIFEST_FILE := device/phh/treble/framework_manifest.xml + +BOARD_ROOT_EXTRA_FOLDERS += sec_storage diff --git a/rw-system.sh b/rw-system.sh index 9a36012..9e34ba1 100644 --- a/rw-system.sh +++ b/rw-system.sh @@ -425,3 +425,16 @@ if [ -f /system/phh/secure ];then resetprop ro.adb.secure 1 setprop ctl.restart adbd fi + +if getprop ro.boot.boot_devices |grep -v , |grep -qE .;then + ln -s /dev/block/platform/$(getprop ro.boot.boot_devices) /dev/block/bootdevice +fi + +if [ -c /dev/dsm ];then + chown system:system /dev/dsm + chmod 0660 /dev/dsm + mkdir -p /data/sec_storage_data + chown system:system /data/sec_storage_data + chcon u:object_r:teecd_data_file_system:s0 /data/sec_storage_data + mount /data/sec_storage_data /sec_storage +fi diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts index fa4fff8..a13c2b1 100644 --- a/sepolicy/file_contexts +++ b/sepolicy/file_contexts @@ -6,3 +6,6 @@ /system/bin/fsck\.exfat u:object_r:fsck_exec:s0 /system/bin/fsck\.ntfs u:object_r:fsck_exec:s0 + +/sec_storage(/.*)? u:object_r:teecd_data_file:s0 +/dev/dsm u:object_r:dmd_device:s0 diff --git a/sepolicy/huawei.te b/sepolicy/huawei.te index 4c1887f..b949f0c 100644 --- a/sepolicy/huawei.te +++ b/sepolicy/huawei.te @@ -1 +1,11 @@ allow ueventd proc:file r_file_perms; + +type teecd_data_file, file_type; +type dmd_device, file_type; +allow hal_fingerprint_server dmd_device:chr_file rw_file_perms; +allow hal_fingerprint_server sysfs:file rw_file_perms; + +type oeminfo_nvm, domain; +type oeminfo_nvm_device, file_type; +allowxperm oeminfo_nvm oeminfo_nvm_device:blk_file ioctl { 0x1260 }; +allow ueventd dmd_device:chr_file create_file_perms;