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.
- Install Android SDK Platform Tools.
- Generate an ADB key pair.
- Add the public ADB key.
- 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
Linux
macOS
Windows
-
Open the CLI.
-
Generate an ADB key pair and place them in the directory where they will be stored:
cd ~/.android/adb keygen adbkeyadb pubkey ~/.android/adbkey > ~/.android/adbkey.pub -
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.
Control panel
API
To your profile
To another user's profile
- In the Control panel, open the menu (account number) in the upper right corner and select Profile.
- Go to Access → ADB keys tab.
- Click Add key.
- Enter a key name.
- Paste the public ADB key you copied when generating the ADB key pair in step 3.
- Click Add.
4. Connect to the device via ADB
Control panel
API
-
In the Control panel, click Products in the top menu and select Mobile Farm.
-
Go to Devices.
-
In the device row, click the device manufacturer and model.
-
Click Start using.
-
Under the device name, copy the command to connect to the mobile farm device, for example:
adb connect adb.mobfarm.selectel.ru:3094Where:
adb.mobfarm.selectel.ru— DNS address for connecting to mobile farm devices;3094— example port for connection.
-
On your device, open the CLI.
-
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:3094Where:
adb.mobfarm.selectel.ru— DNS address for connecting to mobile farm devices;3094— example port for connection.