Rate This Document
Findability
Accuracy
Completeness
Readability

Applying Kbox Android Patches

  1. Decompress Kbox-AOSP11.zip and upload the patchForAndroid directory in the Kbox-AOSP11 folder to the ~/dependency directory. Configure appropriate permissions on the uploaded files and directories. It is not recommended to configure the write permission for other user groups.
  2. Switch to the directory where the patches are stored.
    1
    # cd ~/dependency/patchForAndroid
    
  3. Apply the patches. The patches must be applied in sequence, which is determined based on patch file names.

    A patch file name is defined as follows:

    For example, in system-core-0001.patch, 0001 indicates that the patch is the first patch to be applied, and system-core indicates that the path to which the patch is applied is ~/aosp/system/core/. Copy the patches to the corresponding directories, and then apply the patches.

    The following is an example for applying a patch:

    1
    2
    3
    # cp system-core-0001.patch ~/aosp/system/core/
    # cd ~/aosp/system/core
    # patch -p1 < system-core-0001.patch
    

    Table 1 lists the patches and their corresponding directories. Install all the patches in the patchForAndroid directory based on the example.

    Table 1 Kbox Android patches and their applying directories

    Patch

    Directory

    system-core-0001.patch

    ~/aosp/system/core

    system-netd-0002.patch

    ~/aosp/system/netd

    system-sepolicy-0003.patch

    ~/aosp/system/sepolicy

    system-security-0004.patch

    ~/aosp/system/security

    system-bpf-0005.patch

    ~/aosp/system/bpf

    bionic-0006.patch

    ~/aosp/bionic

    device-generic-0007.patch

    ~/aosp/device/generic

    frameworks-native-0008.patch

    ~/aosp/frameworks/native

    frameworks-av-0009.patch

    ~/aosp/frameworks/av

    frameworks-base-0010.patch

    ~/aosp/frameworks/base

    external-selinux-0011.patch

    ~/aosp/external/selinux

    external-mesa-0012.patch

    ~/aosp/external/mesa

    external-libdrm-0014.patch

    ~/aosp/external/libdrm

    build-0015.patch

    ~/aosp/build

    frameworks-opt-0016.patch

    ~/aosp/frameworks/opt

    packages-apps-0017.patch

    ~/aosp/packages/apps

    system-libvintf-0019.patch

    ~/aosp/system/libvintf

    external-libva-0020.patch

    ~/aosp/external/libva

    libcore-0021.patch

    ~/aosp/libcore

    hardware-libhardware-0026.patch

    ~/aosp/hardware/libhardware

    external-llvm70-0028.patch

    ~/aosp/external/llvm70

    system-vold-0030.patch

    ~/aosp/system/vold

    system-core-sdcard-0032.patch

    ~/aosp/system/core/sdcard

    frameworks-native-0033.patch

    ~/aosp/frameworks/native

    frameworks-base-0034.patch

    ~/aosp/frameworks/base

    system-memory-0036.patch

    ~/aosp/system/memory

    frameworks-native-0037.patch

    ~/aosp/frameworks/native

    hardware-interfaces-0038.patch

    ~/aosp/hardware/interfaces