Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Killing power to a USB port

Tags:

macos

usb

Is there a way to programatically turning off the power or killing a USB port on the Mac?

like image 776
Kyle Hayes Avatar asked Nov 06 '22 21:11

Kyle Hayes


2 Answers

I believe that the USB power typically comes directly from the power supply. It might go through the motherboard or some other hardware to combine it with the data lines, but I don't think the voltage ever goes through any programmable circuitry. If you wanted to deactivate the data transfer, that would probably be possible since that is handled by an extension file (IOUSBMassStorageClass.kext), but short of modifying the port physically, I don't think you will be able to deactivate the power.

like image 137
ras2124 Avatar answered Nov 15 '22 07:11

ras2124


If you're refering to USB storage devices, according to the Tiger Security Configuartion Manual (pdf):

6 To remove support for mass storage devices (e.g. USB flash drives, external USB hard drives, external FireWire Hard Drives), drag the following files to the Trash:

IOUSBMassStorageClass.kext

IOFireWireSerialBusProtocolTransport.kext

7 Open the /System/Library folder.

8 Drag the following files to the Trash: Extensions.kextcache Extensions.mkext

9 Choose Finder > Secure Empty Trash to delete the file.

10 Restart the system.

I've seen some other stuff around but it's all much harrier. Leading gluing the ports up to get suggested quite a bit.

like image 41
domoaringatoo Avatar answered Nov 15 '22 09:11

domoaringatoo