iOS Remote Debugging
iOS Remote Debugging is a feature in SmartDust Lab that allows you to have remote access to developer features. The use cases include running Appium tests and inspecting web views.
The connection interface is usbmuxd, which enables the use of open-source tools such as:
libimobiledevicehttps://libimobiledevice.org/pymobiledevice3https://github.com/doronz88/pymobiledevice3go-ioshttps://github.com/danielpaulus/go-ios- On devices with iOS versions older than 17 it allows full developer access to the device on MacOS, e.g. in XCode.
Prerequisites
A MacOS computer or a machine with Linux OS not older than Ubuntu 20.
Basic command line competence.
Software installation
Install
libimobiledevicehttps://libimobiledevice.org/. Many package managers allow for simple installation.Install a custom SmartDust version of
usbfluxdandusbfluxctlprograms:- Download the appropriate zipped binaries for your OS and CPU from the links below.
- Unzip the files.
- Rename the files to remove the OS and architecture postfix after
_(e.g.usbfluxd_macos_x64->usbfluxd). - Add run permissions for the files (
chmod +x PATH_TO_FILE) - Move them to a directory that's in your $PATH environment variable so that you can execute it from everywhere.
Downloads
usbfluxd:
usbfluxctl:
Usage
- Go to an iOS device on your Smartdust Lab instance and click
Enableon theRemote Debugsection in theDashboardtab. - A command is displayed for an older tool,
sd_remoteios, which is not recommended anymore. - Copy only the part that looks like [instance_name].smartdust.me:[port]. (You can also just manually take the port number).
- In your terminal, run the command
usbfluxctl add [instance_name].smartdust.me:[port], for exampleusbfluxctl add public.smartdust.me:12345. - You can use
usbfluxctl listto list the connected devices.
At this point it should be possible to connect to the device using various usbmuxd based tools.
- You can verify the connection by using programs from the
libimobiledevicetoolchain, for exampleideviceinfoshould print a lot of data about one of the connected phones. - For managing the connections, check out
usbfluxctl -h.
Troubleshooting
- In case of connection issues, try disabling and enabling the Remote Debug feature in the Smartdust Lab device page.