- Install Homebrew if not already installed
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
- Update Homebrew
brew update
- Uninstall previous
libimobiledevice
versionsbrew uninstall --ignore-dependencies libimobiledevice
- Uninstall previous
usbmuxd
versionsbrew uninstall --ignore-dependencies usbmuxd
- Uninstall previous
libplist
versionsbrew uninstall --ignore-dependencies libplist
- Install latest
usbmuxd
brew install --HEAD usbmuxd
- Install latest
libplist
brew install --HEAD libplist
- Install latest
libimobiledevice
brew install --HEAD libimobiledevice
- Install
ideviceinstaller
brew install ideviceinstaller
- Navigate to the App Store and download/install Apple Configurator 2 (AC2)
- In AC2, click on the
Apple Configurator 2
menu and chooseInstall Automation Tools
- In AC2, click on the
Apple Configurator 2
menu and choosePreferences
>Organization
> click on your org and chooseExport Supervision Identity
in the bottom left - Move the .crt and .der files to the DCMAgent folder and rename them to
org.crt
andorg.der
- Clone repository
git clone https://github.com/versx/DCMAgent
- Install dependencies
npm install
- Install pm2 (optional)
npm install pm2 -g
- Copy example config file
cp config.example.json config.json
- Fill out
config.json
- Name is to identify the listener uniquely.
- Port is the listening port, defaults to 6542.
- Domain (i.e.
http://10.0.0.2:9991
orhttps://dcm.domain.com
) is the DeviceConfigManager domain that will be sending the reboot request, otherwise set to*
to accept from all hosts.
- Start the bot with
pm2 start listener.js
ornode listener.js
if not using pm2
"name" = The name you want to use for this server.
"port" = The inbound TCP port for requests.
"domain" = The domain that is allowed to send requests.
"manual_list" = True/False for creating your own JSON list of devices as device.json. See device.example.json.
"manual_ip" = True/False for adding the IP to the device.json or to allow the script to find IPs.
"use_ios_deploy" = True/False for using ios-deploy instead of cfgutil for querying devices (disables the profile command).
If a mitm client sends their status to RDM we can use the same logic to trigger reopen/reboot via the reopenMonitorURL
/rebootMonitorURL
endpoints. You must use the manual_list: true
to supply a custom script via the reopen_cmd
/reboot_cmd
options. All other endpoints (reapplySAMMonitorURL
, brightnessMonitorURL
) are not supported since they are iOS specific. Power relays can be triggered via http calls, custom API methods, and are unique per vendor as such this is a batteries not included option. Though, a basic script (device_management.sh
) has been added that uses ADB commands for these requests. Using that script, you can setup the devices.json file with entries like this {"name":"A001","uuid":"","ecid":"","reopen_cmd":"./device_management.sh reopen_gc 192.168.1.2 A001","reboot_cmd":"./device_management.sh reboot 192.168.1.2 A001"}
. The variables in the script are "task", "DNS IP", "device name". The DNS IP is either your router or a DNS server that is able to resolve device names. Otherwise, create a similar script for your setup and needs.
It is recommended that you setup multiple DCMRL instances if running iOS and Android on the same host machine. This allows you to keep the automatic iOS device list detection plus reopen, reapply sam, and brightness commands can all point to one instance. Then Android devices will only receive the reboot commands keeping for clean logs.
Other android commands are also available in the device_management.sh script.
For jailed iOS devices please leave the reopen_cmd
/reboot_cmd
empty or delete the line! DCMAgent has built-in functionality to run the needed commands.
For reopening jailbroken iOS devices, a jb_respring
command has been added to the device_management.sh script. You can create a device.json file and add entries for iOS devices. Populate the reopen_cmd
like this "reopen_cmd":"./device_management.sh jb_respring 192.168.2.1 001-SE"
. Note that this command requires your public SSH key to be added to the target device's authorized_keys file and that kernbypass will block this from running while the game is still alive. This command mainly works for restoring devices that have SAM crashed and the game is closed. In case your JB devices are tethered, the script will also lookup tethered IP addresses.
For rebooting jailbroken iOS devices, a jb_reboot
command has been added to the device_management.sh script. You can create a device.json file and add entries for iOS devices. Populate the reboot_cmd
like this "reboot_cmd":"./device_management.sh jb_reboot 192.168.2.1 001-SE"
. This command has the same SSH key requirement as above and will even lookup tethered IP addresses. This command should be used when the JB functionality cannot be recovered with the jb_respring and takes 3-6 minutes to complete. You will also need to clone and setup UIC_Jailbreaker to be able to automate this command.
When setting up the manual device.json file, use one line per device so the device_management.sh script can pull that line of text to parse.
If the cfgutil from AC2 does not list any devices when you use the cfgutil list
command, then you may need to upgrade AC2 and reinstall the automation tools.
If the Connection timed out
or Connection refused
errors continuously happen for iOS 14 devices, go into Settings > Pokemon Go (at the bottom) > Toggle Local Network
on. This will allow cURL to connect to the IPA.