Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
Help Center/ Cloud Phone Host/ Best Practices/ Using STF to Manage Cloud Phones in Batches

Using STF to Manage Cloud Phones in Batches

Updated on 2023-12-25 GMT+08:00

Scenarios

Smartphone Test Farm (STF) is an open-source web-based application used for managing and controlling mobile devices. STF uses a browser to control and manage Android devices, enabling you to use, debug, and test those devices on the cloud. This section describes how to deploy STF components on an ECS to manage cloud phones in batches.

Restrictions and Limitations

  • STF can manage about 160 cloud phones at the same time. For larger-scale access management, secondary development is required.
  • STF needs a stable network to run smoothly. When the network status is poor, the operation latency of cloud phones increases significantly.

Prerequisites

  • A cloud phone server that has an EIP bound is available.
  • An ECS that has an EIP bound is available.
NOTE:
The following cloud phone server and ECS specifications are only examples.
  • Cloud phone server: physical.kg1.4xlarge.cp | kg1.cp.c60.d16SSD.e1v1
  • ECS: general computing | s6.large.2 | 2 vCPUs | 4 GiB | Ubuntu 18.04 server 64bit (40 GB)

Procedure

Deploy components on which STF depends on the ECS, use the ADB tool to connect to the cloud phone, and access the STF address through a browser to manage cloud phones in batches.

  1. Install ADB and check the installation result.
    sudo apt install android-tools-adb android-tools-fastboot
    adb --version

    If --version is displayed, the installation is successful.

    Figure 1 Successful installation of ADB
  2. Update the yum source and install RethinkDB to store STF data.
    source /etc/lsb-release && echo "deb https://download.rethinkdb.com/repository/ubuntu-$DISTRIB_CODENAME $DISTRIB_CODENAME main" | sudo tee /etc/apt/sources.list.d/rethinkdb.list
    wget -qO- https://download.rethinkdb.com/repository/raw/pubkey.gpg | sudo apt-key add -
    sudo apt-get update
    sudo apt-get install rethinkdb
    rethinkdb -v
    If -v is displayed, the installation is successful.
    Figure 2 Successful installation of RethinkDB

    RethinkDB provides official support for the x86 architecture while experimental support for the Arm architecture.

  3. Install ZeroMQ to transfer messages.
    sudo apt-get install libzmq3-dev
    Figure 3 Successful installation of ZeroMQ
  4. Install Protocol Buffers as the data format for message transfer.
    sudo apt-get install libprotobuf-dev protobuf-compiler
    protoc --version
    If --version is displayed, the installation is successful.
    Figure 4 Successful installation of Protocol Buffers
  5. Install GraphicsMagick to read, write, and operate pictures.
    sudo apt-get install graphicsmagick
    gm version
    If version is displayed, the installation is successful.
    Figure 5 Successful installation of GraphicsMagick
  6. Install pkg-config to compile the third-party library of Nodejs.
    sudo apt-get install pkg-config
    pkg-config --version
    If --version is displayed, the installation is successful.
    Figure 6 Successful installation of pkg-config
  7. Install yasm to compile dependent libraries of STF.
    sudo apt-get install yasm
    yasm --version
    If --version is displayed, the installation is successful.
    Figure 7 Successful installation of yasm
  8. Install Nodejs to deploy the STF runtime environment.
    ##STF supports only Node.js 8.x.
    curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash  - 
    sudo apt-get install -y nodejs
    node -v
    npm -v
    If -v is displayed, the installation is successful.
    Figure 8 Successful installation of node and npm
  9. Install STF.
    sudo npm install -g cnpm --registry=https://registry.npm.taobao.org
    sudo cnpm install -g stf
    stf -V
    If -V is displayed, the installation is successful.
    Figure 9 Successful installation of STF
  10. Check whether the environment on which STF depends is available.
    stf doctor
    If the version of each component is displayed in the command output, the environment is available.
    Figure 10 Checking the STF startup environment
  11. Use ADB to connect to the cloud phone. For details, see ADB (Internet).
  12. Start RethinkDB.
    rethinkdb
    If information similar to that in the following is displayed, RethinkDB is started successfully.
    Figure 11 Starting RethinkDB
  13. Start STF in local mode and access STF using a browser.
    ## Set EIP to the EIP bound to the ECS.
    stf local --public-ip {EIP} --allow-remote
    ## Access method
    http://{EIP}:7100/
    Figure 12 Entering the default username and password of STF
    Figure 13 Cloud phones
    Figure 14 Cloud phone Control screen

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback