当前位置:编程学习 > wap >>

Android源码不能用logcat查看RILD中的LOG信息的问题

Android源码,编译之后在开发板中运行,我修改了hardware\ril\rild.c的代码,在main函数中加了LOGD函数打印log,但是使用adb shell logcat查看不到我所打印的信息。google查找原因说是默认情况下, init 执行的程序输出的信息和错误到 /dev/null。如是按照其中的解决方法做了:
1.添加/system/bin/logwrapper,可以用logcat查看,例如
service /system/bin/logwrapper /system/bin/rild
2.添加console,像sh一样直接输出到console
service console /system/bin/sh
    console
結果这两种方法都不可行,求解。 --------------------编程问答-------------------- 自己解决了。

总结下:
问题出在使用logcat时要加上-b radio。

这样就可以看到打印的log信息了。 --------------------编程问答-------------------- 学习,framework层的我也是只能看到LOGE的,还不知道怎么解决呢,试试你的方法。 --------------------编程问答-------------------- 好像只能输出RILJ的log,framewrok中的不行。 --------------------编程问答-------------------- 查看warning以上的log
logcat *:w
可以用以上查看warning以上的log --------------------编程问答-------------------- 应该不行吧,我用的是adb logcat -b radio,但还是看不到 atchannel.c rild.c reference-ril.c 中的任何打印,能否详细指点下?谢谢 --------------------编程问答--------------------
引用 5 楼  的回复:
应该不行吧,我用的是adb logcat -b radio,但还是看不到 atchannel.c rild.c reference-ril.c 中的任何打印,能否详细指点下?谢谢

这两个能不能在logcat中看到呢?-b radio的意思应该是打印radio用户登录的进程的log --------------------编程问答-------------------- atchannel.c rild.c reference-ril.c这两个文件的log看不到啊
补充:移动开发 ,  Android
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,