diff --git a/BoardConfig.mk b/BoardConfig.mk index b74fc7e..a2225f6 100644 --- a/BoardConfig.mk +++ b/BoardConfig.mk @@ -140,6 +140,8 @@ TW_HAS_EDL_MODE := true TW_CUSTOM_CPU_TEMP_PATH := /sys/class/thermal/thermal_zone39/temp TW_EXCLUDE_DEFAULT_USB_INIT := true TARGET_USE_CUSTOM_LUN_FILE_PATH := /config/usb_gadget/g1/functions/mass_storage.0/lun.%d/file +TW_SUPPORT_INPUT_AIDL_HAPTICS := true +TW_SUPPORT_INPUT_AIDL_HAPTICS_FIX_OFF := true # Debug flags TWRP_INCLUDE_LOGCAT := true diff --git a/device.mk b/device.mk index 8a9de32..4720b2e 100644 --- a/device.mk +++ b/device.mk @@ -75,6 +75,7 @@ PRODUCT_EXTRA_RECOVERY_KEYS += \ # Take a few libraries from sources TARGET_RECOVERY_DEVICE_MODULES += \ + android.hardware.vibrator-V2-ndk_platform.so \ android.hidl.allocator@1.0 \ android.hidl.memory@1.0 \ android.hidl.memory.token@1.0 \ @@ -88,6 +89,7 @@ TARGET_RECOVERY_DEVICE_MODULES += \ libdisplayconfig.qti RECOVERY_LIBRARY_SOURCE_FILES += \ + $(TARGET_OUT_SHARED_LIBRARIES)/android.hardware.vibrator-V2-ndk_platform.so \ $(TARGET_OUT_SHARED_LIBRARIES)/android.hidl.allocator@1.0.so \ $(TARGET_OUT_SHARED_LIBRARIES)/android.hidl.memory@1.0.so \ $(TARGET_OUT_SHARED_LIBRARIES)/android.hidl.memory.token@1.0.so \ diff --git a/recovery/root/system/bin/vendor.qti.hardware.vibrator.service b/recovery/root/system/bin/vendor.qti.hardware.vibrator.service new file mode 100644 index 0000000..03e606f Binary files /dev/null and b/recovery/root/system/bin/vendor.qti.hardware.vibrator.service differ diff --git a/recovery/root/vendor/etc/init/vendor.qti.hardware.vibrator.service.rc b/recovery/root/vendor/etc/init/vendor.qti.hardware.vibrator.service.rc new file mode 100644 index 0000000..5045c37 --- /dev/null +++ b/recovery/root/vendor/etc/init/vendor.qti.hardware.vibrator.service.rc @@ -0,0 +1,22 @@ +on late-init + write /sys/class/leds/vibrator/trigger "transient" + +on late-fs + chmod 0666 /dev/qcom_haptic + chown system system /dev/qcom_haptic + +on boot + start qti.vibrator + +on property:sys.boot_completed=1 + setprop vendor.haptic.calibrate.done 1 + +service qti.vibrator /system/bin/vendor.qti.hardware.vibrator.service + class hal + user root + group root + disabled + setenv LD_LIBRARY_PATH /vendor/lib64:/vendor/lib:/system/lib64:/system/lib:/sbin + setenv RICHTAP_DEVICE_PATH /dev/qcom_haptic + setenv ENV_RICHTAP_CONFIG_PATH /odm/etc/aac_richtap.config + seclabel u:r:recovery:s0 diff --git a/recovery/root/vendor/etc/vintf/manifest/vendor.qti.hardware.vibrator.service.xml b/recovery/root/vendor/etc/vintf/manifest/vendor.qti.hardware.vibrator.service.xml new file mode 100644 index 0000000..e61fc07 --- /dev/null +++ b/recovery/root/vendor/etc/vintf/manifest/vendor.qti.hardware.vibrator.service.xml @@ -0,0 +1,34 @@ + + + + android.hardware.vibrator + 2 + IVibrator/default + + diff --git a/recovery/root/vendor/lib64/libaacvibrator.so b/recovery/root/vendor/lib64/libaacvibrator.so new file mode 100644 index 0000000..25ba437 Binary files /dev/null and b/recovery/root/vendor/lib64/libaacvibrator.so differ diff --git a/recovery/root/vendor/lib64/libqtivibratoreffect.so b/recovery/root/vendor/lib64/libqtivibratoreffect.so new file mode 100644 index 0000000..9249c15 Binary files /dev/null and b/recovery/root/vendor/lib64/libqtivibratoreffect.so differ diff --git a/recovery/root/vendor/lib64/libsoc_helper.so b/recovery/root/vendor/lib64/libsoc_helper.so new file mode 100644 index 0000000..67dce4f Binary files /dev/null and b/recovery/root/vendor/lib64/libsoc_helper.so differ diff --git a/recovery/root/vendor/lib64/libsoc_helper_jni.so b/recovery/root/vendor/lib64/libsoc_helper_jni.so new file mode 100644 index 0000000..dd834a7 Binary files /dev/null and b/recovery/root/vendor/lib64/libsoc_helper_jni.so differ diff --git a/recovery/root/vendor/lib64/vendor.aac.hardware.richtap.vibrator-V1-ndk_platform.so b/recovery/root/vendor/lib64/vendor.aac.hardware.richtap.vibrator-V1-ndk_platform.so new file mode 100644 index 0000000..7de75cb Binary files /dev/null and b/recovery/root/vendor/lib64/vendor.aac.hardware.richtap.vibrator-V1-ndk_platform.so differ diff --git a/recovery/root/vendor/lib64/vendor.qti.hardware.vibrator.impl.so b/recovery/root/vendor/lib64/vendor.qti.hardware.vibrator.impl.so new file mode 100644 index 0000000..bbf4a79 Binary files /dev/null and b/recovery/root/vendor/lib64/vendor.qti.hardware.vibrator.impl.so differ