Skip to content

MacOS exception on Kernel Detach (FIXED) #88

Description

@dmingram66

MacOS introduced a security control with BigSur which prevents un trusted developers from detaching the Kernel USB driver. The attached patch file implement the fix.

Please note that I have introduced a new dependency, from packaging import version , to allow a simple version test:

            if not sys.platform.startswith('darwin'):
                try:
                    self.device.detach_kernel_driver(0)
                except usb.core.USBError as e:
                    raise BlinkStickException("Could not detach kernel driver: %s" % str(e))
            elif version.parse(os.uname().release)<version.parse('20.0.0'):
                try:
                    self.device.detach_kernel_driver(0)
                except usb.core.USBError as e:
                    raise BlinkStickException("Could not detach kernel driver: %s" % str(e))

The attached file contains the patch

patch-diff.txt

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions