Help Center/
Cloud Phone Host/
Best Practices/
Best Practices of Connecting to General-Purpose Cloud Phones/
Deploying Applications on General-purpose Cloud Phones/
Generating the TAR Package of the Application and Pushing It to the OBS Bucket
Updated on 2023-08-25 GMT+08:00
Generating the TAR Package of the Application and Pushing It to the OBS Bucket
Prerequisites
- The required application has been installed on the cloud phone.
- The OBS bucket policies have been configured based on Delegating CPH to Operate OBS Buckets.
Example API
POST https://{CPH Endpoint}/v1/{project_id}/cloud-phone/phones/batch-storage Header: Content-Type: application/json X-Auth-Token: ${token} Body: { "storage_infos": [{ "phone_id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "include_files": [ "/data/app/${package_name}-1", "/data/app/${package_name}-2", "/data/data/${package_name}", "/data/media/0/Android/data/${package_name}" ], "bucket_name": "${bucket_name}", "object_path": "apk/${package_name}_${version_name}.tar" }] }
Parameter descriptions:
- Obtain the values of parameters such as CPH Endpoint, project_id, ${token}, bucket_name, and object_path by referring to Installing Applications on a Cloud Phone.
- phone_id indicates the ID of the cloud phone on which the application is installed.
- The four elements of include_files are four fixed paths.
- If the installation package is a .xapk package, add /data/media/obb/${package_name} to include_files.
- object_path indicates the path to which the .tar package is uploaded.
apk is any existing folder. In ${package_name}_${version_name}.tar, package_name and version_name need to be modified as required.
- package_name and version_name indicate the package name and version number of the current application.
Parent topic: Deploying Applications on General-purpose Cloud Phones
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.
The system is busy. Please try again later.
For any further questions, feel free to contact us through the chatbot.
Chatbot