sensepost / objection

📱 objection - runtime mobile exploration
GNU General Public License v3.0
7.33k stars 840 forks source link

[bug] Android frida.TransportError: timeout was reached #464

Closed iamnasef closed 1 month ago

iamnasef commented 3 years ago

Describe the bug Objection returns error everytime I try to connect. although frida works perfectly and returns all apps when I type frida-ps -Uai

To Reproduce Steps to reproduce the behavior:

  1. Run frida-ps -Uai to get package name
  2. Run objection -d -g com.test explore

Expected behavior An objection terminal where I can write commands

Evidence / Logs / Screenshots

[debug] Agent path is: /usr/local/lib/python3.8/dist-packages/objection/agent.js
[debug] Injecting agent...
Using USB device `Redmi Note 7`
[debug] Attempting to attach to process: `com.test`
[debug] Process attached!
Traceback (most recent call last):
  File "/usr/local/bin/objection", line 8, in <module>
    sys.exit(cli())
  File "/usr/lib/python3/dist-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3/dist-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python3/dist-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3/dist-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/objection/console/cli.py", line 114, in explore
    agent.inject()
  File "/usr/local/lib/python3.8/dist-packages/objection/utils/agent.py", line 203, in inject
    self.script = session.create_script(source=self._get_agent_source())
  File "/usr/local/lib/python3.8/dist-packages/frida/core.py", line 26, in wrapper
    return f(*args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/frida/core.py", line 204, in create_script
    return Script(self._impl.create_script(*args, **kwargs))
frida.TransportError: timeout was reached

Environment (please complete the following information):

Application I've tried multiple applications all with the same result

iamnasef commented 3 years ago

I tried to run the same command with the application in the foreground and background and still the same result.

lf- commented 3 years ago

I don't know what's going on here, but I can tell you that you're not alone: I'm also having this.

lf- commented 3 years ago

~ comment removed bc I put the wrong architecture. same symptom but without these logcats ~~

kanadeblisst commented 3 years ago

I don't know what's going on here, but I can tell you that you're not alone: I'm also having this. It's strange that it's normal to use it on windows, and Frida (14.2.18) in windows and Kali is the same as the version of object (1.11.0)

IPMegladon commented 1 month ago

Stale issue, feel free to reopen. Could perhaps have been because frida-server was not running, frida-ps might still work without it but you won't be able to attach to or spawn applications.