> For the complete documentation index, see [llms.txt](https://help.autify.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.autify.com/nocode-mobile/en/using-autify-nocode-mobile/execution-environments/local-device/setup-procedure-for-recording-and-running-tests-on-a-local-device-android.md). Agents can also search and read this documentation through its [MCP server](https://help.autify.com/~gitbook/mcp).

# Setup procedure for recording and running tests on a local device (Android)

## Local device setup guide

### 0. What you need

| Item                         | Description                                                                  |
| ---------------------------- | ---------------------------------------------------------------------------- |
| Windows PC / Mac             | Used to control tests                                                        |
| Android device               | Local physical device. Make sure the application can run on it.              |
| USB cable                    | Used to connect **PC ↔ Android device**                                      |
| Autify NoCode Mobile account | Used to access Autify NoCode Mobile and to create a token for the Autify CLI |

### 1. Install and configure Android Studio (\~1 hour)

Android Studio and the Android SDK are required by Autify NoCode Mobile to use a local Android device.

#### Install Android Studio

Download and install Android Studio from [here](https://developer.android.com/studio?hl=en).

#### Install the SDK

When you launch Android Studio, a dialog prompts you to install the Android SDK.\
Choose the **Standard** option and install the SDK.

### 2. Enable USB debugging (\~15 min)

USB debugging is necessary to operate the device.

#### Enable USB debugging

Follow the instructions on this page to enable USB debugging on the device: <https://developer.android.com/studio/debug/dev-options?hl=en>

#### Connect the device to the PC

While USB debugging is enabled, connect the device to the PC.\
When the dialog **“Allow USB debugging?”** appears, tap **Allow**. Switch the connection mode to **File Transfer (MTP)** or **PTP**.

### 3. Install the Autify CLI (\~15 mins)

Install the software needed to connect the device to Autify NoCode Mobile.

### On Mac

#### Install Homebrew

The Autify CLI is installed via Homebrew.\
If Homebrew is not installed, open Terminal and run the command shown under **“Install Homebrew”** on <https://brew.sh/>.

#### Configure PATH

After Homebrew is installed, add it to your `PATH`:

```bash
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/$USER/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)
```

#### Install the Autify CLI

Run the following command in Terminal:

```bash
brew install autifyhq/tap/autify-cli
```

If you encounter errors during installation, please contact our Support.

After the command finishes successfully, verify that the Autify CLI works:

```bash
autify help
```

If the installation succeeded, you will see **“Autify Command Line Interface (CLI)”** along with the version and available commands.

If you see `command not found`, Autify CLI might not be properly added to your `PATH`.

### On Windows

Download and install the Autify CLI from: [Autify Command Line Interface (CLI)](https://help.autify.com/nocode-web/en/autify-university/integrations/autify-command-line-interface.md#native-installer)

After installing and configuring the `PATH`, verify:

```bash
autify help
```

If installed correctly, **“Autify Command Line Interface (CLI)”** will be displayed, along with version information and available commands.

### 4. Generate a Personal Access Token in Autify NoCode Mobile (\~5 mins)

Generate a token on Autify NoCode Mobile [user settings page](https://mobile-app.autify.com/settings/token) and store it safely.

### 5. Setup the device connection (\~15 mins)

First, register the Personal Access Token you created in the previous step with the Autify CLI.\
Please run the following command in the terminal (Command Prompt / PowerShell for Windows) to set your personal access token:

```bash
autify mobile auth login
```

Next, run the command below.\
This installs the components required to connect your mobile device to Autify NoCode Mobile and lets you enter the necessary information:

```bash
autify mobile link setup
```

Follow the on-screen prompts to complete the setup.

* **Enter the Workspace ID**

  You can obtain the Workspace ID as follows:

  1. Go to <http://mobile-app.autify.com/> and log in.
  2. The URL changes to:\
     `https://mobile-app.autify.com/projects/XXXXXXX?by=test_plan`
  3. The `XXXXXXX` part is your Workspace ID.
* Adjust the recorder’s screen quality
  * Generally, selecting **1. High** is recommended. However, if you experience recorder freezing, switching to **2. Low** quality may resolve the issue.
    * Please see [this article](https://help.autify.com/nocode-mobile/en/troubleshooting/trobleshooting-local-device/first-steps-to-try-if-an-error-occurs-before-starting-step-1.md#adjust-the-recorders-screen-quality) if you need.
* **Consent to upload logs**\
  Enter `Yes` to allow log files related to recording and test runs to be sent to Autify NoCode Mobile, which helps Support resolve issues more smoothly.

### 6. Start the connection <a href="#start-the-connection" id="start-the-connection"></a>

Run the following command in the terminal (Command Prompt / PowerShell for Windows) to start the connection between Autify NoCode Mobile and your local device:

```bash
autify mobile link start
```

After the command starts, login to the **Create New Scenario** page on Autify NoCode Mobile with the same user that created the access token.

If the connection is successful, select **Local Device** in the dropdown at the bottom of the modal; your device name will appear.

![](https://1041389054-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fj0BSsfTevAGpY0hwBHT7%2Fuploads%2Fgit-blob-c74284f21ed40c45d4ef7c581528be56003a738f%2Flocal_device_en.png?alt=media)

## Using the local device

### Prerequisites

Before recording or running tests on a local device, make sure the USB cable is connected properly and the device is unlocked.

If you intend to use the device for an extended period, open **Settings ▸ Display & Brightness** on the device and set **Auto-Lock** to **Never**.

Complete the steps in [Start the connection](#start-the-connection).

{% hint style="warning" %}
**Tests will fail if the device is locked during execution.** Please ensure the device is unlocked before running the test.
{% endhint %}

### Recording

Open an existing scenario or create a new one and start a new recording session then select your local device and start recording.

If an error occurs during the recording session launch, confirm with a developer that the build can be installed on the device. If the issue persists, contact our Support.

### Test execution

As with cloud devices, you can run tests that target the local device from **Run Now** on the scenario details page or from a **Test Plan**.

## Troubleshooting

Please see [this](https://help.autify.com/nocode-mobile/en/troubleshooting/trobleshooting-local-device.md) article.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.autify.com/nocode-mobile/en/using-autify-nocode-mobile/execution-environments/local-device/setup-procedure-for-recording-and-running-tests-on-a-local-device-android.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
