Connecting to a Cloud Phone and Obtaining Its Screens

Airtest is a cross-platform UI automation compiler. Due to the shortcomings of the VNC protocol, such as high bandwidth requirements and great performance deterioration, Monbox-based cloud phones do not support VNC access. It is recommended that you use Airtest to quickly obtain the cloud phone screens.

Prerequisites

  • You have purchased a Cloud Phone server and logged in a cloud phone using ADB. For details, see Buying a Cloud Phone.
  • Airtest has been installed on the local PC.

    Log in to the Airtest official website at https://airtest.netease.com/, and download the required version, and install it.

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

Procedure

  1. On the Airtest home page, click refresh ADB.
    The connected mobile phones are displayed.
    Figure 1 Airtest home page
  2. If the cloud phone you want to connect to 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 remote connection

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

    Ensure that the CLI for the ADB connection is closed. Otherwise, the connection fails. In addition, ensure that the SSH tunnel is successfully established. Otherwise, ADB Status will be offline even if the cloud phone has been identified. As a result, the cloud phone screens cannot be obtained.

  3. In the list of identified mobile phones, click Connect on the right of the target cloud phone to obtain its screens.
    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 cloud phone screens