Can i use iokit usb lib to disable build-in camera?
Can i use iokit usb lib to disable build-in camera?
No, at least not reliably. While, in theory, the USB user clients* can be opened with exclusive access (thus blocking the access of other clients), in practice I think race condition issues mean that it would be hard to make it reliable. I think the better approach would be to block the user client open itself, particularly with the new Endpoint Security API described here.
*Note that the IOUSBHost framework is the modern API, not the older IOUSBLib API.
__
Kevin Elliott
DTS Engineer, CoreOS/Hardware