- 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
Show all
Copied.
Simulating Location Information
Function
The simulated positioning information of CPH includes GPS data, base station information, and Wi-Fi Basic Service Set Identifier (BSSID). CPH also provides the geocoding and reverse geocoding.
How to Use
- Injection of GPS data and base station information
Use the adb shell of the cloud phone, and run the echo "(parameters" > /data/gps/fifo command. Parameters are separated by colons.
echo "longitude=113.370592:latitude=23.123642:cell_type=GSM:mcc=460:mnc=2:lac=37107:cid=263496967" > /data/gps/fifo
- Continuous GPS data injection (Non-blocking injection is recommended.)
Use self-developed or third-party SDK application code to continuously inject GPS data in O_NONBLOCK (non-blocking) mode.
Example:
#define GPSFifoName "/data/gps/fifo" if((fifo_fd = open(GPSFifoName, O_WRONLY | O_NONBLOCK)) < 0) { ALOGE("open fifo "%s" (write) fail, error = %s\n", GPSFifoName, strerror(errno)); return; } //Note: Use colons (:) to separate cmd parameters. char* cmd = "longitude=113.370592:latitude=23.123642:cell_type=GSM:mcc=460:mnc=2:lac= 37107:cid=263496967"; len = strlen(cmd); if(write(fifo_fd, cmd, len) != len) { ALOGE("%s: write "%s" to "%s" fail: %s", FUNCTION, cmd, GPSFifoName, strerror(errno)); }
- Wi-Fi BSSID simulation
Set com.cph.wifi.bssid attribute to simulate which Wi-Fi a cloud phone is connected to.
Example:
setprop com.cph.wifi.bssid 02:00:00:00:00:00
Constraints
- Parameters related to GPS data and base station information
Table 1 GPS data Parameter
Description
Mandatory
Default Value
Constraints
latitude
Specifies the latitude.
The north latitude is positive and the south latitude is negative.
Yes
22.657501
Value range: –90.000000 to 90.000000
Unit: Degree (°)
longitude
Specifies the longitude
The east longitude is positive and the west longitude is negative.
Yes
114.055939
Value range: –180.000000 to 180.000000
Unit: Degree (°)
altitude
Specifies the altitude.
No
51.0
Unit: Meter
speed
Specifies the speed.
No
0.0
Unit: Meter
bearing
Specifies the azimuth.
0° indicates due north, 90° indicates due east, 180° indicates due south, and 270° indicates due west.
No
30.0
Value range: 0.0 to 360.0
Unit: Degree (°)
accuracy
Specifies the positioning accuracy.
No
90.0
Unit: Meter
Table 2 Base station information Parameter
Description
Mandatory
Constraints
cell_type
Specifies the base station type.
Yes
The type can GSM, CDMA, WCDMA, and LTE.
mcc
Specifies the country code.
No
Example: 460
mnc
Specifies the mobile network code of a base station.
No
For Code-division multiple access (CDMA), only system id is available. mnc is used for injection.
lac
Specifies the area code of a base station.
Yes
For CDMA, only network id is available. lac is used for injection.
For Long Term Evolution (LTE), only tac is available. lac is used for injection.
cid
Specifies the base station ID.
Yes
For CDMA, only base station id is available. cid is used for injection.
For LTE, only ci is available. cid is used for injection.
- All characters are English characters.
- The World Geodetic System 1984 (WGS84) is used for GPS data.
- Both LocationManager GPS_PROVIDER and NETWORK_PROVIDER use the longitude and latitude information of the GPS.
- Geocoder that supports geocoding and reverse geocoding is supported only in the Chinese Mainland, Hong Kong, and Macao.
- The setting takes effect immediately.
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