# Multi-Instance Android Emulator Device Groups in MAS

> Group multi-instance Android emulator windows and cloud devices in Macro Automation Studio, give each a macro, arguments and a proxy, and start all at once.

Source: https://automationmacro.com/docs/device-groups (Devices, updated 2026-09-04)

A device group is the unit Macro Automation Studio (MAS) uses to run macros on more than one device, whether that is a multi-instance Android emulator setup or a set of cloud devices. Each device in the group has its own macro, arguments, proxy and webhooks, and the group has **Start All** and **Stop All**. This page covers the two group kinds, per-device configuration, bulk runs, logs and scheduling.

## Before you start

- MAS is installed and you are signed in with an active trial or plan.
- For a local group: one or more emulator instances running with ADB switched on. See [Devices](/docs/devices) for the port rules.
- For a cloud group: at least one cloud device created on the **Cloud Devices** page. See [Cloud devices](/docs/cloud-devices). The [cloud devices page](/cloud-devices) explains what the add-on includes.

## Two kinds of group

A group holds one kind of device, chosen when you create it and fixed afterwards:

| Kind | Type option | What it holds | Where macros run |
|---|---|---|---|
| Local (`byod`) | **Local** | Emulators on this computer, and your own phone over adb | On this computer, driving the device over adb |
| Cloud | **Cloud** | Cloud devices MAS runs for you | On MAS servers, so the app can close |

A cloud device can only join a cloud group, and an emulator can only join a local group. Mixing them is refused with "a cloud device can only be added to a cloud group".

## Create a group

1. Open **Device Groups** in the sidebar and click **Create New Group**.
2. Enter a **Name** of 3 to 255 characters and an optional **Description**.
3. Choose the **Type**: **Local** or **Cloud**.
4. Click **Create Group**.

The group list shows every group with its device count and a live count of running devices. Use the grid or table view, sort by name, age or device count, and search by name. **Edit** changes the name and description; the type cannot change.

## Add devices

<div class="doc-tabs" data-tabs="kind">
<section data-tab="Local group">

1. Open the group and click **Add Device**.
2. Enter a **Device Name**.
3. Pick the emulator's port under **Port**. Click **Refresh** to scan again, or choose **Custom Port** and type it.
4. Optionally pick a **Startup Macro**.
5. Click **Add Device**.

</section>
<section data-tab="Cloud group">

1. Open the group and click **Add cloud device**.
2. Choose a device from the list. Devices already in this group are hidden.
3. Click **Add**.

Cloud devices are created on the **Cloud Devices** page, not here. If the list is empty, the dialog links you there.

</section>
</div>

### BlueStacks, LDPlayer and other multi-instance Android emulators

Every emulator instance listens on its own adb port, and MAS treats every port as a separate device. Three BlueStacks windows or three LDPlayer instances therefore become three devices in the group, each with its own macro and arguments. The [BlueStacks](/docs/bluestacks-setup-guide), [LDPlayer](/docs/ldplayer-setup-guide), [MuMu Player](/docs/mumu-setup-guide) and [MEmu](/docs/memu-setup-guide) guides show where each instance's port is, and the [multi-instance guide](/docs/guides/multi-instance) walks through a full farm.

> [!TIP]
> Give devices names that match the emulator instance names. The logs, run history and webhook payloads all carry the device name, so "LD-3" is easier to trace than "Device 7".

## Configure each device

Every device card has the same controls:

- **Macro**: pick the macro this device runs. A device without a macro is skipped by **Start All**.
- **Macro settings**: opens the macro's argument form for this device. The **Profile** bar at the top decides where the values live: a named [settings profile](/docs/settings-profiles) shared by every device that follows it, or **Custom (this device only)**. Saving a profile updates every device using it, and the bar says how many. Every macro has a **Default** profile that cannot be deleted. **New** saves the current values as a new profile.
- **Run Count**: how many times the macro repeats on this device.
- **Advanced settings**: the **Proxy** picker, the **Notifications** line showing how many webhooks are told about this device with a **Manage** link, and **Proxy data today**.
- **Edit Device** changes the name and port; the trash button removes the device from the group.

Click **Save Changes** after editing the macro or run count. Proxy and profile choices save on their own.

### Per-device proxy

Pick a proxy in the **Proxy** dropdown; **No proxy** clears it. One proxy per device, sticky by default so each device keeps its own IP. On an emulator the proxy is applied for the length of each run; on a cloud device it applies when the device next starts. Details, limits and the exit IP in webhooks are on the [Proxies](/docs/proxies) page.

### Per-device webhooks

Webhook endpoints are scoped on the **Webhooks** page to all devices, to chosen groups, or to chosen devices. The device card only reports how many endpoints cover this device; change the scope on the Webhooks page. Run events carry `device_id`, `device_name`, `device_port` and `group_id`, so one endpoint can tell the devices apart. See [Webhooks](/docs/webhooks).

## Start and stop

**Start** on a card runs that device alone. For a local device MAS connects over adb and launches the macro; for a cloud device it starts a server-side run.

**Start All** runs the whole group:

- Devices start one after another, half a second apart, in list order.
- A device with no macro assigned is skipped and counted as failed; the others still start.
- The result is a count, for example 9 succeeded and 1 failed, with up to 5 error messages in the toast. The **Starting All Devices** dialog shows progress and an operation log.
- In a cloud group, **Start All** launches one server-side run per device in turn. Your plan's running-device limit still applies, so a device that cannot start says so in its own toast.

**Stop All** ends every run in the group the same way. Stopping a cloud run leaves the cloud device on.

Each card shows its state: **Stopped**, **Connecting**, **Downloading**, **Starting**, **Running**, **Stopping** or **Error**. The group header sums them up as live, idle and error counts.

## Logs per device

Every card has a **Dashboard** tab, which shows the macro's runtime UI when it has one, and a **Logs** tab with the device's own output:

- Filter by **All**, **User**, **Exec**, **Errors** or **Warnings**. User lines are your script's own `print` and `mas.log` output; Exec lines come from the runner.
- **Search logs** filters by text, **Follow** keeps the newest line in view, and **Time** toggles timestamps.
- **Save** writes the log to a file; **Clear** empties the pane.

Proxy and webhook events appear in the same pane, for example "Proxy connected via office, traffic routed through 203.0.113.9". A cloud device's pane shows the tail of the server-side run's output. Finished runs, with exit code and duration, are listed under **Runs**.

## Schedule a group

The [Scheduler](/docs/scheduler) runs one macro on one port at a time it picks from your devices. To schedule a whole group, create one job per device with the same time and recurrence. Scheduled runs on a device that belongs to a group carry that group's id, so group-scoped webhooks fire for them too.

## Group and device routes for API keys

An [API key](/docs/api-keys) can read your groups and devices: `GET /api/emulator/groups` and `GET /api/emulator/devices`. Both return only what the key's owner owns, and the device rows include the port, macro, group and settings profile. Creating, editing and deleting groups or devices, and starting or stopping them, need the app's own sign-in. See the [REST API](/docs/rest-api).

## Troubleshooting

### Start All reports failed devices

Open the toast or the operation log. "device X has no macro assigned" means the card has no **Macro** selected. A local device that cannot connect fails with the adb error; follow [ADB troubleshooting](/docs/adb-troubleshooting). The devices that did start keep running.

### A cloud device will not join the group

The group is a local group. Create a group with **Type** set to **Cloud** and add the device there. The same rule stops an emulator joining a cloud group.

### Two instances show the same port

Each port belongs to one device. If two emulator windows report the same port, one of them has ADB off or is not fully booted. Wait for the second instance to finish booting, click **Refresh** in the port list, and add it with its own port.
