I execute Logcat from a service in my app.
commandLine = "logcat -v time -b main"
process = Runtime.getRuntime().exec(commandLine);
When it runs on any AVD, it catches all log messages from any process running in the system.
When I run it in a real device (ASUS TF201) by copying the apk and installing the app in the normal way, it only catches log messages from my own applicaton.
The app runs fine, no crashes, all activities work fine, even the activity that starts and stops the logcat. The only difference between a run in AVD and a run in the device is the missing messages. I know there are missing messages because I run aLogCat besides my app and aLogCat does catch all messages.
What am I missing?
This should always have been the intended behavior and is rightly fixed in Jelly Bean. Every application should only be able to access logcat information relevant to its own process.
In your case, you need to run the command as root to access logcat messages not belonging to your application.
-- References --
SO Question
Discussion
Android issue
aLogCat User comments
Hope this satisfies your curiosity.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With