Applying the Binaries
- Decompress the binary file package BoostKit-kbox_*.zip to obtain the Kbox-*-aosp11.0-binary.zip package. Upload the product_prebuilt and products directories in the package to the ~/dependency directory.
Configure appropriate permissions on the uploaded files and directories. It is not recommended to configure the write permission for other users in the owner group and other owner groups.
- Copy the binary files to the root directory of the AOSP source code. The decoded binary file libstagefrighthw.so of product_prebuilt conflicts with the native Android decoded information. Therefore, you need to delete the native directory device/generic/goldfish-opengl/system/codecs and comment out related compile code.
1 2 3 4 5
cd ~/dependency cp -rf product_prebuilt ~/aosp/ rm -rf ~/aosp/device/generic/goldfish-opengl/system/codecs sed -i 's/include $(GOLDFISH_OPENGL_PATH)\/system\/codecs\/omx/#include $(GOLDFISH_OPENGL_PATH)\/system\/codecs\/omx/g' \ ~/aosp/device/generic/goldfish-opengl/Android.mk
- Create a vendor/kbox directory in the AOSP source code directory. Then copy the products directory to vendor/kbox.
1 2 3 4
mkdir -p ~/aosp/vendor/kbox chmod -R 700 ~/aosp/vendor/kbox cd ~/dependency cp -rf products ~/aosp/vendor/kbox
- In the ~/aosp/vendor/kbox/products directory, change the DNS address.
1cd ~/aosp/vendor/kbox/products
- Open the kbox.mk file.
1vim kbox.mk - Press i to enter the insert mode and modify the three lines highlighted in a red box in the following figure.

The three lines are used to configure the DNS address, gateway address, and subnet mask of the container. Ensure that the configured addresses are available and perform the configuration following the file format. Otherwise, the compiled image may be unavailable. The format is as follows:
net.dns1=xx.xx.xx.xx \ net.address=xx.xx.xx.xx \ net.netmask=xx.xx.xx.xx \
- The space and backslash (\) after the addresses cannot be omitted.
- The example is for reference only. Configure the available public DNS address, gateway address, and subnet mask based on the actual condition to ensure that the container is connected to the network.
- You can also modify the DNS address, gateway address, and subnet mask in the /system/vendor/build.prop file of the Kbox container. The configuration takes effect after the container is restarted.
- If you have any questions about the configuration, contact Huawei O&M engineers.
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open the kbox.mk file.
Parent topic: Compiling the AOSP Source Code and Creating an Image