frida-core icon indicating copy to clipboard operation
frida-core copied to clipboard

`device.resume` is not working on iOS

Open ChiChou opened this issue 1 year ago • 2 comments

I got a lot of issues regarding weird crashes. After a while I finally realized the root cause. When an app is spawned by frida, it never gets resumed, causing SpringBoard to kill it (a.k.a. 0x8badf00d).

Reproduce:

const frida = require('frida')

async function main() {
    const dev = await frida.getUsbDevice();
    const pid = await dev.spawn('com.google.chrome.ios');
    await dev.resume(pid);
}

main()

Or

import frida


dev = frida.get_usb_device()
pid = dev.spawn('com.google.chrome.ios')

import time
time.sleep(1)

dev.resume(pid)

However frida-tools -f works perfectly on iOS.

I checked the source and it's no different than the python test case above, which makes no sense.

ChiChou avatar Apr 05 '23 08:04 ChiChou

I realized that I need to attach the target to make it really resume...

ChiChou avatar Apr 06 '23 19:04 ChiChou

Thanks for reporting! It is not a requirement to attach() before resume(). So we should figure out what's causing this.

oleavr avatar Apr 06 '23 21:04 oleavr