+ protected void runAsRoot(String command) throws java.io.IOException,java.lang.InterruptedException {
+ Process rootcmd = Runtime.getRuntime().exec(new String[]{"su","-c","sh"});
+ DataOutputStream sh = new DataOutputStream(rootcmd.getOutputStream());
+ sh.writeBytes(command + "\n");
+ sh.writeBytes("exit\n");
+ sh.flush();
+ sh.close();
+
+ rootcmd.waitFor();
+ }
+