0

Describe the bug

Timeout occurred on objection explore

To Reproduce Steps to reproduce the behavior:

Run command objection --gadget "com.apple.AppStore" explore

Evidence / Logs / Screenshots

Using USB device `iPhone`
Traceback (most recent call last):
  File "/usr/local/bin/objection", line 8, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/objection/console/cli.py", line 114, in explore
    agent.inject()
  File "/usr/local/lib/python3.9/site-packages/objection/utils/agent.py", line 202, in inject
    session = self.get_session()
  File "/usr/local/lib/python3.9/site-packages/objection/utils/agent.py", line 169, in get_session
    self.session = self.device.attach(self.spawned_pid)
  File "/usr/local/lib/python3.9/site-packages/frida/core.py", line 76, in wrapper
    return f(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/frida/core.py", line 800, in attach
    return Session(self._impl.attach(self._pid_of(target), **kwargs))  # type: ignore
frida.TimedOutError: unexpectedly timed out while initializing suspended process

Environment (please complete the following information):

  1. Device: iPhone 7
  2. OS: 15.3.1
  3. Frida Version: 16.0.2
  4. Objection Version: 1.11.0
Sha
  • 921
  • 17
  • 46
  • Your phone is jailbroken? – Robert Nov 05 '22 at 14:32
  • yes, it is. Tried `frida-ps -U` and works. – Sha Nov 05 '22 at 15:13
  • AFAIR `frida-ps -U` also works on non-jailbroken phones as it used the debugger from the DeveloperDiskImage. At the beginning better try not to start `com.apple.AppStore` instead try to attach to it when it is running, that should work. – Robert Nov 05 '22 at 17:02
  • @Robert What do you mean when you say "attach to it when it is running"? Could you please elaborate it? – Sha Nov 05 '22 at 17:40
  • You can start an app if it is not running using Frida or you can attach to an existing process. These are the two options Frida has. The latter is usually the easier task on iOS. – Robert Nov 05 '22 at 20:23
  • I got similar error when I run it `objection -g pid explore` like: `type: ignore frida.TransportError: timeout was reached` – Sha Nov 05 '22 at 20:51
  • @Robert it worked on non Apple-silicon MacOS. Thank you very much. – Sha Nov 06 '22 at 08:58

1 Answers1

2

Thanks to @Robert solved with pid choice. There are two important things here:

  1. Don't use Apple-Slicon(m1/m2) MacOS
  2. Use process-id instead of process-name. objection -g pid explore
Sha
  • 921
  • 17
  • 46
  • using process id instead of process-name fixed my frida issue (Failed to spawn: unexpectedly timed out while waiting for app to launch ). – bojan Dec 23 '22 at 17:10