# Customize

Source: [https://docs.qualcomm.com/doc/80-70014-11/topic/customize.html](https://docs.qualcomm.com/doc/80-70014-11/topic/customize.html)

To enhance the TA memory, you need to customize the memory, and build and customize
        the SEPolicy.

## Memory customization

If you have full access to the proprietary software shipped with Qualcomm Linux, you
                can customize the memory. If you have access, see [Qualcomm Linux Security Guide - Addendum → Memory
                    customization](https://docs.qualcomm.com/bundle/resource/topics/80-70014-11A/memory-optimization.html).

## SEPolicy customization

Qualcomm SEPolicy is dependent on the upstream SEPolicy. Therefore, the upstream
                SEPolicy’s make system is used for building and customizing the SEPolicy.

Any customization to upstream code must be stored in the [patches](https://github.com/quic-yocto/meta-qcom-hwe/tree/kirkstone/dynamic-layers/selinux/recipes-security/sepolicy/patches) folder as a path to the upstream
                code. You can find the upstream code at [https://github.com/SELinuxProject/refpolicy/](https://github.com/SELinuxProject/refpolicy/)

The Qualcomm code is configured to the monolithic SEPolicy mode (a single SEPolicy
                image).

To compile the SEPolicy, run the following commands:

    export SHELL=/bin/bash
    MACHINE=qcm6490 DISTRO=qcom-wayland source setup-environment
    bitbake refpolicy-mls.Copy to clipboard

You can also modify and build incrementally.

The audit2allow and research tools on Ubuntu 18 or 20 do not support policy version
                33. The policy version33 is supported from Ubuntu 23. If you are not using Ubuntu
                23, you can use a docker setup or a virtual machine to run audit2allow.

The following command is used to install docker on Ubuntu 23.04. If the command
                prompt does not change when `policy.33` is pulled from the
                    target /build, and if denials.txt is a
                file capturing the denials, use the following
                command:

    audit2allow -i denails.txt -p policy.33Copy to clipboard

If this command is not found, then use the following command to install the required
                package:

    sudo apt install policycoreutils-python-utilsCopy to clipboard

Last Published: Aug 06, 2024

[Previous Topic
Install or upgrade QCS5430 SoftSKU feature packs](https://docs.qualcomm.com/bundle/publicresource/80-70014-11/topics/upgrade-qualcomm-wes-feature-pack.md) [Next Topic
Debug](https://docs.qualcomm.com/bundle/publicresource/80-70014-11/topics/debug.md)