Apologies for a beginner-esque question, but I am reverse engineering an Android application, that is most probably using the libusbhost.so
library to interface with USB devices via Java Native Interface.
How would I go about doing so?
Reverse Engineering Stack Exchange is a question and answer site for researchers and developers who explore the principles of a system through analysis of its structure, function, and operation. It only takes a minute to sign up.
Sign up to join this communityIt is a bit unclear what do you mean by "library being called". If you want to know when the library is loaded, you may look for references to System.loadLibrary(string)
or System.load(string)
java functions. You might for example hook it using Frida.
If you want to see when particular functions exported by the libusbhost.so
are called, you also may use Frida. There is prebuild tool called frida-trace. For example using frida-trace -U -i “Java_*” [package_name]
, will print out all the calls to JNI native functions from your app, along with their timestamp.
If you want to alter the parameters of the called functions, modify the way they work, or replace their return values - you may find the Frida Interceptor module useful.
Failed to start tracing: script is destroyed Server terminated
I think it's probably due to me repackaging the app, and then using it. It probably has some problems with that, because it destroys the process immediately (from logcat, what I've seen)
Dec 14, 2020 at 21:41