Skip to main content

OpenSTF Installation

Navigation bar

This guide helps you set up OpenSTF on Linux systems.


Environment Requirements​

Official requirements from: https://github.com/DeviceFarmer/stf#devicefarmer-vs-openstf-faq

  • Node.js 20.x or higher (some dependencies may not support newer versions)
  • adb (Android Debug Bridge)
  • RethinkDB >= 2.2
  • CMake >= 3.9 (required for node-jpeg-turbo)
  • GraphicsMagick (for resizing screenshots)
  • ZeroMQ libraries installed
  • Protocol Buffers libraries installed
  • yasm installed (for compiling embedded libjpeg-turbo)
  • pkg-config, so Node.js can find the libraries

Installation Steps​

Node.js​

Download from: https://nodejs.org/en/download/current

# Download and install nvm (Node Version Manager):
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.2/install.sh | bash

# Reload shell configuration (instead of restarting the shell)
\. "$HOME/.nvm/nvm.sh"

# Download and install Node.js version 20:
nvm install 20

# Verify the Node.js version:
node -v # Should print "v20.19.3" or similar.
nvm current # Should print "v20.19.3".

# Verify npm version:
npm -v # Should print "10.8.2" or similar.

ADB​

apt install adb

RethinkDB​

Installation guide: https://rethinkdb.com/docs/install/ubuntu/

# Download the public key.
wget -qO- https://download.rethinkdb.com/repository/raw/pubkey.gpg | \
sudo gpg --dearmor -o /usr/share/keyrings/rethinkdb-archive-keyrings.gpg

# Add the repository (adjust '$(lsb_release -cs)' if needed, e.g., 'jammy' for Ubuntu 22.04).
echo "deb [signed-by=/usr/share/keyrings/rethinkdb-archive-keyrings.gpg] https://download.rethinkdb.com/repository/ubuntu-$(lsb_release -cs) $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/rethinkdb.list

# Update package list and install RethinkDB.
sudo apt-get update
sudo apt-get install rethinkdb

# Check installation.
rethinkdb --version

CMake​

apt install cmake
cmake --version

GraphicsMagick​

apt-get install graphicsmagick

Additional Dependencies​

Install remaining required libraries:

apt-get install libzmq3-dev libprotobuf-dev protobuf-compiler yasm pkg-config
AI Translation Notice

This page was translated into English by AI and is provided for reference only. The original document is written in Chinese. If there is any discrepancy, the Chinese version prevails.

本页英文内容由 AI 自动翻译生成,仅供参考;原文为中文,如有差异请以中文原文为准。

查看中文原文 / View the Chinese original →