Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

App crashes on startup on all arm64 devices after update to Marshmallow. How do I debug using just a pc offset?

Tags:

android

arm64

My app is crashing for all Android Marshmallow arm64 devices on startup. Users were previously using the app on Lollipop on the same device, but then started reporting these crashes after their devices were updated to Marshmallow. 32-bit devices are not affected. The crash reports all look like this:

ABI: 'arm64'
pid: 3531, tid: 3531, name: ompany.myapp  >>> com.mycompany.myapp <<<
signal 4 (SIGILL), code 1 (ILL_ILLOPC), fault addr 0x7f796d9370
    x0   0000000013087000  x1   0000007f8815da00  x2   0000000000000002  x3   0000000000000004
    x4   b42e90dfe44ab496  x5   b42e90dfe44ab496  x6   0000000000000000  x7   00000000019b7af0
    x8   0000000013087000  x9   0000007f87713000  x10  0000000000000601  x11  000000001308700c
    x12  0000000000002000  x13  0000000000002000  x14  000000006fb18428  x15  00000000013cd010
    x16  0000000000000000  x17  0000000000002000  x18  0000005594f27e90  x19  0000000000000003
    x20  0000000013087000  x21  0000007f75e00098  x22  00000000130d6e20  x23  0000000000000601
    x24  0000000000000000  x25  0000000000000001  x26  0000000000000000  x27  0000000000000000
    x28  0000000000000000  x29  00000000130d6e20  x30  0000007f796d9350
    sp   0000007ff8a7bc60  pc   0000007f796d9370  pstate 0000000080000000

backtrace:
    #00 pc 0000000000929370  /data/app/com.mycompany.myapp-1/oat/arm64/base.odex (offset 0x486000)
    #01 pc 000000000092934c  /data/app/com.mycompany.myapp-1/oat/arm64/base.odex (offset 0x486000)

The offset 0x486000 is consistent across all reports.

Can I use this offset to debug the crash? Some more info about the app:

  • There is no native code (it's all Java)
  • If I unzip the apk, the directory looks like this (there is no lib directory)

    [res], [assets], [META-INF], classes.dex, resources.arsc, AndroidManifest.xml

  • I've read about the abi filtering tricks that some people are using the exclude arm64 libs from their builds,forcing the system to load the 32bit libs, but I have no native code and no libs directory.

My guess is that there's something I can do with that offset, but I'm not sure where to start.

like image 890
user2720435 Avatar asked Nov 08 '22 15:11

user2720435


1 Answers

My app was crashing in arm64 devices (Nexus 9). I tried this answer and it helped me. Now its running on all devices i have tested so far.

like image 111
Vikash Kumar Verma Avatar answered Nov 14 '22 21:11

Vikash Kumar Verma