第一步:
git clone代码,下载安装NDK和CMAKE,在此期间碰到一个问题,就是NDK下载版本太高,导致项目编译不过去,进一步分析,发现ndk-bundle\toolchains文件夹中少了mips64el-linux-android-4.9和mipsel-linux-android-4.9文件,解决方法是下载一个旧的NDK版本,把这两个文件夹复制过去即可。
第二步:
接着就run,在手机上跑起来了,点击CRASH,程序崩溃,我进去sdcard中看到了crashDump目录,生成崩溃文件。
第三步:
接着运行: ./tools/mac/minidump_stackwalk crashDump/***.dmp >crashLog.txt ,结果又报错了,由于我的系统是Windows,不是Mac,故需要重新编译minidump_stackwalk 工具,解决方法是下载个VMWare虚拟机,装个Unbuntu 系统,然后重新编译,在编译过程中,由于git clone了breakpad源码,会缺少一个thrid_party里的一个less文件夹,名称为linux_syscall_support.h头文件,需要补上即可。
第四步:
利用./configure && make
对源码完成了编译,minidump_stackwalk这个文件在src/processor/目录中,然后运行:
./minidump_stackwalk crashDump/***.dmp >crashLog.txt
大功告成:
Operating system: Android
0.0.0 Linux 3.18.22+ #1 SMP PREEMPT Mon Jun 11 17:42:41 CST 2018 armv8l
CPU: arm
ARMv1 ARM part(0x4100d0b0) features: half,thumb,fastmult,vfpv2,edsp,neon,vfpv3,tls,vfpv4,idiva,idivt
10 CPUs
GPU: UNKNOWN
Crash reason: SIGSEGV /SEGV_MAPERR
Crash address: 0x0
Process uptime: not available
Thread 0 (crashed)
0 libcrash-lib.so + 0x77e
r0 = 0x00000000 r1 = 0x00000001 r2 = 0xffdb9bdc r3 = 0xf4a57fc0
r4 = 0x702af968 r5 = 0x6fb3bc10 r6 = 0x12e21970 r7 = 0xffdb9bc8
r8 = 0x12de5330 r9 = 0xf4a76a00 r10 = 0x12dd28b0 r12 = 0xf36a6fd8
fp = 0x70536430 sp = 0xffdb9bb4 lr = 0xf36a379b pc = 0xf36a377e
Found by: given as instruction pointer in context
1 dalvik-main space (deleted) + 0x5fffe
sp = 0xffdb9bcc pc = 0x12c60000
Found by: stack scanning
2 base.odex + 0x44121f
sp = 0xffdb9bd0 pc = 0xdf254221
Found by: stack scanning
3 dalvik-LinearAlloc (deleted) + 0xf016
sp = 0xffdb9bd4 pc = 0xeea9a018
Found by: stack scanning
4 dalvik-main space (deleted) + 0xd539e
sp = 0xffdb9be0 pc = 0x12cd53a0
Found by: stack scanning
展开