Help Center/ Cloud Phone Host/ Best Practices/ Best Practices of Connecting to General-Purpose Cloud Phones/ Deploying Applications on General-purpose Cloud Phones/ Generating a TAR Package for an Application and Pushing It to an OBS Bucket
Updated on 2026-08-27 GMT+08:00
Generating a TAR Package for an Application and Pushing It to an 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}-*",
"/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 three elements in include_files must be set to the absolute paths on the cloud phone.
- If the installation package is an .xapk package, add /data/media/obb/${package_name} to include_files.
- object_path indicates the path to which the .tar package is uploaded in the OBS bucket.
- In object_path, apk indicates an existing folder in the OBS bucket, ${package_name} indicates the package name of the current application, and ${version_name} indicates the version of the current application. The version number can be customized.
- Some shared applications download resource files online when they are started. You can start such applications before generating TAR packages to make them download resource files and patches. This way, shared applications do not need to download the files and patches again when they are installed and started on cloud phones.
Parent topic: Deploying Applications on General-purpose Cloud Phones
What is your overall rating for this page?
0
1
2
3
4
5
6
7
8
9
10
Very dissatisfiedVery satisfied
Thank 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