Files
vendor_xiaomi_raphael/proprietary/vendor/etc/init/init.raphael.rc
pwnrazr 7b2e851829 raphael: Initial sensor based UDFPS impl (2/5)
- Supports UDFPS on AOD
- Build sensors.raphael_udfps
- Build sensors.raphael_single_tap
- Build sensors.raphael_double_tap
- Add UDFPS overlays
- Add sepolicy

Change-Id: I2f1ff96416d00896bb3cc72578ebe661f849b81c
Signed-off-by: firebird11 <hbgassel@gmail.com>
2026-02-02 17:10:46 +01:00

69 lines
3.4 KiB
Plaintext

# Copyright (c) 2016, 2018, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of The Linux Foundation nor
# the names of its contributors may be used to endorse or promote
# products derived from this software without specific prior written
# permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# this will make sure you have /data ready and then you try to create the dir.
on init
chown system camera /dev/drv8846_dev
chown system camera /dev/akm09970
chmod 0660 /dev/drv8846_dev
chmod 0660 /dev/akm09970
service vendor.motor /vendor/bin/hw/vendor.xiaomi.hardware.motor@1.0-service
class hal
user system
group system
on boot
chown system system /sys/class/leds/green/step_ms
chown system system /sys/class/leds/green/pause_lo_count
chown system system /sys/class/leds/green/lut_pattern
chown system system /sys/class/leds/green/lo_idx
chown system system /sys/class/leds/green/brightness
chown system system /sys/class/leds/blue/step_ms
chown system system /sys/class/leds/blue/pause_lo_count
chown system system /sys/class/leds/blue/lut_pattern
chown system system /sys/class/leds/blue/lo_idx
chown system system /sys/class/leds/blue/brightness
# UDFPS Sensor
chown system system /sys/devices/platform/goodix_ts.0/udfps_pressed
chmod 0660 /sys/devices/platform/goodix_ts.0/udfps_pressed
chown system system /sys/devices/platform/goodix_ts.0/udfps_enabled
chmod 0660 /sys/devices/platform/goodix_ts.0/udfps_enabled
# Double Tap Sensor
chown system system /sys/devices/platform/goodix_ts.0/double_tap_pressed
chmod 0660 /sys/devices/platform/goodix_ts.0/double_tap_pressed
chown system system /sys/devices/platform/goodix_ts.0/double_tap_enabled
chmod 0660 /sys/devices/platform/goodix_ts.0/double_tap_enabled
# Single Tap Sensor
chown system system /sys/devices/platform/goodix_ts.0/single_tap_pressed
chmod 0660 /sys/devices/platform/goodix_ts.0/single_tap_pressed
chown system system /sys/devices/platform/goodix_ts.0/single_tap_enabled
chmod 0660 /sys/devices/platform/goodix_ts.0/single_tap_enabled