0

作为标题,我可以得到 orhter log ex。Runtime.getRuntime().exec("logcat -d|); 试试 {

            Log.e("test", "1");
            Process proc = Runtime.getRuntime().exec(
                    "logcat -b radio -v time -s GSM");
            Log.e("test", "2");
            BufferedReader reader = new BufferedReader(
                    new InputStreamReader(proc.getInputStream()));
            Log.e("test", "3");
            String line;
            ArrayList list = new ArrayList();

            if (reader.readLine() != null) {

                for (int i = 0; i < 50; i++) {

                    line = reader.readLine();
                    list.add(line);
                }
            }
            Log.e("test", "4");
            for (int i = 0; i < list.size(); i++) {
                Log.e("a123456", list.get(i).toString());
            }
        } catch (Exception t) {
            Log.e("test", "5");
            Log.e("test", t.getMessage());
        }test log 1 2 3can be print . but can't get any Exception log.I think it must be block

为什么?ps:我用的是索尼手机果冻豆eng

4

1 回答 1

2

我也有同样的问题。根据我的研究,这很可能是由于 Jellybean 不再允许任何 3rd 方应用程序查看 logcat 日志,除了它自己的日志,如此此处所述。

于 2013-11-27T18:11:35.780 回答