Step by step process to overcome selinux denial

  android, selinux

I am running an apk well on the emulator. When I run the apk on a real device, it works well. However, in some instances and for a strange reason on the real device, it throws the following error;

avc: denied { read } for name="u:object_r:vendor_default_prop:s0" dev="tmpfs" ino=10037 scontext=u:r:untrusted_app:s0……

I have done some research and from the various solutions, I can tell that the exception is caused by scontext=u:r:untrusted_app as indicated in the error above. Most of solutions offered have not been fruitful with some just leaving it at "use audit2allow" with no clear explanation of a step by step of how to use the proposed audit2allow.

Any solutions are invited

Source: Android Questions