> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mobilerun.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect an Android

> Bring your own Android phone into Mobilerun Cloud with the Mobilerun Portal app.

Use the **Mobilerun Portal** Android app to connect your own phone to Mobilerun Cloud. Once connected, it appears as a [Personal Phone](https://docs.mobilerun.ai/device-types.md#personal-phone) on the [Devices](https://cloud.mobilerun.ai/devices) page and can run tasks from the Task runner or API. The Portal app is for Android only; to connect an iPhone, see [Connect an iPhone](https://docs.mobilerun.ai/guides/connect-iphone.md).

<video autoPlay muted loop playsInline src="https://mintcdn.com/mobilerun/4rc4BmPhetHjq4CH/images/portal-setup/full.mp4?fit=max&auto=format&n=4rc4BmPhetHjq4CH&q=85&s=7bc9f6cb23466d0d0cb86c536c728559" poster="/images/portal-setup/poster.jpg" />

## Requirements

* A Mobilerun account with a [Personal Phone](https://docs.mobilerun.ai/device-types.md#personal-phone) subscription
* A phone running Android 8.0 (API 26) or newer
* A stable internet connection

## Set up Portal

### 1. Install Mobilerun Portal

Download the latest APK from the [Portal releases page](https://github.com/droidrun/mobilerun-portal/releases), install it on the phone, and open it.

<video autoPlay muted loop playsInline src="https://mintcdn.com/mobilerun/4rc4BmPhetHjq4CH/images/portal-setup/1-open.mp4?fit=max&auto=format&n=4rc4BmPhetHjq4CH&q=85&s=ae5433b7caf77c9c873bbd8098ce0348" poster="/images/portal-setup/1-open-poster.jpg" />

To build from source, clone the [Portal repository](https://github.com/droidrun/mobilerun-portal), run its Gradle build, and then install the generated APK:

```bash theme={null}
./gradlew assembleDebug
adb install -r /path/to/generated-portal.apk
```

> [!TIP]
>
> If Google Play Protect blocks the install, first look for **More details** → **Install anyway**. Only change Play Protect settings if you understand and accept the risk, and restore them after installing the APK from the official Mobilerun repository.

### 2. Turn on Accessibility

Accessibility lets agents see and tap your screen. On the Portal main screen, tap **Enable Now** next to **Accessibility Service Not Enabled**, then open **Mobilerun Portal** and turn on **Use Mobilerun Portal**. Remote UI state and most control actions require this service. If Android asks for **Display over other apps**, allow it so Portal can show its on-screen element overlay.

<video autoPlay muted loop playsInline src="https://mintcdn.com/mobilerun/4rc4BmPhetHjq4CH/images/portal-setup/2-accessibility.mp4?fit=max&auto=format&n=4rc4BmPhetHjq4CH&q=85&s=cbde0311893045ee36dad7054fed6248" poster="/images/portal-setup/2-accessibility-poster.jpg" />

### 3. Allow file access

File upload and download require Android 11 or newer. On the Portal main screen, tap **Enable Now** in the file-access banner, then turn on **Allow access to manage all files** to approve **All Files Access**.

<video autoPlay muted loop playsInline src="https://mintcdn.com/mobilerun/4rc4BmPhetHjq4CH/images/portal-setup/3-files.mp4?fit=max&auto=format&n=4rc4BmPhetHjq4CH&q=85&s=23a4725fbe435f8fb5522841b3947c41" poster="/images/portal-setup/3-files-poster.jpg" />

### 4. Turn on the keyboard

The Mobilerun keyboard lets agents type into any app. On the Portal main screen, tap **Select** next to **Mobilerun Keyboard not active**, turn on **Mobilerun Keyboard**, and tap **OK** on the Android warning. Then tap **Select** again and choose **Mobilerun Keyboard** as the input method. Without it, Portal falls back to accessibility for text input.

<video autoPlay muted loop playsInline src="https://mintcdn.com/mobilerun/4rc4BmPhetHjq4CH/images/portal-setup/4-keyboard.mp4?fit=max&auto=format&n=4rc4BmPhetHjq4CH&q=85&s=f1b957dfb5a6bc9b449d1f572d39a399" poster="/images/portal-setup/4-keyboard-poster.jpg" />

### 5. Sign in

On the Portal main screen, choose a connection method:

1. **Sign In** — recommended; scan the QR code with another device, or choose **Open on This Phone**, and authenticate with the Mobilerun account that owns the Personal Phone subscription.
2. **Use API Key** — enter a Mobilerun API key directly.
3. **Custom Connection** — advanced option for a custom WebSocket host and credentials.

<video autoPlay muted loop playsInline src="https://mintcdn.com/mobilerun/4rc4BmPhetHjq4CH/images/portal-setup/5-sign-in.mp4?fit=max&auto=format&n=4rc4BmPhetHjq4CH&q=85&s=fffda2438309d326fc88de62676004de" poster="/images/portal-setup/5-sign-in-poster.jpg" />

After connecting, you can leave the Portal screen; the phone stays connected in the background. Do not force-stop Portal unless you want to take the phone offline.

> [!WARNING]
>
> Cloud Connection can send device state, actions, events, and screen-sharing data to the configured server. To keep device control local, disable Cloud Connection and follow [Framework Device Setup](https://docs.mobilerun.ai/framework/guides/device-setup.md).

For protocol and security details, see the Portal repository's [Reverse Connection](https://github.com/droidrun/mobilerun-portal/blob/main/docs/reverse-connection.md) documentation.

### 6. Run your first task

Open [Devices](https://cloud.mobilerun.ai/devices) in the Mobilerun dashboard. The phone should appear as a connected Personal Phone. Start a task from the Task runner and select it to verify end-to-end control.

Because this is your own phone, its installed apps, files, and signed-in state persist across tasks. Use a dedicated device or test profile when tasks should not access personal data.

## Optional settings

Open Portal **Settings** and enable the features your tasks need:

* **Notification permission** — used for background screen-sharing prompts.
* **Notification Access** and event toggles — needed only for notification/device-event forwarding and notification-based triggers.
* **Auto-accept Screen Share** — helps accept the Android screen-sharing prompt; the system can still require manual consent.
* **Auto-accept App Installs** plus Android **Install unknown apps** for Portal — needed only when remote tasks install APKs.
* **Keep Screen Awake** — prevents sleep during unattended tasks.

> [!NOTE]
>
> Installing the APK can grant some permissions, but you must approve Accessibility, Display over other apps, Notification Access, Install unknown apps, and screen-capture consent on the phone.

***

## Disconnect

Press **Disconnect** on the Portal main screen to take the phone offline. **Sign Out** also removes the saved Mobilerun sign-in.

***

## Reset

Resetting a Personal Phone factory-resets the handset and clears the apps and data accumulated during sessions. The phone goes offline for several minutes while it wipes and reboots. During that time the device shows the `resetting` state. Mobilerun waits up to 5 minutes for the phone to reconnect. Once the phone is back online, the device returns to `ready`. If the phone does not reconnect within that window, Mobilerun terminates the device.

***

## Advanced Portal APIs

For local HTTP, WebSocket, and ADB APIs, see the Portal documentation. Direct WebSocket clients and HTTP calls other than `GET /ping` require a Portal token.

* [Local API](https://github.com/droidrun/mobilerun-portal/blob/main/docs/local-api.md)
* [WebSocket Events](https://github.com/droidrun/mobilerun-portal/blob/main/docs/websocket-events.md)
* [Triggers and Events](https://github.com/droidrun/mobilerun-portal/blob/main/docs/triggers.md)

***

## Need help?

* **Discord:** [discord.gg/droidrun](https://discord.gg/droidrun)
* **Email:** [contact@mobilerun.ai](mailto:contact@mobilerun.ai)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.