1

I have an application on ICS (4.0.3) that uses logcat with -vtime option. It reads the logcat using this code:

try {
  Process process = Runtime.getRuntime().exec("logcat -vtime -d");
  BufferedReader bufferedReader = new BufferedReader(
  new InputStreamReader(process.getInputStream()));
  String line = "";

  while ((line = bufferedReader.readLine()) != null) {
      ... my stuff with this line...
} 
catch (IOException e) {
}

I use "android.permission.READ_CALL_LOG" and "android.permission.READ_LOGS" in my manifest file and I manage to have the full logcat.

When I use this code with JellyBean (4.1.1), my buffer only catch my app logcat and not the full device logcat.

How can I have this full logcat? Is it another permission?

Marco Leogrande
  • 8,050
  • 4
  • 30
  • 48
Vidango
  • 11
  • 2

1 Answers1

0

JellyBean (4.1.1) does not grant 3rd party applications to access a full system logcat. Application can only see own logging rows. I think you don't need to give READ_LOGS permission in AndroidManifest.xml anymore(any app can logcat own lines).

https://groups.google.com/forum/?fromgroups=#!topic/android-developers/6U4A5irWang

If you still want to read a full logcat you need to rooted device and give superuser access to your application.

Whome
  • 10,181
  • 6
  • 53
  • 65