device_google_zuma/usb/usb/android.hardware.usb-service.rc
Sergey Volk b5769ac1f1 Fix permissions for dp_hotplug_error_code sysfs node
DisplayPort kernel driver passes error code/status to hardware composer
via the dp_hotplug_error_code sysfs file. When HWC receives/consumes
the error, it will write "0" into that file to reset the error code. So
this file must be readable and writable by the HWC code running with
"system" user/group permissions.
Previously we used to set the ownership to system:system, but in order
to be more consistent with the rest of sysfs files in that directory,
we can use root:graphics instead with permissions 0664. HWC runs
under the "graphics" group, so this should allow HWC write access.

Bug: 324953626
Test: checked permissions of dp_hotplug_error_code sysfs
Change-Id: Idf65acc12d158a78565c41f4e2aea24362e2cdff
2024-02-14 00:58:35 +00:00

51 lines
3.6 KiB
Text

service vendor.usb /vendor/bin/hw/android.hardware.usb-service
class hal
user system
group system shell wakelock
capabilities WAKE_ALARM BLOCK_SUSPEND
on post-fs
chown root system /sys/class/typec/port0/power_role
chown root system /sys/class/typec/port0/data_role
chown root system /sys/class/typec/port0/port_type
chown root system /sys/class/typec/port0/port0.0/mode1/active
chown root system /sys/devices/platform/10cb0000.hsi2c/i2c-11/11-0025/contaminant_detection
chown root system /sys/devices/platform/10cb0000.hsi2c/i2c-11/11-0025/usb_limit_accessory_current
chown root system /sys/devices/platform/10cb0000.hsi2c/i2c-11/11-0025/usb_limit_accessory_enable
chown root system /sys/devices/platform/10cb0000.hsi2c/i2c-11/11-0025/usb_limit_sink_current
chown root system /sys/devices/platform/10cb0000.hsi2c/i2c-11/11-0025/usb_limit_sink_enable
chown root system /sys/devices/platform/10cb0000.hsi2c/i2c-11/11-0025/usb_limit_source_enable
chown root system /sys/devices/platform/10cb0000.hsi2c/i2c-11/11-0025/update_sdp_enum_timeout
chown root graphics /sys/devices/platform/110f0000.drmdp/drm-displayport/dp_hotplug_error_code
chown root system /sys/devices/platform/110f0000.drmdp/drm-displayport/hpd
chown root system /sys/devices/platform/110f0000.drmdp/drm-displayport/irq_hpd
chown root system /sys/devices/platform/110f0000.drmdp/drm-displayport/orientation
chown root system /sys/devices/platform/110f0000.drmdp/drm-displayport/pin_assignment
chown root system /sys/devices/platform/110f0000.drmdp/drm-displayport/link_status
chown root system /sys/devices/platform/110f0000.drmdp/drm-displayport/usbc_cable_disconnect
chown root system /sys/devices/platform/11110000.usb/dwc3_exynos_otg_b_sess
chown root system /sys/devices/platform/11110000.usb/dwc3_exynos_otg_id
chown root system /sys/devices/platform/11110000.usb/usb_data_enabled
chown root system /sys/devices/platform/google,pogo/enable_usb
chmod 664 /sys/class/typec/port0/power_role
chmod 664 /sys/class/typec/port0/data_role
chmod 664 /sys/class/typec/port0/port_type
chmod 664 /sys/class/typec/port0/port0.0/mode1/active
chmod 664 /sys/devices/platform/11110000.usb/dwc3_exynos_otg_b_sess
chmod 664 /sys/devices/platform/11110000.usb/dwc3_exynos_otg_id
chmod 664 /sys/devices/platform/11110000.usb/usb_data_enabled
chmod 664 /sys/devices/platform/10cb0000.hsi2c/i2c-11/11-0025/contaminant_detection
chmod 664 /sys/devices/platform/10cb0000.hsi2c/i2c-11/11-0025/usb_limit_accessory_current
chmod 664 /sys/devices/platform/10cb0000.hsi2c/i2c-11/11-0025/usb_limit_accessory_enable
chmod 664 /sys/devices/platform/10cb0000.hsi2c/i2c-11/11-0025/usb_limit_sink_current
chmod 664 /sys/devices/platform/10cb0000.hsi2c/i2c-11/11-0025/usb_limit_sink_enable
chmod 664 /sys/devices/platform/10cb0000.hsi2c/i2c-11/11-0025/usb_limit_source_enable
chmod 664 /sys/devices/platform/10cb0000.hsi2c/i2c-11/11-0025/update_sdp_enum_timeout
chmod 664 /sys/devices/platform/110f0000.drmdp/drm-displayport/dp_hotplug_error_code
chmod 664 /sys/devices/platform/110f0000.drmdp/drm-displayport/hpd
chmod 664 /sys/devices/platform/110f0000.drmdp/drm-displayport/irq_hpd
chmod 664 /sys/devices/platform/110f0000.drmdp/drm-displayport/orientation
chmod 664 /sys/devices/platform/110f0000.drmdp/drm-displayport/pin_assignment
chmod 664 /sys/devices/platform/110f0000.drmdp/drm-displayport/link_status
chmod 664 /sys/devices/platform/110f0000.drmdp/drm-displayport/usbc_cable_disconnect
chmod 664 /sys/devices/platform/google,pogo/enable_usb