I have a very special use case: I depend on a closed-source SDK library which works with a 3rd party Android app.
Everything works well up to a point the 3rd party service becomes totally unresponsive: my app cannot get any data anymore, the official 3rd party app neither. The only way I could find to restore the proper execution is to kill the 3rd party service (Android settings → App → 3rd party app → Force stop).
I have therefore two solutions now:
- Require root privileges to be able to kill the 3rd party app
- Find a way to programatically crash the 3rd party service
I have tried to play with introspection and reflection to set some private fields to null in hope to trigger a NPE, but without luck. Is there any generic way I could crash a library? Maybe some kind of code injection via reflection?