Have an app I'm trying to work into a build that needs dynamic code loading, but it can't be toggled for system apps.

Is there a way to enable this for specific app in the build? Or for all apps, but obviously just for the one would be preferably for security.

    Sebastian3000 Maybe AppCompatConfig is a good place to start to figure out how to do that?

    https://github.com/GrapheneOS/platform_packages_apps_AppCompatConfig/blob/14/generator/src/main/kotlin/ConfigGenerator.kt

    Not sure if this works for system apps, but you can see Vanadium is listed, so maybe you can fork and make your own adjustments to AppCompatConfig, or you can figure out where it's loaded by the OS and find an easier way to add your app to the list without having to go through all the trouble of maintaining your own fork.

    4 months later

    I tried to modify AppCompatConfig to allow shell dcl, and now the shell settings interface shows
    Default(Allowed)--(gray)
    Restricted--(selected)
    It seems that other places need to be modified.

    6 days later

    The code about restrictions is under frameworks/base/core/java/android/ext/settings/app/
    AppCompatConfig is just the default configuration of the program. But it will be covered by restrictions.
    For DCL, there are two fields in frameworks/base/core/res/res/values/config_ext.xml that allow dcl to be enabled. For other restrictions, you need to modify the corresponding files in frameworks/base/core/java/android/ext/settings/app/ and modify the getImmutableValue function.