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. A cloud phone server can use a system-defined network or custom network. For details, see Figure 1. You can check the network type on the server details page.
Custom Network
You are advised to deploy the ECS in the same VPC as the cloud phone server if the server uses a custom network. If they are in different VPCs, you need to create a VPC peering connection.
Constraints
The CIDR block of your VPC cannot overlap with 10.237.0.0/16 or the CIDR block of the VPC where the cloud phone server is located. Otherwise, the VPC peering connection may be invalid.
System-defined Network
If your cloud phone server uses a system-defined network, create a VPC peering connection between the VPC where the ECS is located and the VPC where the cloud phone server is located, as shown in Figure 2. The ECS can run either Windows or Linux. Windows is used as an example.
Constraints
- 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 2, 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 following operations apply to cloud phone servers that use a system-defined network or custom network.
- 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 its details page and obtain the server listening address in the Application Port area.
Figure 3 Application Port
No authentication is required for ADB direct connection within an intranet. After security group rules of the ADB port is enabled, all allowed IP addresses can directly connect to cloud phones through the ADB intranet. In this case, SSH tunnels are recommended.
- A Windows ECS is available in your VPC.
- To connect to a dual-stack cloud phone using an IPv6 address, ensure that the environment that initiates the access, such as an ECS, supports IPv6. (Cloud phone servers using system-defined networks do not support IPv6.)
Step 1: Create a VPC Peering Connection (Only When the Jump Server and the Cloud Phone Are in Different VPCs)
This step only applies to cloud phone servers using system-defined networks. If your cloud phone server is using a custom network and the server is in a different VPC from the ECS, create a VPC peering connection by referring to Creating a VPC Peering Connection to Connect Two VPCs in the Same Account.
- Log in to the management console.
- On the Service List page, choose Compute > Cloud Phone Host.
The CPH 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 4 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 5 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. For details, see Add Routes for the VPC Peering Connection. 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 Add Routes for the VPC Peering Connection.
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.
Figure 6 Downloading ADB
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 cloud phone.
- In the Application Port area, obtain the listening IP address of the cloud phone server.
Take the information in Figure 7 as an example. The ADB command is as follows:
adb connect 172.31.248.213:4673
If you select Automatically-assigned IPv6 address when purchasing a cloud phone server, the system will allocate an IPv4 address and an IPv6 address to both the cloud phone and the server, as shown in Figure 8. The listening ports of the cloud phone IPv4 and IPv6 addresses are the same, so are the listening ports of the cloud phone server.
To use the IPv6 address to connect to the cloud phone, run the following ADB command:
adb connect [2409:8c85:80:32:cb7e:97e3:e424:1286]:4615
(Make sure you use square brackets to enclose the IPv6 address.)
- 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 links:
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot



