The logcat process is launched, I don't get any error or force close. It simply seems to not generate any output.
String commandLine = "logcat -v time -b main *:V";
String line;
try {
process = Runtime.getRuntime().exec(commandLine);
bufferedReader = new BufferedReader(new InputStreamReader(process.getInputStream()));
while(!mStop && (line = bufferedReader.readLine()) != null && newMessages.size() < maxMessages) {
// It does not reach this point
// Debugger shows
// mStop == false
// newMessages.size == 0
// maxMessages == 5000
// line == null
The suspicion is that logcat exits wihtout printing anything out. I tried this in a command line and it does output logcat messages.
I replaced logcat
with ls
and then bufferedReader does fill line
.
The inspection of bufferedReader
shows member in
(InputStreamReader) which itself has a memeber endOfInput
which is false before the readLine() and becomes true right after it.
LAST NEWS: I opened the Terminal Emulator within the emulator itself, and run it:
$ logcat -v time -b main *:V
Unable to open log device '/dev/log/main': Permission denied
$