Android. issue with logcat with shell and from app -
if adb shell:
logcat -d -v time incall:i *:s
but in android app:
public static stringbuilder getlog() { stringbuilder builder = new stringbuilder(); try { string[] command = new string[] { "logcat", "-d", "-v", "time", "incall:i *:s" }; process process = runtime.getruntime().exec(command); bufferedreader bufferedreader = new bufferedreader( new inputstreamreader(process.getinputstream())); string line; while ((line = bufferedreader.readline()) != null) { //if (line.contains(processid)) { builder.append(line); //code here log.e(tag, line); //} } } catch (ioexception ex) { log.e(tag, "getlog failed", ex); } return builder; }
i only:
--------- beginning of system --------- beginning of main
why? hot logs adb shell?
Comments
Post a Comment