title: Root privileges for an android application (Complete app. Not just few commands)
body: <h2>Question :</h2>
  
  <p>How to execute one complete app with root previleges (not just few commands)?</p>
  
  <hr>
  
  <h2>Scenario :</h2>
  
  <p>I am working on a rooted android device.</p>
  
  <p>In an android app, I need to play the H.264 stream received through <code>eth0</code>. <strong>I need root privileges to open (raw open) <code>eth0</code>.</strong></p>
  
  <p>The corresponding code is in JNI. <strong>Since there are a lot of buffers that need to be exchanged between JNI code and Java code, the executable way(<code>Process.exec(su)</code>) is very inconvenient.</strong></p>
  
  <hr>
  
  <h2>Ideal solution:</h2>
  
  <p>The JNI code is executed in the same process context as of the Java code. Therefore, granting root privileges to my android process should solve my problem. But I am not sure how to do that.</p>
  
  <hr>
  
  <h2>I tried :</h2>
  
  <ol>
  <li>Making the application as <code>system app/priv-app</code>. I thought this will give the app root access. But that did not happen.</li>
  </ol>