Can we run a .sh file as root from an APK
<p>I need to run an .sh file that starts a process in background as root from an APK, but couldn't do it. Even when I use su it gives the APP level permissions. Here is my .sh fule contents</p>

<pre><code>#!/system/bin/sh
su
/data/local/server port&amp;
</code></pre>

<p>I used the following to run the sh but I couldn't get root permissions. </p>

<pre><code>    try
     {
         Runtime rt = Runtime.getRuntime();
         Process proc = rt.exec("su");  

         proc = rt.exec("sh /sdcard/server.sh");             

     }catch(Exception e) {
         e.printStackTrace();
     }
</code></pre>

<p>I did some research but couldn't find any useful information and I would really appreciate any help.</p>

<p>Thanks.</p>
