Rate This Document
Findability
Accuracy
Completeness
Readability

Installing the Kernel Module

Each time the server is restarted, reload the ashmem_linux.ko and aosp_binder_linux.ko modules based on the following steps.

  1. After the new kernel is started, run the following commands to install the ashmem and binder modules.
    The num_devices parameter is required for installing aosp_binder_linux.ko. num_devices indicates the number of binder device nodes to be registered, which must exceed three times the number of containers to be started. For example, if 100 containers need to be started, the value must be greater than 300.
    1
    2
    3
    # cd /lib/modules/5.15.98/kernel/lib/
    # sudo insmod aosp_binder_linux.ko num_devices=400
    # sudo insmod ashmem_linux.ko
    
  2. Check whether the installation is successful.
    1
    # lsmod | grep -E "ashmem|binder"
    

    If the following information is displayed, the installation is successful:

    ashmem_linux           24576  0
    aosp_binder_linux    212992  0
  3. Assign permissions.
    1
    2
    3
    4
    # sudo chmod 600 /dev/aosp_binder*
    # sudo chmod 600 /dev/ashmem
    # sudo chmod 600 /dev/dri/*
    # sudo chmod 600 /dev/input
    
  4. Check whether the permission modifications have taken effect.
    1
    # ls -alh /dev/aosp_binder0 /dev/aosp_binder399 /dev/ashmem
    

    If the following information is displayed, the configuration takes effect:

    crw------- 1 root root 501,   0 Mar 22 11:18 /dev/aosp_binder0
    crw------- 1 root root 501, 399 Mar 22 11:18 /dev/aosp_binder399
    crw------- 1 root root  10, 123 Mar 22 03:49 /dev/ashmem