При выполнении терминальной команды виснет на логгировании вывода
Вот код
static Process process;
static DataOutputStream ost;
static BufferedReader ist;
...
static void copy(String src, String dst) throws IOException {
if(process == null) {
process = Runtime.getRuntime().exec("su");
ost = new DataOutputStream( process.getOutputStream());
ist = new BufferedReader(new InputStreamReader(process.getInputStream()));
}
ost.writeChars("cp -rf " +src+" "+dst + "\n");
ost.flush();
Log.d(TAG, "copy out: " + ist.readLine()); //тут виснет
}