1. Home
  2. Knowledge Base
  3. AstroFarm
  4. How to enroll Android devices to AstroFarm

How to enroll Android devices to AstroFarm

AstroFarm is a private device sharing solution using which you can share, manage, and control Android devices remotely.

Let us consider a scenario where an enterprise dealing with mobile applications, owns all necessary mobile devices to help them with development, testing, and troubleshooting phases. However, due to certain challenges, the employees might not have physical access to the devices. This is where AstroFarm comes into the picture.

Contributors having Host machines can add devices to AstroFarm and Users across the globe can use the device to develop or test the apps or troubleshoot the issues on the devices. Since the devices are physically connected to the host machine via ADB, the users get better access to the device to debug.

Below are the details on how to add a device to the host machine, using which contributors add the device to AstroFarm portal.

Prerequisites

1. Install and set up ADB (the Android Debug Bridge Utility) on the host machine, from which devices will be enrolled to AstroFarm.

2. Enable USB debugging on devices you wish to enroll in AstroFarm.

For more details on this process, click here.

Follow the below-mentioned steps to set up ADB on the host machine.

  1. Go to https://developer.android.com/studio/releases/platform-tools
  2. Select Download SDK Platform-Tools for Windows and download the platform-tools and extract it.
    Note: Make a note of the location of ADB.exe on your machine.
  1. Open Terminal on your Linux machine
  2. Execute one of the following commands (based on the Linux system you are using) to complete the ADB installation.
    • Debian-based Linux users can type the following command to install ADB:
      sudo apt-get install adb
    • Fedora/SUSE-based Linux users can type the following command to install ADB:
      sudo yum install android-tools
  1. Login to Go to https://developer.android.com/studio/releases/platform-tools.
  2. Select Download SDK Platform-Tools for Mac and download the platform-tools and extract them.
    Note:Make a note of the location of ADB on your machine.
  3. Move the folder platform-tools from Downloads and move it to a target folder using the below commands.
    mkdir ~/.android-sdk-macosx
    mv platform-tools/ ~/.android-sdk-macosx/platform-tools
  4. Add the platform-tools folder to the PATH using the below command.
    echo ‘export PATH=$PATH:~/.android-sdk-macosx/platform-tools/’

Developer Options and USB Debugging On Android Devices

Enabling USB debugging on the device is one of the prerequisites.

Follow the below-mentioned steps to enable USB debugging on devices.

  1. Click on the Settings icon on the device to open the System Settings application.
  2. Search for the About Phone option in the System Settings application.
  3. Tap on the Build Number option multiple times to Enable Developer Mode. There will be a toast message once it is enabled.
  4. Now go back to the initial settings screen and you should see a Developer Options menu you can access.
  5. Enable the USB Debugging mode option on the device.

Follow the steps below to enroll the Windows machine as a contributor to AstroFarm.

  1. Log in to the AstroFarm portal and Download the AstroFarm Agent for Windows OS by clicking the Windows icon in the top right corner.
  2. Install the downloaded .exe file on the Windows machine which is going to be the host machine.
  3. Go back to the AstroFarm portal and click on the Copy Access Token button.
    Note: The Copy Access Token button is available only if you have been listed as a Contributor by your account administrator.
  4. Launch the AstroFarmAgent for Windows application using its desktop shortcut.
  5. Enter the following details in the application:
    • Server Path: This is the URL path to the AstroFarm server. If you have any trouble finding the URL, contact your administrator for help.
    • Access Token: This is the Access Token generated on the AstroFarm portal when you list yourself as a contributor. Paste the token generated from Step 3.
    • ADB Path: This is the file path to ADB.exe on your machine. (Refer to the prerequisite section)
  6. Click on Apply & Restart.
  7. Plug in the device to the host machine and enable USB debugging on the device, to auto-enroll the device to AstroFarm.

Follow the steps below to enroll your Linux/Linux ARM machine as a contributor on AstroFarm

  1. Log in to the AstroFarm portal and click the Linux icon on the right top of the console.
  2. A prompt will appear with a command. Choose the appropriate command (based on whether your machine runs Linux or Linux ARM), and click on the copy icon to copy it.
  3. Open the Linux terminal, paste the command you copied in Step 2, and execute it.
  4. Enter the required sudo credentials, if the system requests them.
  5. Go back to the AstroFarm portal and click on the Copy Access Token button.
  6. Enter the Access Token on the terminal when requested.
  7. Plug in the device to the host machine and enable USB debugging on the device to auto-enroll the device to AstroFarm.

Follow the steps below to enroll your macOS machine as a contributor on AstroFarm

  1. Log in to the AstroFarm portal and Download the AstroFarm Agent for macOS by clicking the Apple icon in the top right corner.
  2. Install the downloaded .pkg file on the mac machine which is going to be the host machine.
  3. Go back to the AstroFarm portal and click on the Copy Access Token button.
  4. Note: The Copy Access Token button is available only if you have been listed as a Contributor by your account administrator.

  5. Launch the AstroFarmAgent for mac application.
  6. Enter the following details in the application:
  7. i. Server Path: This is the URL path to the AstroFarm server. If you have any trouble finding the URL, contact your administrator for help.

    ii. Access Token: This is the Access Token generated on the AstroFarm portal when you list yourself as a contributor. Paste the token generated from Step 3.

    iii. ADB Path: This is the file path to ADB on your machine. (Refer to the prerequisite section)

    iv. Check Enroll Anroid Device and Enroll iOS devices option. options

  8. Click on Apply & Restart.
  9. Plug in the device to the host machine and enable USB debugging for Android device, to auto-enroll the device to AstroFarm.

For more details on our products, click here

Was this helpful?
YesNo
Updated on January 2024