Tried to make custom domain for an app that is installed from PlayStore. I created a module that would patch the policy at boot and edited system/etc/selinux/plat_seapp_contexts to assign the app my new domain.
type battery_app appdomain allow battery_app sysfs * *
I also added this line of code to plat_seapp_contexts:
user=_app seinfo=platform name=com.someapp domain=battery_app type=app_data_file levelFrom=all
After running ps -eZ | grep com.someapp the app is still running in untrusted_app domain. I don't know what i did wrong.