title: Temporary disable or modify SELinux on Android
body: <p>I'm the developer on a <strong>root</strong>-app for Android.</p>
  <p>Sadly now on some devices/ROMs there is <strong>SELinux</strong> in <em>enforce</em>-mode and prevents some actions of my app.</p>
  <p>Because this is a root-app, the users are granting me root-access!</p>
  <p>Now, SELinux is blocking some of my actions and I need to find a solution for this.</p>
  <p>I tried to temporary disable SELinux by</p>
  <pre><code>setenforce permissive -&gt; no failure, but getenforce still returns &quot;Enforcing&quot;
  echo 0 &gt; /sys/fs/selinux/enforce -&gt; no failure, but getenforce still returns &quot;Enforcing&quot;
  </code></pre>
  <p>I play with the idea to edit the <strong>sepolicy</strong>-file at runtime to allow the blocked commands and trigger a reload of it, but I'm neither sure if &amp; how this could work, nor isn't it a good idea.</p>
  <p>Who has some more tips or resources for me?</p>