diff --git a/rootdir/etc/init.mt6785.usb.rc b/rootdir/etc/init.mt6785.usb.rc index 97885a6..6e34ca0 100644 --- a/rootdir/etc/init.mt6785.usb.rc +++ b/rootdir/etc/init.mt6785.usb.rc @@ -157,6 +157,18 @@ on boot # for usb otg sdcard hot plug detection write /sys/module/block/parameters/events_dfl_poll_msecs 1000 + # Set permissions for USB service + 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/udc/${sys.usb.controller}/device/cmode + chown root system /sys/class/udc/${sys.usb.controller}/device/saving + 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/udc/${sys.usb.controller}/device/cmode + chmod 664 /sys/class/udc/${sys.usb.controller}/device/saving + on property:dev.bootcomplete=1 write /config/usb_gadget/g1/strings/0x409/product ${ro.product.marketname}