1

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:

  1. Require root privileges to be able to kill the 3rd party app
  2. 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?

sourav.bh
  • 467
  • 1
  • 7
  • 20
Ploppe
  • 451
  • 1
  • 4
  • 12
  • see `Process#killProcess` – pskink Sep 13 '18 at 10:22
  • The killProcess() call is actually restricted to my app current PID. To override that restriction, root is required. – Ploppe Sep 13 '18 at 13:43
  • run it from the app that has the same UID then (`android:sharedUserId`) – pskink Sep 13 '18 at 13:45
  • That seemed promising, but it turns out it's restricted to [apps signed with the same certificate](https://stackoverflow.com/questions/9783765/what-is-shareduserid-in-android-and-how-is-it-used#comment12454655_9783966) which is not my case :/ – Ploppe Sep 13 '18 at 15:12

0 Answers0