The hal class is essentially triggered from the boot class, so it's possible that the HAL starts before the permissions are set, and manual intervention was added to deal with the issue. However, we can simply move chown to an earlier stage to avoid playing with the workflow. Change-Id: I189b247576151f76efaf26b2d266564dc7768fba
49 lines
2.1 KiB
Text
49 lines
2.1 KiB
Text
on early-boot
|
|
# Notification LED
|
|
chown system system /sys/class/leds/white/blink
|
|
chown system system /sys/class/leds/white/brightness
|
|
chown system system /sys/class/leds/white/duty_pcts
|
|
chown system system /sys/class/leds/white/max_brightness
|
|
chown system system /sys/class/leds/white/pause_hi
|
|
chown system system /sys/class/leds/white/pause_lo
|
|
chown system system /sys/class/leds/white/ramp_step_ms
|
|
chown system system /sys/class/leds/white/start_idx
|
|
|
|
chmod 660 /sys/class/leds/white/blink
|
|
chmod 660 /sys/class/leds/white/brightness
|
|
chmod 660 /sys/class/leds/white/duty_pcts
|
|
chmod 660 /sys/class/leds/white/pause_hi
|
|
chmod 660 /sys/class/leds/white/pause_lo
|
|
chmod 660 /sys/class/leds/white/ramp_step_ms
|
|
chmod 660 /sys/class/leds/white/start_idx
|
|
|
|
chown system system /sys/class/leds/red/blink
|
|
chown system system /sys/class/leds/red/brightness
|
|
chown system system /sys/class/leds/red/duty_pcts
|
|
chown system system /sys/class/leds/red/max_brightness
|
|
chown system system /sys/class/leds/red/pause_hi
|
|
chown system system /sys/class/leds/red/pause_lo
|
|
chown system system /sys/class/leds/red/ramp_step_ms
|
|
chown system system /sys/class/leds/red/start_idx
|
|
|
|
chmod 660 /sys/class/leds/red/blink
|
|
chmod 660 /sys/class/leds/red/brightness
|
|
chmod 660 /sys/class/leds/red/duty_pcts
|
|
chmod 660 /sys/class/leds/red/pause_hi
|
|
chmod 660 /sys/class/leds/red/pause_lo
|
|
chmod 660 /sys/class/leds/red/ramp_step_ms
|
|
chmod 660 /sys/class/leds/red/start_idx
|
|
|
|
chown system system /sys/class/leds/button-backlight/max_brightness
|
|
chown system system /sys/class/leds/button-backlight1/brightness
|
|
chown system system /sys/class/leds/button-backlight1/max_brightness
|
|
|
|
chown system system /sys/class/leds/lcd-backlight/max_brightness
|
|
|
|
service vendor.light-hal-2-0 /vendor/bin/hw/android.hardware.light@2.0-service.xiaomi_sdm660
|
|
interface android.hardware.light@2.0::ILight default
|
|
class hal
|
|
user system
|
|
group system
|
|
# shutting off lights while powering-off
|
|
shutdown critical
|