Я решил ее чтения данных из InputStream и записи его в файл
try {
Process p = Runtime.getRuntime().exec("atrace -t 5 gfx");
p.waitFor();
BufferedReader reader = new BufferedReader(new InputStreamReader(p.getInputStream()));
String line = reader.readLine();
File myFile = new File("/storage/sdcard0/trac.txt");
FileOutputStream f = null;
try {
f = new FileOutputStream(myFile);
} catch (FileNotFoundException e) {
e.printStackTrace();
}
PrintWriter pw = new PrintWriter(f);
while (line != null) {
pw.println(line);
//Toast.makeText(getBaseContext(), line, Toast.LENGTH_LONG).show();
line = reader.readLine();
}
pw.flush();
pw.close();
f.close();
} catch (IOException e) {
e.printStackTrace();
} catch (InterruptedException e) {
e.printStackTrace();
}
ли сохранить вам это? –
Имеет ли ваше приложение разрешение на открытие файла на внешнем хранилище? (Http://developer.android.com/training/basics/data-storage/files.html) – fadden