device_google_gs201/usb/gadget/android.hardware.usb.gadget-service.rc
Ray Chi b30924e359 usb: move the permission change to usb rc
Since permission change in hal rc may be late, gadget
hal would enable USB function failed. The solution will
change the permission before USB gadget hal starts.

Bug: 206902205
Test: build pass and verified pass
Change-Id: I45c1318f647220480fa03ba3b813a81b21393d71
2022-03-07 07:45:50 +00:00

19 lines
1,002 B
Text

service vendor.usb-gadget-hal-1-2 /vendor/bin/hw/android.hardware.usb.gadget-service
class hal
user system
group system shell mtp
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/devices/platform/10d60000.hsi2c/i2c-2/i2c-max77759tcpc/contaminant_detection
chown root system /sys/devices/platform/11210000.usb/dwc3_exynos_otg_b_sess
chown root system /sys/devices/platform/11210000.usb/dwc3_exynos_otg_id
chown root system /sys/devices/platform/11210000.usb/usb_data_enabled
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/devices/platform/11210000.usb/dwc3_exynos_otg_b_sess
chmod 664 /sys/devices/platform/11210000.usb/dwc3_exynos_otg_id
chmod 664 /sys/devices/platform/11210000.usb/usb_data_enabled