开发者社区> 问答> 正文

android ne怎么分析

android ne怎么分析

展开
收起
云计算小粉 2018-05-10 20:00:53 3092 0
1 条回答
写回答
取消 提交回答
  • 阿里云ping https://ping.gaomeluo.com/aliyun/

    1:使用mtk 工具解析aee_exp,找到发生NE 进程信息如:

    pid: 5832, tid: 5840, name: AudioOut_15 >>> /system/bin/audioserver <<<

    2:确定版本信息,需要aee_exp 与outtargetproductA31symbols 编译生成的是同一次的

    3:使用gat 工具 Backtrace decode 解析异常堆栈

    backtrace 文件选择aee_exp 中 __exp_main.txt symbols 选择上边sysmbols目录

    会生成__exp_main.txt .decode.txt 解析的文件与函数及行信息。

    4:根据__exp_main.txt .decode.txt判断调用关系是否正确,有可能 symbols 与aee_exp 代码不是同一次编译的。

    5:使用Trace32 simulator 加载 NE 的lib

    trace32 下载 http://www.lauterbach.com/frames.html?manual.html

    6:打开coredump
    M、N相同
    M版本 ENG load 默认开启

    M版本Userdebug load:
    adb shell aee -d coreon

    adb shell aee -d directon

    adb reboot

    使用user 版本,烧录userdebug 版本boot img root ,这个时候如果出现unknow coreon 或 unknow directon ,需要将/system/build.prop 下ro.build.type=user 改为userdebug 在reboot 手机,再运行adb shell aee -d coreon adb shell aee -d directon

    等手机重启后再执行以下命令

    adb shell setprop persist.libc.debug.malloc 15

    adb shell setprop persist.libc.debug15.prog /system/bin/surfaceflinger

    adb shell setprop persist.debug15.config 0x4a003024

    adb reboot

    1. 手机再次重启后,开始复现问题。

    M版本 USER load:
    1)open alps/bionic/linker/debugger.cpp, and modify code in debuggerd_init
    LIBC_HIDDEN void debuggerd_init() {
    struct sigaction action;
    memset(&action, 0, sizeof(action));
    sigemptyset(&action.sa_mask);
    action.sa_sigaction = debuggerd_signal_handler;
    action.sa_flags = SA_RESTART | SA_SIGINFO;

    if 0

    // Use the alternate signal stack if available so we can catch stack overflows.
    action.sa_flags |= SA_ONSTACK;

    sigaction(SIGABRT, &action, nullptr);
    sigaction(SIGBUS, &action, nullptr);
    sigaction(SIGFPE, &action, nullptr);
    sigaction(SIGILL, &action, nullptr);
    sigaction(SIGPIPE, &action, nullptr);
    sigaction(SIGSEGV, &action, nullptr);

    if defined(SIGSTKFLT)

    sigaction(SIGSTKFLT, &action, nullptr);

    endif

    sigaction(SIGTRAP, &action, nullptr);

    endif

    }
    2)rebuild load
    3)need enable root permission first
    adb shell setprop persist.aee.core.dump enable
    adb shell setprop persist.aee.core.direct enable
    adb reboot

    memory map (2293 entries):
    --->Fault address falls at 00000020 before any mapped regions

    2019-07-17 22:11:45
    赞同 1 展开评论 打赏
问答分类:
问答标签:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
58同城Android客户端Walle框架演进与实践之路 立即下载
Android组件化实现 立即下载
蚂蚁聚宝Android秒级编译——Freeline 立即下载