I am New to Android Programming, i need to creat an Android application to Run Shell Script on button Click Event. i am using below command but no action is happening.
Process p;
try {
p = new ProcessBuilder()
.command("/data/test.sh")
.start();
} catch (IOException e) {
e.printStackTrace();
} finally {
if(p!=null) p.destroy();
}
- I have created "data" folder and kept my shell script there.
- Having phone root permission.
Thanks in advance. :)