Skip to main content

Connect to a mobile farm device via ADB

Android Debug Bridge (ADB) — a tool that allows you to interact with Android OS devices via the command line interface. For example, you can:

  • run shell commands and applications;
  • remotely debug applications;
  • transfer files between the mobile farm device and your device;
  • get logs;
  • reboot the device;
  • change device settings;
  • perform manual and automated testing. Automated testing can only be performed by service users.

Learn more about the Android Debug Bridge tool in the Android Debug Bridge (adb) Google documentation.

  1. Install Android SDK Platform Tools.
  2. Generate an ADB key pair.
  3. Add the public ADB key.
  4. Connect to the device via ADB.

1. Install Android SDK Platform Tools

Download the Android SDK Platform Tools package for your operating system from the Android Developers website.

2. Generate an ADB key pair

  1. Open the CLI.

  2. Generate an ADB key pair and place them in the directory where they will be stored:

    cd ~/.android/
    adb keygen adbkey
    adb pubkey ~/.android/adbkey > ~/.android/adbkey.pub
  3. Copy the public ADB key:

    xclip -sel clip < ~/.android/adbkey.pub

3. Add the public ADB key

The key will be available in all projects to which the user is added.

  1. In the Control panel, open the menu (account number) in the upper right corner and select Profile.
  2. Go to Access → ADB keys tab.
  3. Click Add key.
  4. Enter a key name.
  5. Paste the public ADB key you copied when generating the ADB key pair in step 3.
  6. Click Add.

4. Connect to the device via ADB

  1. In the Control panel, click Products in the top menu and select Mobile Farm.

  2. Go to Devices.

  3. In the device row, click the device manufacturer and model.

  4. Click Start using.

  5. Under the device name, copy the command to connect to the mobile farm device, for example:

    adb connect adb.mobfarm.selectel.ru:3094

    Where:

    • adb.mobfarm.selectel.ru — DNS address for connecting to mobile farm devices;
    • 3094 — example port for connection.
  6. On your device, open the CLI.

  7. Connect to the device by running the command you copied in step 5.

    The response will display the connection result, for example:

    connected to adb.mobfarm.selectel.ru:3094

    Where:

    • adb.mobfarm.selectel.ru — DNS address for connecting to mobile farm devices;
    • 3094 — example port for connection.