Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Device.spawn() times out, despite successfully launching app #178

Open
une-petite-laitue opened this issue Mar 26, 2021 · 3 comments
Open

Comments

@une-petite-laitue
Copy link

une-petite-laitue commented Mar 26, 2021

Hi there,

I'm using Frida 14.2.14 against an A13 device running iOS 14.3, which is jailbroken using unc0ver 6.1.1.

I would expect the following code to spawn a new instance of <app>.

import frida, time

device = frida.get_usb_device()
device.kill("app") # Make sure no instances of "app" are running

time.sleep(3) # give the device a moment to collect its thoughts

device.spawn("com.app")

Doing this does spawn a new instance of <app> on my device in a resumed state, however the script containing this code hangs, before giving the following error:

frida.TimedOutError: unexpectedly timed out while waiting for app to launch

It appears that the script isn't able to acknowledge that <app> has launched - either Frida server is not sending a notification, or the Device object isn't receiving it.

@une-petite-laitue
Copy link
Author

Still bugging, but a (slightly shaky) workaround for anyone experiencing the same:

import frida
device = frida.get_usb_device()
device.kill("App")
try:
    device.spawn("com.app")
except frida.TimedOutError:
    pass
device.attach("App")

@j4k0xb
Copy link

j4k0xb commented Apr 23, 2021

Killing/Spawning through frida took forever or didn't do anything, but this workaround worked instantly & every time for me:

import frida
import subprocess

app = 'com.app.name'
subprocess.run(['adb', 'shell', f'am force-stop {app} && monkey -p {app} 1'])

device = frida.get_usb_device()
session = device.attach(app)

@neomafo88
Copy link

bump

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants