There is someone else's application. I patch it, take a native library out of it, and through NativeActivity I load it in my application, so that someone else’s application starts up "in the context of mine" and I can change something. There is no source code, except that decompiled non-working. Of course, it crashes, because in my NativeActivity and in general in my assembly there are no classes and methods that exist in the original and which is accessed by the library via JNI. And with each version of the library, they are more and more.
My task is to smoothly, from the old versions to the new ones, to make it so that in the end everything that was necessary and the application at least does not fly off at launch.
First, noNSuchMethod from JNI was detected in LogCat. There was a full StackTrace, with a full path to the method, so that every exception was not difficult to fix, simply sticking "stub".
But once again, instead of StackTrace, I see this:
Exception thrown (Ljava/lang/NoSuchMethodError;) while throwing internal exception (Ljava/lang/NoSuchMethodError;) Exception thrown (Ljava/lang/NoSuchMethodError;) while throwing internal exception (Ljava/lang/NoSuchMethodError;) Exception thrown (Ljava/lang/NoSuchMethodError;) while throwing internal exception (Ljava/lang/NoSuchMethodError;) JNI ERROR (app bug): attempt to use stale local reference 0x1 VM aborting What would it mean (why there is no StackTrace, why now stale writes because it worked in the old versions)? And how to still capture detailed information?
Is there any debugger in the manner of a "global sniffer" of all the exceptions that occur in the system or a specific application?