0

I have to simulate the situation where existing android process will be killed and as a result tombstone file will be generated immediately.

I use following command sequence in order to achieve that:

adb shell monkey -p com.google.android.apps.maps -c android.intent.category.LAUNCHER 1
adb shell pgrep com.google.android.apps.maps | xargs kill -6

Unfortunately "-6" signal (and any other possible) doesn't guarantee the fact that tombstone will be generated.

Any idea on how to get tombstone generated with guarantee without modifying the application?

Thanks!

Viktor Malyi
  • 2,298
  • 2
  • 23
  • 40

2 Answers2

0

You can generaty it in onDestroy() method of your activity.

RexSplode
  • 1,475
  • 1
  • 16
  • 24
0

Mostly kill signal -6 refers to SIGIOT(Signal for Input Output Trap), for which may be tombstones are not generated.

But the tombstones were created successfully when I used signal -7 which SIGBUS kill.

kill -7 <pid> 
atla praveen
  • 49
  • 1
  • 4