This guide presents an example shortcut to DFU-restore a MacBook using USBHub3c, DFU Automator, and Apple Configurator.
Apple Devices can be put into Device Firmware Update (DFU) mode to allow for firmware updating and restoration, as well as the deployment of custom OS images. This is achieved by sending Vendor-Specific Messages (VDMs) to a DFU-capable port on the target device. VDMs are point-to-point and are not passed on by a USB Hub; however, USBHub3c can generate and send arbitrary VDMs directly to connected devices. This lets Mac Sysadmins re-image multiple Macs at once, greatly speeding up deployment.
DFU Automator is a small application that enables Apple Shortcuts to control USBHub3c’s DFU functions. DFU Automator operates as a background tool, responding to commands issued by Apple Shortcuts. When combined with Apple Configurator actions, shortcuts can fully automate Mac deployment and provisioning.
Included with DFU Automator is an example shortcut showing how to DFU restore a Macbook on port 1 of USBHub3c
DFU automator features:
Send DFU Mode or Reboot VDMs to a macbook
Send an arbitrary VDM (Hexstring input)
Disable or enable hub ports
Get ECID of an attached Apple device
Installation
- Install Apple Configurator
If you haven’t already, install Apple configurator from the App store
Install DFU Automator
Download DFU Automator
- Open the .dmg disk image and drag DFU Automator into the Applications folder
- Open DFU Automator from the Applications folder once to allow Shortcuts to recognize it
Add the example shortcut to Apple Shortcuts
- In the Examples Folder, open the shortcut titled Erase+Restore MacBook on USBHub3c Port #1
- Click Add Shortcut
- The shortcut will now appear in the Shortcuts app under All Shortcuts
Click the shortcut’s icon (not the play button that appears on hover) to view the workflow:
What does each step of the shortcut do?
To understand each step of the shortcut, Control-click an action and select Show Info.
Key Actions
- Sets the USBHub3c port number for the MacBook to be updated (set to 1 by default)
- Sends a Set DFU Mode message on hub # Hub Serial Number on ports [# Number]
- Tells DFU Automator to have USBHub3c send a Vendor-Defined-Message to put a MacBook on port [# Number] into DFU mode
- If only one hub connected, Hub Serial Number can be blank
- Waits 5 seconds to give the MacBook time to enter DFU Mode
- Tells DFU Automator to read the ECID of the attached MacBook on the specified port
- Tells Apple Configurator to convert the ECID to a Connected Device Entity for use in other Apple Configurator shortcut actions
- Erases and restores the connected devices.
- Warning, all data and settings will be removed!
- Warning, all data and settings will be removed!
- IPSWs to Install: Select additional IPSW files to install on connected devices. Configurator will choose the correct IPSW for the device being updated
Example Usage
To use the example to DFU-restore a MacBook:
- Locate the DFU-enabled port on the target Mac:
- Apple Silicon MacBooks: Left side, towards the hinge
- Intel MacBooks with T2 chip: Left side, away from the hinge
- Desktops: Refer to Apple Support for more details.
- Connect the host Mac to USBHub3c port 0
- Connect the target MacBook’s DFU-enabled USB-C port to USBHub3C port 1
- Warning: target MacBook will be erased!
In Shortcuts, click the play button in the upper right of the shortcut icon or the expanded view of the shortcut
- Click "Allow" to let the shortcut run actions
The target MacBook will chime and boot into DFU mode with a black screen
- Approve any other privacy popups that appear:
- Allow configurator to find devices
- Allow the shortcut share the device ECID with Apple Configurator
- Apple Configurator will erase and restore the MacBook on port 1
Restoring Multiple Devices Simultaneously
Shortcuts and Configurator actions can be run in parallel, allowing multiple MacBooks to be restored asynchronously. The restore shortcut can be copied and the port number can be set for each port. To use, connect a MacBook to an available USBHub3c port and manually trigger the corresponding restore shortcut matching the port number.
More information about using Apple Configurator with Shortcuts can be found here.
Add New Comment