Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
Help Center/ Cloud Phone Host/ Best Practices/ Using the Cloud Phone Camera

Using the Cloud Phone Camera

Updated on 2023-12-25 GMT+08:00

Step 1: Replace the Image of a Cloud Phone

  1. View AOSP 7 Cloud Phone Image Change History, select an image released on or after October 9, 2020, and copy the image ID.
  2. Log in to the management console, switch to the region where your resources are deployed, and choose Compute > Cloud Phone Host.

  3. Choose Servers to view servers.

  1. Click the name of a server to go to the server details page, select a cloud phone, and click Restart.

  2. Select the Update Phone Image checkbox and enter the image ID selected in 1.

  1. Click OK.

Step 2: Upload a Picture to the Cloud Phone

Upload a picture to the /data/local/tmp/ directory of the cloud phone in either of the following ways. The following uses pic.jpeg in the /path/to/local directory as an example.

  • Method 1: Run the adb push command to push the picture.

    Connect to the cloud phone through ADB, and run the following commands:

    adb push </path/to/local/pic.jpeg> /data/local/tmp/pic.jpeg

    adb shell chmod 644 /data/local/tmp/pic.jpeg

  • Method 2: Call the CPH API to push the picture.

    See Pushing Files.

NOTICE:
  • The size of the picture to be uploaded must be 480 (width) x 640 (height). If the size is not 480 x 640, the picture may be zoomed in or out on the camera.
  • Only JPEG and PNG pictures stored in the /data/local/tmp/ path are supported.
  • Picture permissions must be at least 644 (rw-r--r--).

Step 3: Configure Cloud Phone Attributes

You can configure cloud phone attributes in either of the following ways:

Method 1: Use ADB to connect to the cloud phone and run the adb command.

adb shell setprop com.cph.cam_local_pic_path /data/local/tmp/pic.jpeg

If you use this method, the cloud phone attributes become invalid after the cloud phone is restarted.

Method 2: Call the CPH API to configure attributes.

Set com.cph.cam_local_pic_path to /data/local/tmp/pic.jpeg for the cloud phone. For details, see Updating Cloud Phone Attributes. The attributes will always be valid even after the cloud phone is restarted.

Step 4: Test the Camera

Install an application that needs to use the camera, open the application, and check whether the picture you uploaded is displayed in the viewfinder.

NOTE:

CPH supports only the rear camera.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback