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

Connecting to a Cloud Phone to Obtain Its Screen

a cross-platform UI automation compiler, to obtain the cloud phone's screen.

Prerequisites

  • You have purchased a cloud phone server and connected to a cloud phone using ADB. For details, see Buying a Cloud Phone Server (Without Detailed Parameter Description).
  • Airtest has been installed on your local PC.

    Airtest is available at the Airtest official website. Log in to the website, download the required version, and install it.

  • The command-line interface (CLI) for the ADB connection has been closed, and an SSH tunnel has been successfully established.

Procedure

  1. On the Airtest homepage, click refresh ADB.
    Connected mobile phones are displayed.
    Figure 1 Airtest homepage
  2. If the cloud phone to which you want to connect is not displayed, select remote connection and enter the ADB command for connecting to the target cloud phone, as shown in Figure 2.

    adb connect 127.0.0.1:1234

    1234 is the local idle port used for establishing the SSH tunnel.

    Figure 2 Establishing a remote connection to a cloud phone

    Click Connect on the right. The cloud phone to be connected will be displayed in the Mobile Phone Connection list.

    Ensure that the CLI for the ADB connection has been closed. Otherwise, the connection will fail in this step. Ensure that the SSH tunnel has been successfully established. Otherwise, ADB Status will be offline and the cloud phone screen cannot be obtained even if the cloud phone has been identified.

  3. In the list of identified mobile phones, click connect on the right of the target cloud phone to obtain its screen.
    Figure 3 Mobile Phone Connection
    Figure 4 Device Screen
  4. If you have connected to multiple cloud phones through ADB, click the switch icon in the upper right corner to switch between screens.
    Figure 5 Switching between cloud phone screens