From 7069b2a85eec4dca08b2958635b6fcf2da886101 Mon Sep 17 00:00:00 2001 From: Prateek Chaubey Date: Thu, 3 Aug 2017 14:42:57 +0200 Subject: [PATCH] land: Fix Fingerprint --- configs/check_features.sh | 1 + init/init_land.cpp | 12 ------------ proprietary-files.txt | 3 ++- rootdir/init.qcom.rc | 23 +++++++++++++++++------ sepolicy/gx_fpd.te | 1 + 5 files changed, 21 insertions(+), 19 deletions(-) diff --git a/configs/check_features.sh b/configs/check_features.sh index 3b1281a..d0af94e 100755 --- a/configs/check_features.sh +++ b/configs/check_features.sh @@ -22,4 +22,5 @@ if [ "$board_id" = "S88537AC1" ]; || [ "$board_id" = "S88537EC1"]; then rm /system/lib64/libcom_fingerprints_service.so rm /system/lib64/libfp_client.so rm /system/lib64/libfpservice.so + rm /system/lib64/libfpnav.so fi diff --git a/init/init_land.cpp b/init/init_land.cpp index 6eece64..fa58aea 100644 --- a/init/init_land.cpp +++ b/init/init_land.cpp @@ -142,26 +142,14 @@ void vendor_load_properties() if (buf.find("S88537AA1") != std::string::npos) { property_set("ro.build.display.wtid", "SW_S88537AA1_V080_M20_MP_XM"); - property_set("persist.sys.fp.goodix", "0"); - property_set("persist.sys.fp.onstart", "1"); - property_set("persist.sys.fp.vendor", "searchf"); - property_set("ro.boot.fpsensor", "fpc"); } else if (buf.find("S88537AB1") != std::string::npos) { property_set("ro.build.display.wtid", "SW_S88537AB1_V080_M20_MP_XM"); - property_set("persist.sys.fp.goodix", "1"); - property_set("persist.sys.fp.onstart", "1"); - property_set("persist.sys.fp.vendor", "goodix"); - property_set("ro.boot.fpsensor", "gdx"); } else if (buf.find("S88537AC1") != std::string::npos) { property_set("ro.build.display.wtid", "SW_S88537AC1_V080_M20_MP_XM"); } else if (buf.find("S88537BA1") != std::string::npos) { property_set("ro.build.display.wtid", "SW_S88537BA1_V080_M20_MP_XM"); } else if (buf.find("S88537CA1") != std::string::npos) { property_set("ro.build.display.wtid", "SW_S88537CA1_V080_M20_MP_XM"); - property_set("persist.sys.fp.goodix", "0"); - property_set("persist.sys.fp.onstart", "1"); - property_set("persist.sys.fp.vendor", "searchf"); - property_set("ro.boot.fpsensor", "fpc"); } else if (buf.find("S88537EC1") != std::string::npos) { property_set("ro.build.display.wtid", "SW_S88537EC1_V080_M20_MP_XM"); } diff --git a/proprietary-files.txt b/proprietary-files.txt index 7c6279a..051712b 100644 --- a/proprietary-files.txt +++ b/proprietary-files.txt @@ -1088,7 +1088,7 @@ vendor/lib64/libtzdrmgenprov.so -etc/qdcm_calib_data_ili9881c_HD720p_video_Tianma.xml -etc/qdcm_calib_data_nt35521s_HD720p_video_EBBG.xml -# Fingerprint - from santoni +# Fingerprint - from land bin/gx_fpcmd bin/gx_fpd lib/hw/fingerprint.default.so:lib/hw/fingerprint.msm8937.so @@ -1099,6 +1099,7 @@ lib64/hw/gxfingerprint.default.so lib64/libcom_fingerprints_service.so lib64/libfp_client.so lib64/libfpservice.so +lib64/libfpnav.so # Gatekeeper - from santoni vendor/lib/hw/gatekeeper.msm8937.so diff --git a/rootdir/init.qcom.rc b/rootdir/init.qcom.rc index 0383ffa..925e229 100644 --- a/rootdir/init.qcom.rc +++ b/rootdir/init.qcom.rc @@ -352,6 +352,10 @@ on boot chown system system /dev/goodix_fp chmod 0644 /dev/goodix_fp + setprop persist.sys.fp.vendor none + start gx_fpd + + # Notification LEDs chown root system /sys/class/leds/red/blink chown root system /sys/class/leds/green/blink chown root system /sys/class/leds/blue/blink @@ -581,13 +585,20 @@ service gx_fpd /system/bin/gx_fpd group system system disabled -on property:persist.sys.fp.vendor=goodix - stop fingerprintd - start gx_fpd +on property:persist.sys.fp.vendor=switchf + stop gx_fpd + setprop persist.sys.fp.vendor searchf + start fingerprintd + setprop ro.boot.fpsensor fpc -on property:persist.sys.fp.vendor=searchf - stop gx_fpd - start fingerprintd +on property:persist.sys.fp.vendor=goodix + setprop ro.boot.fpsensor gdx + +on property:persist.sys.fp.onstart=1 + start fingerprintd + +on property:ro.boot.fpsensor=gdx + setprop ro.hardware.fingerprint goodix # Start camera server as daemon service qcamerasvr /system/bin/mm-qcamera-daemon diff --git a/sepolicy/gx_fpd.te b/sepolicy/gx_fpd.te index fc20c07..78e02b5 100644 --- a/sepolicy/gx_fpd.te +++ b/sepolicy/gx_fpd.te @@ -47,3 +47,4 @@ allow gx_fpd self:capability dac_override; allow gx_fpd storage_file:dir search; allow gx_fpd storage_file:lnk_file read; r_dir_file(gx_fpd, firmware_file) +allow gx_fpd tmpfs:dir search;