I'm writing a root app following Chainfire's documentation, but I found I've to run some command in another SELinux context.
Using that context on my device (OnePlus One with CM12 nightly), I've no problem, but when I try to run it on another device (HTC One) the command fails. If I temporarily disable SELinux (
setenforce 0), the command runs without problems.
The analysis I made revealed that some file on the HTC One has a different SELinux domain than the OnePlus One. I used
ls -Z and
id -Z to figure out where the problem was and I verified the output of
supolicy --dumpav, too.
Is it possible to find the SELinux policies definitions of the flagship devices from all the major OEMs?
It could be sufficient a
supolicy --dumpav output of each device.