Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
cfgutil man page
cfgutil help exec
exec
Usage: exec [-a <path to attach script>] [-d <path to detach script>]
Run a script when devices attach or detach.
These environment variables will be set:
- ECID: Target device's ECID.
- PATH: The path will be changed to include cfgutil.
- UDID: Target device's UDID, if available.
- attachPID: In the detach script, the PID of the matching attach script run.
- deviceName: Target device's name, if available.
- deviceType: Target device's type, if available. ("iPhone7,2")
- buildVersion: Installed iOS build, if available. ("12B466")
- firmwareVersion: Installed iOS version, if available. ("8.1.3")
- locationID: Location ID of the device's USB port.
Script execution is not serialized. A detach script
may start as an attach is still running and vice versa.
Ignores --foreach and --ecid global options.
Options:
[-a | --on-attach] <argument>
Command to run on device attach
[-d | --on-detach] <argument>
Command to run on device detach
cfgutil help prepare
prepare
Return iOS devices to a fresh and usable state.
Options:
--address <argument>
Supervising organization's physical address.
--anchor-cert <argument>
DER-encoded certificate of the MDM server. May be passed more than once.
--email <argument>
Supervising organization's email address.
--host-cert <argument>
DER-encoded supervision certificate. May be passed more than once. (supervised)
--language <argument>
Language to use on the device. (e.g. en)
--locale <argument>
Locale to use on the device. (e.g. en_US)
--magic <argument>
Unique ID of a supervising organization.
--mdm-url <argument>
DEP service URL of an MDM server to enroll in.
--name <argument>
Supervising organization's name. (required for supervision)
[-p | --forbid-pairing]
Forbid the device from pairing with iTunes.
--phone <argument>
Supervising organization's phone number.
[-s | --supervised]
Make device supervised for a given organization.
--skip-android
Skip the Android option in the iCloud Backup pane of setup assistant.
--skip-appleid
Skip the Apple ID pane of setup assistant.
--skip-applepay
Skip the Pay pane of setup assistant.
--skip-diagnostics
Skip the Diagnostics pane of setup assistant.
--skip-location
Skip the Location Services pane of setup assistant.
--skip-passcode
Skip the Passcode pane of setup assistant.
--skip-restore
Skip the iCloud Backup pane of setup assistant.
--skip-siri
Skip the Siri pane of setup assistant.
--skip-tos
Skip the Terms of Service pane of setup assistant.
--skip-touchid
Skip the TouchID pane of setup assistant.
--skip-zoom
Skip the Display Zoom pane of setup assistant.
cfgutil help restore-backup
restore-backup
Restore a backup to an iOS device.
Restores a backup of date and settings taken from another iOS device.
Backups are chosen by UDID (not ECID). Some private data such as passwords will
only be restored if the backup was encrypted with a password, or if the device
targeted is the one who was the original source of the backup.
The device must be freshly erased before a backup can be restored to it.
Options:
--password <argument>
Password set on the backup's original device.
--source <argument>
UDID of the original source of this backup.
cfgutil
Options:
[-C | --certificate] <argument>
Path to DER-encoded certificate of supervising organization.
[-K | --private-key] <argument>
Path to DER-encoded private key of supervising organization.
[-e | --ecid] <argument>
Device to act on, by ECID. Can be used more than once.
[-f | --foreach]
Act on all selected devices.
--format <argument>
Output format. (text, JSON, plist)
--progress
Show steps/progress even without plaintext output.
[-v | --verbose]
Increases the verbosity.
Commands:
activate
Activate attached devices.
add-tags
Add tags to devices.
backup
Take a backup of a prepared iOS device.
clear-passcode
Clear passcode on a device. (supervised only)
erase | erase-content
Erase content and settings on devices. (supervised only)
exec
Run a script when devices attach or detach.
get | get-property
Show various properties of a device.
get-unlock-token
Get unlock tokens from supervised devices.
help | usage
Show help for a command.
install-app
Install apps on attached devices.
install-doc | install-document
Install documents on attached devices.
install-profile
Install profiles on attached devices.
list | list-devices
List attached devices.
pair
Try to pair with attached devices.
prepare
Return iOS devices to a fresh and usable state.
remove-app
Remove apps from attached devices.
remove-tags
Remove tags from devices.
rename | set-name
Set the name on a device.
restore | update
Install the latest iOS on devices.
restore-backup
Restore a backup to an iOS device.
revive
Attempt to revive a device from recovery mode.
syslog
Print a running output of the device's syslog.
unpair
Remove pairing records on the host and device.
wallpaper
Set background image on devices. (supervised only)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.