tinyios is cross platform software to talk to ios devices over usb or wifi. It mimics a small set of features that can be done via xcode, developer tools and system settings on a mac.
It exposes itself as a HTTP server so it can be accessed from anywhere. It is also stateless and rootless which makes it easy to run as an ephemeral container.
tinyios depends on usbmuxd installed on the host machine to manage device pairing and device communication through usb or wifi. You will also need to make usbmuxd on the host available inside the container.
-
Forward device to WSL
-
Install dependancies
To use tinyios on Linux or WSL you need to install usbmuxd to handle device pairing and device communication. You can run these commands to install or update existing usbmuxd to the latest version
git clone https://github.com/libimobiledevice/usbmuxd.git cd usbmuxd ./autogen.sh make sudo make installYou will also need socat to make usbmuxd available from the host to container
sudo apt install socat sudo socat TCP-LISTEN:27015,reuseaddr,fork UNIX-CONNECT:/var/run/usbmuxd -
Run latest container image on port 8080
docker run —rm \ -p 8080:8080 \ -e USBMUXD_SOCKET_ADDRESS=host.docker.internal:27015 \ albinstman/tinyios
-
Install dependancies
To use tinyios on Linux or WSL you need to install usbmuxd to handle device pairing and device communication. You can run these commands to install or update existing usbmuxd to the latest version
git clone https://github.com/libimobiledevice/usbmuxd.git cd usbmuxd ./autogen.sh make sudo make installYou will also need socat to make usbmuxd available from the host to container
sudo apt install socat sudo socat TCP-LISTEN:27015,reuseaddr,fork UNIX-CONNECT:/var/run/usbmuxd -
Run latest container image on port 8080
docker run —rm \ -p 8080:8080 \ -e USBMUXD_SOCKET_ADDRESS=host.docker.internal:27015 \ albinstman/tinyios
- Make usbmuxd available for container
brew install socat socat TCP-LISTEN:27015,reuseaddr,fork UNIX-CONNECT:/var/run/usbmuxd - Run latest container image on port 8080
docker run —rm \ -p 8080:8080 \ -e USBMUXD_SOCKET_ADDRESS=host.docker.internal:27015 \ albinstman/tinyios
The main purpose of tinyios is to setup ios devices and then talk to them via appium webdriver commands.
| Method | URI | Name | Summary |
|---|---|---|---|
| GET | /{udid}/activated | get udid activated | Check activation status |
| POST | /{udid}/activate/enable | post udid activate enable | Enable activation |
| Method | URI | Name | Summary |
|---|---|---|---|
| GET | /{udid}/apps/list | get udid apps list | List applications |
| POST | /{udid}/apps/install | post udid apps install | Install application |
| POST | /{udid}/apps/kill | post udid apps kill | Kill application |
| POST | /{udid}/apps/run | post udid apps run | Run application |
| Method | URI | Name | Summary |
|---|---|---|---|
| GET | /{udid}/devmode | get udid devmode | Check developer mode status |
| GET | /{udid}/image | get udid image | Check developer disk image status |
| POST | /{udid}/devmode/enable | post udid devmode enable | Enable developer mode |
| POST | /{udid}/image/enable | post udid image enable | Mount developer disk image |
| Method | URI | Name | Summary |
|---|---|---|---|
| GET | /devices | get devices | List devices |
| GET | /{udid}/processes | get udid processes | List processes |
| POST | /{udid}/erase | post udid erase | Erase device |
| POST | /{udid}/reboot | post udid reboot | Reboot device |
| Method | URI | Name | Summary |
|---|---|---|---|
| GET | /{udid}/paired | get udid paired | Check pairing status |
| POST | /{udid}/pair/enable | post udid pair enable | Enable pairing |
| Method | URI | Name | Summary |
|---|---|---|---|
| GET | /{udid}/profiles/list | get udid profiles list | List profiles |
| POST | /{udid}/profiles/add | post udid profiles add | Add profile |
| Method | URI | Name | Summary |
|---|---|---|---|
| GET | /{udid}/supervised | get udid supervised | Check supervision status |
| POST | /{udid}/supervise/enable | post udid supervise enable | Enable supervision |
| Method | URI | Name | Summary |
|---|---|---|---|
| POST | /{udid}/wda/kill | post udid wda kill | Kill WebDriverAgent |
| POST | /{udid}/wda/run | post udid wda run | Run WebDriverAgent |
GET /devices
Returns a list of all connected iOS devices
- application/json
| Code | Status | Description | Has headers | Schema |
|---|---|---|---|---|
| 200 | OK | OK | schema |
Status: OK
GET /{udid}/activated
Returns whether the device is activated
- application/json
| Name | Source | Type | Go type | Separator | Required | Default | Description |
|---|---|---|---|---|---|---|---|
| udid | path |
string | string |
✓ | Device UDID |
| Code | Status | Description | Has headers | Schema |
|---|---|---|---|---|
| 200 | OK | OK | schema |
Status: OK
GET /{udid}/apps/list
Returns a list of applications installed on the device
- application/json
| Name | Source | Type | Go type | Separator | Required | Default | Description |
|---|---|---|---|---|---|---|---|
| udid | path |
string | string |
✓ | Device UDID |
| Code | Status | Description | Has headers | Schema |
|---|---|---|---|---|
| 200 | OK | OK | schema |
Status: OK
GET /{udid}/devmode
Returns whether developer mode is enabled on the device
- application/json
| Name | Source | Type | Go type | Separator | Required | Default | Description |
|---|---|---|---|---|---|---|---|
| udid | path |
string | string |
✓ | Device UDID |
| Code | Status | Description | Has headers | Schema |
|---|---|---|---|---|
| 200 | OK | OK | schema |
Status: OK
GET /{udid}/image
Returns whether the developer disk image is mounted
- application/json
| Name | Source | Type | Go type | Separator | Required | Default | Description |
|---|---|---|---|---|---|---|---|
| udid | path |
string | string |
✓ | Device UDID |
| Code | Status | Description | Has headers | Schema |
|---|---|---|---|---|
| 200 | OK | OK | schema |
Status: OK
GET /{udid}/paired
Returns whether the device is paired
- application/json
| Name | Source | Type | Go type | Separator | Required | Default | Description |
|---|---|---|---|---|---|---|---|
| udid | path |
string | string |
✓ | Device UDID |
| Code | Status | Description | Has headers | Schema |
|---|---|---|---|---|
| 200 | OK | OK | schema |
Status: OK
GET /{udid}/processes
Returns a list of running processes on the device
- application/json
| Name | Source | Type | Go type | Separator | Required | Default | Description |
|---|---|---|---|---|---|---|---|
| udid | path |
string | string |
✓ | Device UDID |
| Code | Status | Description | Has headers | Schema |
|---|---|---|---|---|
| 200 | OK | OK | schema |
Status: OK
GET /{udid}/profiles/list
Returns a list of configuration profiles installed on the device
- application/json
| Name | Source | Type | Go type | Separator | Required | Default | Description |
|---|---|---|---|---|---|---|---|
| udid | path |
string | string |
✓ | Device UDID |
| Code | Status | Description | Has headers | Schema |
|---|---|---|---|---|
| 200 | OK | OK | schema |
Status: OK
GET /{udid}/supervised
Returns whether the device is supervised
- application/json
| Name | Source | Type | Go type | Separator | Required | Default | Description |
|---|---|---|---|---|---|---|---|
| udid | path |
string | string |
✓ | Device UDID |
| Code | Status | Description | Has headers | Schema |
|---|---|---|---|---|
| 200 | OK | OK | schema |
Status: OK
POST /{udid}/activate/enable
Activates the specified iOS device
- application/json
| Name | Source | Type | Go type | Separator | Required | Default | Description |
|---|---|---|---|---|---|---|---|
| udid | path |
string | string |
✓ | Device UDID |
| Code | Status | Description | Has headers | Schema |
|---|---|---|---|---|
| 200 | OK | OK | schema |
Status: OK
POST /{udid}/apps/install
Installs an application from a URL on the device
- application/json
- application/json
| Name | Source | Type | Go type | Separator | Required | Default | Description |
|---|---|---|---|---|---|---|---|
| udid | path |
string | string |
✓ | Device UDID | ||
| request | body |
MainAppInstallRequest | models.MainAppInstallRequest |
✓ | Application IPA URL |
| Code | Status | Description | Has headers | Schema |
|---|---|---|---|---|
| 200 | OK | OK | schema | |
| 400 | Bad Request | invalid JSON | schema |
Status: OK
Status: Bad Request
POST /{udid}/apps/kill
Terminates a running application by process ID
- application/json
| Name | Source | Type | Go type | Separator | Required | Default | Description |
|---|---|---|---|---|---|---|---|
| udid | path |
string | string |
✓ | Device UDID | ||
| pid | formData |
string | string |
✓ | Process ID |
| Code | Status | Description | Has headers | Schema |
|---|---|---|---|---|
| 200 | OK | OK | schema |
Status: OK
POST /{udid}/apps/run
Launches an application on the device
- application/json
| Name | Source | Type | Go type | Separator | Required | Default | Description |
|---|---|---|---|---|---|---|---|
| udid | path |
string | string |
✓ | Device UDID | ||
| bundleid | formData |
string | string |
✓ | Application bundle identifier |
| Code | Status | Description | Has headers | Schema |
|---|---|---|---|---|
| 200 | OK | OK | schema |
Status: OK
POST /{udid}/devmode/enable
Enables developer mode on the device
- application/json
| Name | Source | Type | Go type | Separator | Required | Default | Description |
|---|---|---|---|---|---|---|---|
| udid | path |
string | string |
✓ | Device UDID |
| Code | Status | Description | Has headers | Schema |
|---|---|---|---|---|
| 200 | OK | OK | schema |
Status: OK
POST /{udid}/erase
Erases all content and settings from the device
- application/json
| Name | Source | Type | Go type | Separator | Required | Default | Description |
|---|---|---|---|---|---|---|---|
| udid | path |
string | string |
✓ | Device UDID |
| Code | Status | Description | Has headers | Schema |
|---|---|---|---|---|
| 200 | OK | OK | schema |
Status: OK
POST /{udid}/image/enable
Mounts the developer disk image on the device
- application/json
| Name | Source | Type | Go type | Separator | Required | Default | Description |
|---|---|---|---|---|---|---|---|
| udid | path |
string | string |
✓ | Device UDID |
| Code | Status | Description | Has headers | Schema |
|---|---|---|---|---|
| 200 | OK | OK | schema |
Status: OK
POST /{udid}/pair/enable
Pairs the device using the provided certificate
- application/json
| Name | Source | Type | Go type | Separator | Required | Default | Description |
|---|---|---|---|---|---|---|---|
| udid | path |
string | string |
✓ | Device UDID |
| Code | Status | Description | Has headers | Schema |
|---|---|---|---|---|
| 200 | OK | OK | schema |
Status: OK
POST /{udid}/profiles/add
Installs a configuration profile on the device
- application/json
- application/json
| Name | Source | Type | Go type | Separator | Required | Default | Description |
|---|---|---|---|---|---|---|---|
| udid | path |
string | string |
✓ | Device UDID | ||
| profile | body |
MainProfileAddRequest | models.MainProfileAddRequest |
✓ | Base64 encoded profile |
| Code | Status | Description | Has headers | Schema |
|---|---|---|---|---|
| 200 | OK | OK | schema | |
| 400 | Bad Request | invalid JSON | schema |
Status: OK
Status: Bad Request
POST /{udid}/reboot
Reboots the specified iOS device
- application/json
| Name | Source | Type | Go type | Separator | Required | Default | Description |
|---|---|---|---|---|---|---|---|
| udid | path |
string | string |
✓ | Device UDID |
| Code | Status | Description | Has headers | Schema |
|---|---|---|---|---|
| 200 | OK | OK | schema |
Status: OK
POST /{udid}/supervise/enable
Prepares and enables supervision on the device
- application/json
| Name | Source | Type | Go type | Separator | Required | Default | Description |
|---|---|---|---|---|---|---|---|
| udid | path |
string | string |
✓ | Device UDID |
| Code | Status | Description | Has headers | Schema |
|---|---|---|---|---|
| 200 | OK | OK | schema |
Status: OK
POST /{udid}/wda/kill
Stops WebDriverAgent on the device
- application/json
| Name | Source | Type | Go type | Separator | Required | Default | Description |
|---|---|---|---|---|---|---|---|
| udid | path |
string | string |
✓ | Device UDID |
| Code | Status | Description | Has headers | Schema |
|---|---|---|---|---|
| 200 | OK | OK | schema |
Status: OK
POST /{udid}/wda/run
Starts WebDriverAgent on the device
- application/json
| Name | Source | Type | Go type | Separator | Required | Default | Description |
|---|---|---|---|---|---|---|---|
| udid | path |
string | string |
✓ | Device UDID |
| Code | Status | Description | Has headers | Schema |
|---|---|---|---|---|
| 200 | OK | OK | schema |
Status: OK
Properties
| Name | Type | Go type | Required | Default | Description | Example |
|---|---|---|---|---|---|---|
| url | string | string |
Properties
| Name | Type | Go type | Required | Default | Description | Example |
|---|---|---|---|---|---|---|
| ConnectionType | string | string |
||||
| ProductName | string | string |
||||
| ProductType | string | string |
||||
| ProductVersion | string | string |
||||
| Udid | string | string |
Properties
| Name | Type | Go type | Required | Default | Description | Example |
|---|---|---|---|---|---|---|
| devices | []MainDevice | []*MainDevice |
Properties
| Name | Type | Go type | Required | Default | Description | Example |
|---|---|---|---|---|---|---|
| ok | boolean | bool |
Properties
| Name | Type | Go type | Required | Default | Description | Example |
|---|---|---|---|---|---|---|
| b64profile | string | string |