I have the .sh file inside the raw folder, I tried by using this code. but it always said no file found or directory.
public void onClick(View arg0) {
Log.d("hello", "dasdasd");
String uriPath = "android.resource://" + getPackageName() + "/raw/on.sh";
Uri uri = Uri.parse(uriPath);
Process p = null;
try {
p = new ProcessBuilder()
.command(uriPath)
.start();
} catch (IOException e) {
e.printStackTrace();
} finally {
if (p != null) p.destroy();
}
}
File or directory not found