Git Product home page Git Product logo

Comments (5)

chame1eon avatar chame1eon commented on July 18, 2024

Hi,

Thank you. I'm glad you like the tool.

So I think the issue is that you need to combine the commands you are trying. If you are connecting to a remote device you need the following:

jnitrace -l * -R : Gadget

If the device is local you should just need this:

jnitrace -l * Gadget

Let me know if that helps.

Thanks

from jnitrace.

euzada avatar euzada commented on July 18, 2024

Thank you for your answer.

I forgot to mention that I am using termux on the actual device to trace jni. I don't know if termux needs different command.

Unfortunately, it didn't work. Both solutions failed.

For the first idea, here is the error:

~/.../shared/Download $ jnitrace -l libnex* Gadget
Traceback (most recent call last):
File "/data/data/com.termux/files/usr/bin/jnitrace", line 33, in
sys.exit(load_entry_point('jnitrace==3.2.2', 'console_scripts', 'jnitrace')())
File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/jnitrace/jnitrace.py", line 576, in main
device = frida.get_usb_device(3)
File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/frida/init.py", line 82, in get_usb_device
return get_device_matching(lambda d: d.type == 'usb', timeout, **kwargs)
File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/frida/init.py", line 90, in get_device_matching
return get_device_manager().get_device_matching(predicate, timeout, **kwargs)
File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/frida/core.py", line 26, in wrapper
return f(*args, **kwargs)
File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/frida/core.py", line 58, in get_device_matching
return Device(self._impl.get_device_matching(lambda d: predicate(Device(d)), raw_timeout))
frida.InvalidArgumentError: device not found

For the second, the error is slightly different:

~/.../shared/Download $ jnitrace -l libnex* -R : Gadget
Traceback (most recent call last):
File "/data/data/com.termux/files/usr/bin/jnitrace", line 33, in
sys.exit(load_entry_point('jnitrace==3.2.2', 'console_scripts', 'jnitrace')())
File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/jnitrace/jnitrace.py", line 584, in main
pid = device.get_process(args.target).pid
File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/frida/core.py", line 26, in wrapper
return f(*args, **kwargs)
File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/frida/core.py", line 106, in get_process
matching = [process for process in self._impl.enumerate_processes() if fnmatch.fnmatchcase(process.name.lower(), process_name_lc)]
frida.InvalidArgumentError: if a ':' character is given, it must be followed by a port (in hostname ':').

from jnitrace.

chame1eon avatar chame1eon commented on July 18, 2024

Okay, can you try this:

jnitrace -l libnex* -R 127.0.0.1:27042 re.frida.Gadget

from jnitrace.

WanghongLin avatar WanghongLin commented on July 18, 2024

What I have done is making frida to read a customized configuration and listen in all interfaces

{
  "interaction": {
    "type": "listen",
    "address": "0.0.0.0",
    "port": 27042,
    "on_port_conflict": "fail",
    "on_load": "wait"
  }
}

Run the app with frida gadget integrated, and wait.

Then invoke the following command to use jni trace from PC in the same LAN

jnitrace -l libname.so -R 10.0.0.3:27042 Gadget -m attach

from jnitrace.

chame1eon avatar chame1eon commented on July 18, 2024

Are you having the same issues for this one on newer Frida versions?

from jnitrace.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.