Pushing a Package
- Obtain Kbox container startup dependencies base_box.sh and bin, upload them to the /home/kbox_instruction directory (this directory is used as an example and can be customized) on the server, and create a Kbox image. For details, see "Software Deployment" in the Kbox Cloud Phone Container Feature Guide.
- Upload InstructionPhoneAndroidRServer.tar.gz, and InstructionPhoneClientSmokeApk.tar.gz to the /home/kbox_instruction directory on the server.
- Obtain the script for starting an instruction stream cloud phone.
Decompress InstructionPhoneAndroidRServer.tar.gz to obtain the cfct script used to start an instruction stream instance and save it to the /home/kbox_instruction directory on the server. In addition, use the base_box.sh script obtained in 1 to start the Kbox container instance and save it to the /home/kbox_instruction directory on the server.
1 2 3
cd /home/kbox_instruction tar xf InstructionPhoneAndroidRServer.tar.gz cfct chmod +x cfct base_box.sh
- Start the instruction stream cloud phone. The following uses InstructionPhoneAndroidRServer.tar.gz as an example.
In the following commands, ${image_name:tag} indicates the name and tag of the new Kbox image. ${kbox_id} indicates the ID of the started instruction stream cloud phone instance, which can be customized.
1 2 3
cd /home/kbox_instruction ./cfct run ${image_name:tag} ${kbox_id} mesa ./cfct push InstructionPhoneAndroidRServer.tar.gz kbox_${kbox_id}
The recommended ID of an instruction stream cloud phone instance ranges from 1 to 100. If the ID is not within the range, the instruction stream cloud phone may fail to be started.
- Check whether the instruction stream cloud phone is started successfully. ${kbox_id} indicates the ID of the instance.
1 2 3
docker exec -it kbox_${kbox_id} sh getprop sys.boot_completed getprop vmi.agent.status
In the output, if the value of getprop sys.boot_completed is 1 and the value of getprop vmi.agent.status is true, the startup is successful.
- Decompress InstructionPhoneClientSmokeApk.tar.gz and install CloudGame_Smoke.apk on the Android mobile phone. Enter the server IP address and port number of the started instance (for example, 8066, where 66 is the ID of the instruction stream cloud phone instance) in top-down order to access the instruction stream cloud phone.
- The instruction stream engine client is 64-bit and must run on a 64-bit Android phone with HarmonyOS or Android 7.0 or later. If this condition is not met, the cloud phone client cannot be installed.
- Ensure that the network connection between the Android mobile phone and the server is normal.