Mounting an Android Image
The official Kbox demo image provided by Huawei Mirrors repository does not contain the Android Kbox binary. Therefore, containers cannot be normally started using this image. If you use the official Kbox demo image, download the Android Kbox binary to the local host and use the script to create an original Kbox image that can start containers properly. After mounting the original Kbox image, create a new Kbox image that integrates the NETINT encoding and decoding library if hardware decoding is required.
Image Name + Tag |
How to Obtain |
Description |
|---|---|---|
Compiled by the user |
Compiled by the user. |
Compile the image by referring to Software Compilation. This image contains the Android Kbox binary, and containers can be started properly. |
kbox:demo |
Official Kbox demo image, which can be downloaded from Huawei Mirrors repository. |
This image does not contain the Android Kbox binary, and containers cannot be started properly. |
kbox:origin |
Created using a script |
This image is created based on kbox:demo and the Android Kbox binary, and containers can be started properly. |
kbox:latest |
Created using a script |
This image is created based on kbox:origin and the encoding and decoding library to enable hardware decoding. Containers can be started properly. |
Mounting the Kbox Demo Image
Upload the Kbox demo image package to the ~/dependency directory (this directory is only an example and can be customized) and mount the image package.
The image name and tag can contain only digits and letters. The image name must start with a digit or lowercase letter.
1 2 | cd ~/dependency docker import android.tar kbox:demo |
Creating a Kbox Image and Applying Commercial Binaries
If you use the official Kbox demo image provided by Huawei Mirrors repository, perform the operations in this part to ensure that the image contains the Android Kbox binary. If you use a self-compiled image, skip this part.
- Decompress Kbox-AOSP11.zip and upload the deploy_scripts directory in the Kbox-AOSP11 folder to the ~/dependency directory on the server. Upload the Android Kbox binary file package BoostKit-kbox_*.zip to ~/dependency/deploy_scripts.
- Create a Kbox image that contains the Android Kbox binary. In the following commands, kbox:demo is the official Kbox demo image imported in the previous step, and kbox:origin is the new image that contains the Android Kbox binary.
1 2 3
cd ~/dependency/deploy_scripts chmod +x make_image.sh ./make_image.sh kbox:demo kbox:origin
(Optional) Creating a Kbox Image and Enabling Hardware Decoding
- Decompress Kbox-AOSP11.zip and upload the Kbox-AOSP11/make_img_sample directory to the ~/dependency directory on the server.
- Obtain and save NETINT.tar.gz to the ~/dependency/make_img_sample/decode_iso_build directory and grant the execute permission on the image creation script in the directory.
1 2
cd ~/dependency/make_img_sample/decode_iso_build chmod +x Dockerfile make_image.sh
- Create an image with hardware decoding enabled.Create a kbox:latest image based on the kbox:origin image. The two image names can be customized.
1./make_image.sh kbox:origin kbox:latest
The parameters entered during instance startup must be the same as the name and tag you specify when creating an image. In the following, the image name kbox:latest is used as an example.