2 Replies Latest reply on Jul 11, 2016 9:10 PM by mohamedshaharris_intel

    How to disable USB ports on MI3.1?

    mohamedshaharris_intel

      We can disable USB ports on MI3.1, and any usb devices will be failed to be connected once plugin.

       

      Follow these steps:

       

      1) cd to path /etc/udev/rules.d/

      2) Create 99-disable-usb-input.rules

      3) In 99-disable-usb-input.rules file, you add below lines:

       

      ACTION=="add", SUBSYSTEM=="input", SUBSYSTEMS=="usb", ATTRS{authorized}=="1", \

        RUN+="/bin/sh -c 'echo 0 > /sys/bus/usb/devices/usb1/authorized'"

      ACTION=="add", SUBSYSTEM=="block", SUBSYSTEMS=="usb", ATTRS{authorized}=="1", \

        ENV{PARID}="$id", RUN+="/bin/sh -c 'echo 0  >/sys/bus/usb/devices/$env{PARID}/authorized'"

       

      4) After add these lines, close the 99-disable-usb-input.rules file.

      5) Run command "udevadm control --reload", this will reload the new rules or you can reboot the system.

       

      In case you want to enable again USB ports.

       

      1) You can rename the rules 99-disable-usb-input.rules

      2) cd to path /etc/udev/rules.d/

      3) Rename command "mv  99-disable-usb-input.rules 99-disable-usb-input.rules-bak"

         File name as example rename to 99-disable-usb-input.rules-bak. You can choose your own name.

      4) Then run command "udevadm control --reload", this will reload the new rules or you can reboot the system.

       

      To disable again in the future.

       

      1) cd to path /etc/udev/rules.d/

      2) Rename back the rules file, command "mv 99-disable-usb-input.rules-bak 99-disable-usb-input.rules"

      3) Then run command "udevadm control --reload", this will reload the new rules or you can reboot the system.

       

       

      Last Validated Info

      IDP3.1
      RCPL0015
      DeviceDK300