- What's New
- Service Overview
- Billing
- Getting Started
-
User Guide
- Buying a Cloud Phone Server
- Accessing the Cloud Phone
- Cloud Phone Management
- Cloud Phone Server Management
-
Using AOSP
- Overview
- Automatic Application Authorization
- Loading Pictures
- Rooting
- Startup Script
- Automatic Installation of Applications
- Hiding Virtual Keys
- Hiding the Status Bar
- Disabling the Notification System
- Disabling Screenshot Protection
- Simulating Location Information
- App Installation Whitelist
- App Installation Blacklist
- Forcibly Installing a 32-Bit Application
- Dynamically Changing the System Language
- Background Process Management
- Texture Compression
- Restarting a Cloud Phone
- Device Emulation
- Cloud Phone Audio and Video
- Configuring a Route
- Permission Management
- Adjusting Resource Quotas
- Monitoring
- CTS
- Appendix
-
Best Practices
- Best Practices of Connecting to General-Purpose Cloud Phones
-
Best Practices of Cloud Phone Application Sharing
- Overview of Application Sharing
-
Usage Guide to Application Sharing
- Purchasing a Cloud Phone Server That Supports Application Sharing
- Preparing the TAR Package of an Application
- Pushing the TAR Package of an Application to a Cloud Phone Server
- Using the appctrl Command to Manage Shared Applications
- Deleting an Application
- Presetting Configuration Files by Sharing Applications
- appctrl Commands
- Installing an Application on Cloud Phones in Batches
- Modifying the Cloud Phone GPS Location
- Using the Cloud Phone Camera
- Using STF to Manage Cloud Phones in Batches
- Allowing a Cloud Phone Server to Access a Public Network Outside the Chinese Mainland
- Delegating CPH to Operate OBS Buckets
- Changing the AOSP Version of a Cloud Phone
- Change History
-
API Reference
- Before You Start
- API Overview
- Calling APIs
- Getting Started
-
Cloud Phone Server APIs
-
Cloud Phone Servers
- Querying cloud phone servers
- Querying the Details of a Cloud Phone Server
- Querying Flavors of Cloud Phone Servers
- Purchasing a Cloud Phone Server
- Restarting Cloud Phone Servers
- Changing the Cloud Phone Server for a Cloud Phone
- Pushing Shared Storage Files
- Querying Shared Storage Files
- Deleting Shared Storage Files
- Pushing Shared Applications
- Deleting a Shared Application
- Changing the Flavor of a Cloud Phone Server
- Modifying the Name of a Cloud Phone Server
- Bandwidth
-
Cloud Phones
- Querying Cloud Phones
- Querying Cloud Phone Details
- Obtaining the Cloud Phone Access Information
- Querying Cloud Phone Flavors
- Querying the Image of a Cloud Phone
- Resetting Cloud Phones
- Restarting Cloud Phones
- Stopping Cloud Phones
- Editing the Name of a Cloud Phone
- Updating Properties of Cloud Phones
- Exporting Data from Cloud Phones
- Restoring Data of Cloud Phones
- Diverting Cloud Phone Traffic
- Expanding the Data Disk of a Cloud Phone
- Tasks
- Keys
- Encoding Services
- ADB Commands
- Tags
- Images
-
Cloud Phone Servers
- Permissions Policies and Supported Actions
- Common Parameters
- Appendix
-
FAQs
-
Consulting
- What Are the Advantages of Huawei Cloud Phone Compared with Other Similar Solutions?
- Does Cloud Phone Support iOS?
- Are There Cloud Phone Root Permissions?
- Does Each Cloud Phone Has an Independent Public IP Address?
- How Is CPH Billed?
- How Do I Obtain the Project ID?
- How Do I Install Applications on a Cloud Phone?
- How Long Does It Take to Activate a Server After I Purchase It?
- What Should I Do If I Can't Find My Cloud Phone Server on the CPH Console?
- How Long Will Resources Be Released After My Cloud Phone Server Expires?
- What Can I Do If the Private Key File Is Lost?
- How Can I Know Whether the SSH Service Has Been Installed on My Local Device?
- What Are Common ADB Commands?
- Does the Cloud Phone Support Cameras?
- Does the Cloud Phone Support Facial Recognition?
- What Are the Security Group Authorization Rules for Cloud Phones Using Custom Networks?
-
SSH Tunnel Faults
- What Can I Do If the SSH Tunnel Fails to Be Established When I Access the Cloud Phone over the Public Network?
- What Does Message "Authorized users only. All activities may be monitored and reported." Indicate?
- What Can I Do If Message "too open" Is Displayed When I Am Establishing the SSH Tunnel?
- What Can I Do If Message "Permission denied" Is Displayed When I Am Establishing the SSH Tunnel?
- What Can I Do If Message "no match mac found" Is Displayed When I Am Establishing the SSH Tunnel?
- What Can I Do If Message "no matching key exchange method found" Is Displayed When I Am Establishing the SSH Tunnel?
- How Do I Keep an SSH Session Uninterrupted?
- What Can I Do If I Failed to Establish an SSH Tunnel?
- What Can I Do If an Error Occurs When I Invoke the Cloud Phone Query API?
- ADB Connection Faults
-
Consulting
- General Reference
Copied.
Installing an Application on Cloud Phones in Batches
After you install an application on a cloud phone, you can share and install the application on other cloud phones by calling an API.
The cloud phone that has the application installed is regarded as a seed cloud phone.
Restrictions and Limitations
- This solution applies only to cloud phones whose specifications name does not contain qemu.
Figure 1 Specifications
- The seed cloud phone must be a cloud phone that has not been operated on. Otherwise, reset it.
Procedure
- Log in to the management console and choose Storage > Object Storage Service. Create an OBS bucket and configure policies for accessing the bucket. For details, see Managing Cloud Phones in Batches.
To successfully upload files to the bucket, select Directory read and write when configuring the bucket policy.
Figure 2 Create Bucket Policy - Connect to the seed cloud phone in ADB mode and install the required application on it.
For details, see How Do I Install Applications on a Cloud Phone?
- Call an API to export data of the seed cloud phone, pack the data, and upload the data package to the OBS bucket created in 1.
curl command
curl -i -k -X POST "https://${CPH Endpoint}/v1/${projectId}/cloud-phone/phones/batch-storage" -H "Content-Type: application/json" -H "X-Auth-Token: $token" -d ' { "storage_infos": [ { "phone_id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "include_files": [ "/data/app/${package-name}-1", "/data/data/${package-name}", "/data/media/0/Android/data/${package-name}" ], "bucket_name": "${bucket_name}", "object_path": "${your_dir}/${package-name}.tar" } ] }'
Parameter descriptions:
- phone_id: ID of the seed cloud phone
- bucket_name: name of the OBS bucket for storing the data exported
- object_path: OBS path for storing the data exported
CAUTION:
If you want to pack all data of applications on the seed cloud phone, the following three paths must be included:
- /data/app/${package-name}-1
${package-name} may not be followed by -1. Configure this parameter as required.
- /data/data/${package-name}
- /data/media/0/Android/data/${package-name}
Example
curl -i -k -X POST "https://${CPH Endpoint}/v1/${projectId}/cloud-phone/phones/batch-storage" -H "Content-Type: application/json" -H "X-Auth-Token: $token" -d ' { "storage_infos": [ { "phone_id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "include_files": [ "/data/app/com.taptap-1", "/data/data/com.taptap", "/data/media/0/Android/data/com.taptap" ], "bucket_name": "your-bucket-name", "object_path": "your/dir/taptap.tar" } ] }'
- View the OBS bucket created in 1 and check whether the file packed and uploaded in 3 is successfully uploaded. If yes, go to the next step.
- Differentiate storage 1.0 and storage 2.0 servers in this step.
- Servers of storage 2.0 (recommended)
Call an API to push files stored in the OBS bucket to the server.
Example of the curl command
curl -i -k -X POST "https://${CPH Endpoint}/v1/${projectId}/cloud-phone/phones/share-apps" -H "Content-Type: application/json" -H "X-Auth-Token: $token" -d ' { "package_name": "com.miniteck.miniworld", "bucket_name": "your-bucket-name", "object_path": "your/dir/miniworld.tar", "server_ids": ["1678567b8bab40f93711234cb8","1234567b8bab40ffb711234cb"] }'
Parameter descriptions:
- bucket_name and object_path are the same as those in 3.
- server_ids: IDs of servers that receive the file pushed. If multiple server IDs are specified, the application can be installed on cloud phones on multiple servers.
- Servers of storage 1.0
Call an API to push files stored in the OBS bucket to the shared storage directory of the server.
Example of the curl command
curl -i -k -X POST "https://${CPH Endpoint}/v1/${projectId}/cloud-phone/phones/share-files" -H "Content-Type: application/json" -H "X-Auth-Token: $token" -d ' { "bucket_name": "your-bucket-name", "object_path": "your/dir/taptap.tar", "server_ids": ["1678567b8bab40f93711234cb8","1234567b8bab40ffb711234cb"] }'
Parameter descriptions:
- bucket_name and object_path are the same as those in 3.
- server_ids: IDs of servers that receive the file pushed. If multiple server IDs are specified, the application can be installed on cloud phones on multiple servers.
- Servers of storage 2.0 (recommended)
- Differentiate storage 1.0 and storage 2.0 servers in this step.
- Servers of storage 2.0 (recommended)
Run the appctrl install package_name command on the cloud phone to install the application. package_name corresponds to the value of package_name in 5, for example, com.miniteck.miniworld.
- Servers of storage 1.0
- Servers of storage 2.0 (recommended)
Execution Results
For servers that use storage 1.0, the applications have been installed after the cloud phones are reset.
For servers that use storage 2.0, the applications can be directly started by running appctrl start package_name package.activity_name.
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