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
結果这两种方法都不可行,求解。
1.添加/system/bin/logwrapper,可以用logcat查看,例如
service /system/bin/logwrapper /system/bin/rild
2.添加console,像sh一样直接输出到console
service console /system/bin/sh
console
結果这两种方法都不可行,求解。
解决方案 »
- 求android底层源代码,
- android如何开机自动导入联系人
- android如何自动获取DNS
- listView分页遇到一个诡异问题
- Android cts 一些fail 求pass方法
- 关于Android团队开发运行Activity问题(eclipse + vss)
- 怎样改变serviceState?
- android4.0.4下webview响应html慢的问题
- android调用IKAnalyzer分词器出现内存溢出情况,求大神解决
- 在logcat里发现输出了异常,我点那行红字异常,它就打开了JavaPerspective视图,并且自动跳了到个这视图,我想让它仍保持在DDMS视图100分
- 『分享』Android开发环境的建立
- MediaRecorder怎么剪切音乐文件
问题出在使用logcat时要加上-b radio。这样就可以看到打印的log信息了。
logcat *:w
可以用以上查看warning以上的log