ADB (Intranet)
When you connect to a cloud phone through a private network, create an ECS in your VPC as the jump server for connecting to the cloud phone. If you do not customize the network when buying a Cloud Phone server, create a VPC peering connection between your existing VPC and the VPC where the Cloud Phone server is located, as shown in Figure 1. The ECS can run either the Windows or Linux OS. This topic uses the Linux OS as an example.
Constraints and Limitations
- You cannot establish a peering connection between the VPC of a tenant who has not purchased a server with the VPC where a purchased server is located. For example, in Figure 1, the tenant VPC and the VPC where the server resides belong to account A. A VPC peering connection across accounts cannot be created.
- The CIDR block of your VPC cannot overlap with 172.31.0.0/16 and 10.237.0.0/16. Otherwise, the VPC peering connection may be invalid.
- If multiple VPC peering connections are established between your VPC and the VPC where the Cloud Phone server resides, only one of the peering connections is automatically accepted.
Prerequisites
- The cloud phone must be in the Running state.
- The inbound rules configured for your VPC allow traffic from the IP address and port of the cloud phone to be accessed.
To obtain the IP address and port number of a cloud phone, go to the details page of the cloud phone and obtain the server listening address in the Application Port area.
Figure 2 Application Port
- A Linux ECS is available in your VPC.
Step 1: Create a VPC Peering Connection (Only When the Jump Server and the Cloud Phone Are in Different VPCs)
- Log in to the management console.
- On the Service List page, choose Computing > Cloud Phone.
The Cloud Phone console is displayed.
- In the navigation pane on the left, choose Servers. In the upper part of the server list, click Configure Route.
- In the right pane, record the project ID, VPC ID, and CIDR Block that will be required for creating a VPC peering connection.
Figure 3 Information collection
- If there is no Accepted peering connection available, click VPC console to create a VPC peering connection.
The VPC Peering page is displayed.
If a VPC peering connection in the Accepted state exists, perform the following operations to go to the VPC Peering page:
- Choose Service List > Network > Virtual Private Cloud.
- In the navigation pane on the left, click VPC Peering.
- In the upper right corner, click Create VPC Peering Connection.
- Set parameters as prompted. Set Account to Another account, Peer Project ID to the project ID recorded in 4, and Peer VPC ID to the VPC ID recorded in 4. Click OK.
Figure 4 Create VPC Peering Connection
- Wait for about 5 minutes until the VPC peering connection state changes to Accepted.
- Add routes for the VPC peering connection by referring to Creating a VPC Peering Connection with a VPC in Another Account. In some regions, you cannot visit the route table module directly from the navigation pane on the left of the network console. In this case, add routes for the VPC peering connection by referring to Adding Routes for a VPC Peering Connection (Route Table Module Can Be Accessed Through the VPC Details Page).
When adding a route, set Destination to the CIDR block recorded in 4. After the route is added, the two VPCs can communicate with each other.
- (Optional) If you want to forward all outbound traffic of all of your cloud phones to the created VPC peering connection, perform operations by referring to Configuring a Route.
Step 2 Access the Cloud Phone Through ADB
- Log in to the ECS.
- Download ADB from the local PC and upload it to the ECS.
Visit https://developer.android.com/studio/releases/platform-tools, switch the language to English in the upper right corner, and choose Download SDK Platform-Tools for Windows.

In the displayed dialog box, select the I have read and agree with the above terms and conditions check box, and click DOWNLOAD ANDROID SDK PLATFORM-TOOLS FOR WINDOWS.
- Decompress the ADB installation package (for example, platform-tools_r29.0.5-windows.zip) to the specified directory (PATH) on the ECS.
- Go to the PATH\platform-tools directory.
- Run the following ADB command to access the cloud phone:
adb connect Listening IP address of the server: Listening port number of the server
To obtain the listening IP address and port number of the server, perform the following steps:
- On the Instances page, click the name of the target cloud phone.
- In the Application Port area, obtain the listening IP address of the Cloud Phone server.
Take the information in Figure 5 as an example. The ADB command is adb connect 172.31.248.213:4673.
- Run the adb devices command to check whether the current port is connected.
If information similar to the following is displayed, the connection is successful:
List of devices attached 172.31.248.213:4673 device
- Run other ADB commands to operate the cloud phone.
For details about how to troubleshoot the ADB connection faults, visit the following websites:
Last Article: ADB (Recommended)
Next Article: ADB (Internet)


Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.