JG Web Designs - Aurora, IL website design, development, SEO, SMM
delivering simple, effective website solutions
630-674-9763
[email protected]
  • Home
  • About
    • What's new
    • Contact
  • Portfolio
    • Testimonials
  • Business
    • Social Media Marketing
    • Lifecycle
  • Programming Services
    • Android development tips and tricks

Disable USB port

7/3/2015

4 Comments

 
Possible solution to disable USB port if your device has one and you need security...Find the device file for your port, mine is shown below, and run the following 2 commands

#cd /sys/devices/platform/fsl-ehci.0/usb1/
#echo 0 > authorized


To ENABLE the USB port...
#cd /sys/devices/platform/fsl-ehci.0/usb1/

#echo 1 > authorized 


appears to successfully toggle it back ON/Enabled...also, disabling USB access by the method above appears to NOT persist through a reboot so this likely would need to be part of a script run by your app or part of your app if you need to maintain a disabled port for the sake of security

USB Disable/Enable method described here also appears to work on USB mass storage (thumb drive) - i.e. when disabled, the "udisk" folder shows up empty in ESFileExplorer

This has only been proven in concept by trying from a shell session.

4 Comments
John
8/6/2015 03:38:47 am

Thanks! This was a helpful tip for my project

Reply
Cooper B link
12/12/2020 01:07:29 am

Thankks for posting this

Reply
Flooring Contractors Waterbury link
9/30/2022 10:28:53 pm

Hello mate great bblog post

Reply
Matchmaker Amherst link
5/26/2025 11:20:27 pm

This is an interesting solution for enhancing device security.

Reply



Leave a Reply.

    Picture

    Unless stated otherwise, everything discussed herein is related to development I've done on semi custom hardware, (Freescale-based, derived from a FS reference platform) with a rooted BSP/OS (also based on a Freescale reference build).  I have not built the BSP (nor have I ever built a BSP)

    Author

    John Goluch has been a software developer since 1989. He has developed code for a variety of embedded systems in Assembly and C, for the web in HTML/JS/PHP, and mobile devices in Qt/C++ and Android/Java.  Content here comes from "in the weeds" level of research and discovery related to Android development

    Archives

    January 2020
    July 2015

    Categories

    All

    RSS Feed

JG Web Designs | Aurora, IL 60504 | 630.674.9763 | [email protected]