zoukankan      html  css  js  c++  java
  • 从FM开关后无声音引出的查看C文件中的LOG的办法

    近期测试部报出,FM关后再开启,有概率性的没有声音。

    我跟踪LOG到framewords/base/core/jni/android_hardware_fm.cpp

    android_hardware_fmradio_FmReceiverJNI_setControlNative

    有LOGE打印出在调用fm_set_volume(value*16);时,返回值是-1

    于是我继续跟踪,libfmradio.c (fm_set_volume -> fm_send_cmd )  -> hci_core.c(hci_send_cmd)

    发现,应该是bt_skb_alloc时没有成功返回了-1,那之间有什么异常么?

    于是我在libfmradio.c中打LOG,发现有个print_log函数,里面将LOG写到了/data/misc/fm/libfm.log

    试下来,发现没有成功,应该是没有创建文件的权限,于是,我将路径改为/data/data/com.thunderst.radio/shared_prefs/libfm.log

    OK,这样就成功将LOG写到了文件中。等待测试部重现。

  • 相关阅读:
    hero
    今年暑假不AC
    Who's in the Middle
    A Simple Problem with Integers
    I hate it
    敌兵布阵
    Ordering Tasks
    Points on Cycle
    食物链
    c++ 14.0下载地址
  • 原文地址:https://www.cnblogs.com/jimwind/p/2814792.html
Copyright © 2011-2022 走看看