I'm trying to create an app that uses the Runtime.getRuntime().exec() method to use the command-line in order to run some commands on an android phone. First, I need to get root access so I am doing:
Runtime rt = Runtime.getRuntime();
String cmdString = "su";
System.out.println(cmdString);
Process pr = rt.exec(cmdString);
When I do this, my app asks the user to be granted root access. when the user accepts, it says the app has been granted root access but then the app completely freezes. When I try to run other commands like ls, they work fine.