Is it possible to read the output of the terminal command adb #bugreport
from within the application?
I tried the following but I couldn't manage to get any output.
Process process = Runtime.getRuntime().exec("bugreport");
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(
process.getInputStream()));
// Test result
Log.d(TAG, "Line: "+bufferedReader.readLine());
I know it works with exec("logcat")
, but I prefer the output of bugreport
as it contains more information.