欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

安卓应用crash分析定位

程序员文章站 2022-04-15 18:44:01
...

       

安卓应用使用自己编译的库文件,出现crash log如下:

 *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
 Build fingerprint: 'samsung/zerofltectc/zerofltectc:6.0.1/MMB29K/G9209KEU2DPG1:user/release-keys'
 Revision: '10'
 ABI: 'arm64'
 pid: 24432, tid: 24432, name: .FingoService  >>> .FingoService <<<
 signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
x0   0000000000000000  x1   0000000000005f70  x2   0000000000000006  x3   0000000000000000
x4   0000000000000000  x5   0000000000000001  x6   0000000000000000  x7   0000000000000000
x8   0000000000000083  x9   0000007f84231148  x10  0000000000000001  x11  0101010101010101
x12  0000000000000028  x13  0000000000000000  x14  0000000000000001  x15  0000007f83dfd000
x16  0000007f83dfd568  x17  0000007f83d90348  x18  0000007f83e0ef50  x19  0000007f84231088
x20  0000007f84230fc8  x21  0000000000000002  x22  0000000000000006  x23  0000007fe95d8f20
x24  0000007fe95da8f0  x25  0000007fe95da5d0  x26  0000007f779f7bc8  x27  0000007f6cb42000
x28  0000007f6cb42000  x29  0000007fe95d8cf0  x30  0000007f83d8dae4
sp   0000007fe95d8cf0  pc   0000007f83d90350  pstate 0000000020000000
backtrace:
#00 pc 0000000000069350  /system/lib64/libc.so (tgkill+8)
#01 pc 0000000000066ae0  /system/lib64/libc.so (pthread_kill+68)
#02 pc 0000000000023910  /system/lib64/libc.so (raise+28)
#03 pc 000000000001e240  /system/lib64/libc.so (abort+60)
#04 pc 0000000000576580  /data/app/com.usens.fingoservice-2/lib/arm64/libFingo.so
#05 pc 0000000000548010  /data/app/com.usens.fingoservice-2/lib/arm64/libFingo.so
#06 pc 0000000000548060  /data/app/com.usens.fingoservice-2/lib/arm64/libFingo.so
#07 pc 0000000000548180  /data/app/com.usens.fingoservice-2/lib/arm64/libFingo.so
#08 pc 00000000001795a8  /data/app/com.usens.fingoservice-2/lib/arm64/libFingo.so
#09 pc 000000000017a6c8  /data/app/com.usens.fingoservice-2/lib/arm64/libFingo.so
#10 pc 0000000000171a04  /data/app/com.usens.fingoservice-2/lib/arm64/libFingo.so
#11 pc 0000000000171ba0  /data/app/com.usens.fingoservice-2/lib/arm64/libFingo.so
#12 pc 00000000001769dc  /data/app/com.usens.fingoservice-2/lib/arm64/libFingo.so
#13 pc 0000000000178914  /data/app/com.usens.fingoservice-2/lib/arm64/libFingo.so
#14 pc 0000000000071568  /data/app/com.usens.fingoservice-2/lib/arm64/libFingo.so
#15 pc 000000000008da54  /data/app/com.usens.fingoservice-2/lib/arm64/libFingo.so
#16 pc 000000000007b770  /data/app/com.usens.fingoservice-2/lib/arm64/libFingo.so
#17 pc 000000000007c8f8  /data/app/com.usens.fingoservice-2/lib/arm64/libFingo.so
#18 pc 00000000000d0578  /data/app/com.usens.fingoservice-2/lib/arm64/libFingoService.so (_ZN18FingoDeviceManager10createWithEPKc+76)
#19 pc 00000000000c6c8c  /data/app/com.usens.fingoservice-2/lib/arm64/libFingoService.so (Java_com_usens_fingoservice_FingoDeviceManager_nativeCreateWith+96)
#20 pc 00000000006d0c68  /data/app/com.usens.fingoservice-2/oat/arm64/base.odex (offset 0x37b000) (void com.usens.fingoservice.FingoDeviceManager.nativeCreateWith(java.lang.String)+156)
#21 pc 00000000006d01d8  /data/app/com.usens.fingoservice-2/oat/arm64/base.odex (offset 0x37b000) (void com.usens.fingoservice.FingoDeviceManager.create(android.content.Context, long)+2508)
#22 pc 00000000006de73c  /data/app/com.usens.fingoservice-2/oat/arm64/base.odex (offset 0x37b000) (void com.usens.fingoservice.FingoService.onCreate()+4208)
#23 pc 0000000003adb480  /system/framework/arm64/boot.oat (offset 0x2f20000)

  通过log信息,可以看到我们自己的库libFingoService.so,

这个本地函数Java_com_usens_fingoservice_FingoDeviceManager_nativeCreateWith报错。在java中是

com.usens.fingoservice.FingoDeviceManager类中nativeCreateWith方法。再可以跟到本地函数去查找错误

还可以使用objdump,addr2line,readelf,objcopy工具来分析库we文件。

相关标签: android crash