Questions tagged [driverkit]

DriverKit is a device driver development framework for Apple's macOS and iPadOS operating systems, introduced with macOS 10.15 "Catalina" and later added to iPadOS in version 16.

General information

DriverKit is a device driver development framework for Apple's macOS operating system, introduced with macOS 10.15 "Catalina." It was later also added to iPadOS in version 16.

The DriverKit SDK is contained in Apple's Xcode IDE distribution (from version 11 onwards), and is used to build so-called "driver extensions" or "dext" which run in special privileged user space processes. These extensions are installed by apps using the system extensions mechanism.

The DriverKit SDK interfaces with the wider IOKit infrastructure, both in kernel and general user space.

Features

As of macOS 10.15, the following types of driver can be implemented using DriverKit:

As of macOS 10.15.4, the following types of driver can additionally be implemented:

macOS 11.3 added support for:

macOS 12 added APIs for:

iPadOS 16 supports:

  • USBDriverKit
  • PCIDriverKit (Thunderbolt)
  • AudioDriverKit

Relevant question topics

  • Questions about which driver technology is the correct one to for implementing a driver for a particular device. In addition to DriverKit, drivers on macOS may also be implemented using a kext (kernel extension) or as a regular user space process, depending on the underlying device technology (USB, PCI, Firewire, etc.), the type of device (storage, network, audio, display, etc.), and the macOS version(s) targeted.
  • Questions related to the process of building, code signing, and packaging dexts. There is some overlap with macos-system-extension tag, using both can be appropriate when talking about the installation/activation process and APIs.
  • Code-level questions for implementing DriverKit based drivers. Co-tag with hid, usb, pci, etc. as appropriate when discussing specific types of device.
  • Questions about interaction of DriverKit drivers with the rest of the system, be it kexts or user space (app) clients. This will typically overlap with the iokit tag.
102 questions
0
votes
1 answer

Async Call struct method in DriverKit doesn't return the data assigned

I'm using DriverKit in iPadOS. I've got a call to read data synchronously, which is working fine. So I'm trying to do the asynchronous one. For this I'm calling IOConnectCallAsyncStructMethod with ret = IOConnectCallAsyncStructMethod(connection,…
xarly
  • 2,054
  • 4
  • 24
  • 40
0
votes
1 answer

How do you find and open a DriverKit service and communicate with it on iPadOS?

I'm trying to communicate between an iPad app and a DriverKit dext, but IOServiceGetMatchingServices can't find the dext to communicate with. I've been basing my app on this macOS example from…
thoms
  • 55
  • 5
0
votes
0 answers

Get process command line in Apple Endpoint Security Framework

I am writing a system extension and I want to get the command line. Back in kauth's days we used to get the csFlags and then the image_params, but I think that ES doesn't give us a pointer to the csFlags anymore. Tried like this: unsigned int…
Toma
  • 2,764
  • 4
  • 25
  • 44
0
votes
1 answer

How to get data from the device using IOBufferMemoryDescriptor in driverKit

I'm trying to create a driver for my usb device, using iOS and DriverKit. I'm basing my code in the example used in WWDC: https://github.com/knightsc/USBApp My driver starts fine when the device is connected and the readCompleted method is called…
xarly
  • 2,054
  • 4
  • 24
  • 40
0
votes
2 answers

DEXT. How to set property for SCSI device created by UserCreateTargetForId()

For my KEXT I set the property “Protocol Characteristics” in Info.plist file Protocol Characteristics Physical Interconnect SAS Physical Interconnect Location
Alex
  • 29
  • 3
0
votes
1 answer

IOKit inclusion in c++ project in xcode

I am trying to write a program that uses IOAudioControl.h file in the IOKit, so that I learn dealing with IOKit directly without using Apple's APIs. Whenever I run a simple file like below I got tons of errors in IOAudioControl.h #include…
ahmed botta
  • 7
  • 1
  • 6
0
votes
1 answer

Virtual printer driver for MacOS

Can I make a virtual printer driver for macOS? As a service, it's gonna be working on the background and when any user pressed cmd+p to print out any document, mine app will be appearing in the list of printer on the default print out page of Apple.
Neco
  • 1
  • 1
0
votes
0 answers

Using built-in dext driver with new VID/PID?

Apple developer documentation says: If your hardware communicates entirely using standards-based protocols, you can ship a driver that matches your hardware to one of the built-in system drivers. Is this possible to do if macOS itself has the…
khuttun
  • 683
  • 1
  • 4
  • 14
0
votes
1 answer

How do I use DMA in a macOS Kext?

I've been working on making a kext to access data on PCI BAR memory. Currently I am able to map the data and access it but its very slow. I'd like to use DMA to increase the speed at which I can communicate with the device, however I've been unable…
0
votes
1 answer

DriverKit gone after installer installed activated

This is really a strange situation. My application is an user agent communicates with my driverkit driver, by our design this app(named myAgent.app) activates my driver(named myDriverKit) since myAgent.app starts then communicate with myDriverKit.…
Vannes Yang
  • 141
  • 6
0
votes
1 answer

Getting OSSystemExtensionErrorCodeSignatureInvalid After Codeless DEXT is Activated

I built a codeless DEXT to replace a working codeless KEXT - Migrating a codeless KEXT to a codeless DEXT. I referenced a few sites and GitHub repositories to put it together and had help from other SO users. I am running with SIP turned off,…
0
votes
1 answer

how do we get terminate event in DEXT - Problem in Catalina DEXT driver

I am new to KEXT and DEXT for Mac OS. Trying to port the KEXT driver to DEXT for development purpose. my Question is: When we unplug a USB device, in case of KEXT we recieve kIOMessageServiceIsTerminated via the message() call, which tells us that…
seeni
  • 11
  • 1
1 2 3 4 5 6
7