chame1eon / jnitrace

A Frida based tool that traces usage of the JNI API in Android apps.
MIT License
1.58k stars 257 forks source link

Cannot trace any function calls #25

Open timleg002 opened 3 years ago

timleg002 commented 3 years ago
C:\Users\cooluser>jnitrace -m attach -l * com.coolpackage.app
Tracing. Press any key to quit...

I am debugging an app which uses JNI to do most of its work. When I use jnitrace, there is no function calls I can see. I can do anything in the app, any movement, but it just keeps being stuck. No function calls. What would be the problem? Thanks!

chame1eon commented 3 years ago

Hi, thanks for letting me know. Any chance you can let me know the application you are testing, version of Android you are running, and the device you are using? That should allow me to debug it better. Thanks

chame1eon commented 3 years ago

Closing as not had a response in over a month.

timleg002 commented 3 years ago

Hey! Sorry, I haven't had any notifications for this so I forgot about this. I'm debugging the Egg NS app, the latest version, and I'm using Android version 11.

chame1eon commented 3 years ago

Thanks. Will take a look.

chame1eon commented 3 years ago

Unfortunately, I do not have a device that supports running that app for me to test. Have you run any other Frida scripts against it? I am just trying to figure out if it is a Frida issue more generally or specific to jnitrace.

timleg002 commented 3 years ago

Unfortunately, I do not have a device that supports running that app for me to test. Have you run any other Frida scripts against it? I am just trying to figure out if it is a Frida issue more generally or specific to jnitrace.

Tracing functions with a wildcard runs for a long time, because it wants to trace all functions in Android, by that jI mean not only functions specific to an app, so that's why I decided to use jnitrace.

chame1eon commented 3 years ago

Sorry I did not mean, "just use Frida trace". I was trying to work out whether the problem was a jnitrace issue with that app or if there was some kind of issue with Frida hooking that app. I assume from your last message you have been able to run frida-trace against that application? In which case the issue must be with jnitrace and so I will build a debug version of jnitrace for you to test with

timleg002 commented 3 years ago

It hooks well for one function, but hooking "all" functions takes a long time for frida trace. I think that's the problem with my usage of jnitrace as well.

chame1eon commented 1 year ago

Have any of the optimisations with newer versions of Frida helped with this?