Managing Cloud Phones in Batches
By calling the ADB command API to push or install the Android package (APK) installation file stored in an Object Storage Service (OBS) bucket to cloud phones, you can efficiently manage cloud phones in batches. This section describes how to install APKs on cloud phones to manage cloud phones in batches.
You can install and update the APK in either of the following ways:
- Run the install command through the API. For details, see Installing the APK.
- Create an agency to delegate CPH to operate OBS buckets. For details, see Delegating CPH to Operate OBS Buckets. Then, push files to install and hot update the APK. For details, see Pushing Files.
To delegate CPH to access OBS through an agency, the CPH and OBS resources must be under the same account.
Constraints and Limitations
CPH has the following restrictions on batch management risk and security:
- The following control commands are supported:
shell: Enable the remote interactive shell on the cloud phone.
install: Install the software package on the cloud phone.
uninstall: Remove the software package from the cloud phone.
push: Copy a file or folder from the local device to the cloud phone.
- Improper control commands and instructions will cause the cloud phone to malfunction and cannot be recovered.
- To run the install or push command, strictly follow the instructions in Procedure and build an APK data bucket inclusively used for batch cloud phone management to isolate the data from other data.
- To run the install or push command, the file must be in .tar format. The files in the compressed package should include all the files required by AOSP.
- On the same cloud phone server, the time consumed by file push is directly proportional to the number of files pushed.
Procedure
The following steps describe how to create a bucket for storing files. You can install and update APK only by invoking APIs.
- Log in to the OBS console.
- In the upper right corner, click Create Bucket.
Figure 1 Creating a bucket for batch management of cloud phones
- Region: Select the region where the cloud phone server is located. The specified region cannot be changed after the bucket is created.
- Default Storage Class: Select Standard.
- Bucket Policy: Select Private.
For details about other parameters, see Creating a Bucket.
- Click Create Now.
Wait until the bucket is successfully created.
- Click the name of the created bucket, choose Objects in the navigation pane on the left, and click Create Folder.
Figure 2 Objects
- Create a folder named file_{project_id}_01 and store files in this folder. As shown in Figure 3.
{project_id} indicates the project ID in the region where the cloud phone server is located. For details about how to obtain the project ID, see How Do I Obtain the Project ID?
- If there are a large number of cloud phones, you can create multiple folders, for example, file_{project_id}_01 and file_{project_id}_02, to improve the management efficiency.
- Name the folder with a timestamp or function to ease package management, for example, file_{project_id}_01/20190506122012/xxxx.tar.
- If you have hundreds of thousands of cloud phones, develop the application market based on OBS to install and upgrade the APK.
- Place the .tar package to be installed in the file_{project_id}_01 folder. Call ADB command APIs to test a cloud phone and check whether the delegation is successful.
The following ADB command APIs are supported:
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
