Closed baltpeter closed 11 months ago
So, there's two things to tackle in this issue:
ensureFrida()
to recover from suck a stuck frida
process automatically.I agree. I also think that running frida-ps -U
on the hist is not enough to determine frida is running correctly. Rather we should also check on the device if there is a frida process running. I also ran into this bug with a stuck frida process on Android during manual testing.
In the analysis for https://github.com/tweaselORG/meta/issues/16 (source: https://github.com/tweaselORG/experiments/tree/main/cert-pinning-bypass), I get the following error maybe every couple hundred runs:
The phone (physical device, Android 13, Lineage OS) actually crashes and reboots, so I'm assuming that the broadcast isn't actually what causes the problem but rather only the first call that fails afterwards because the phone hasn't finished rebooting yet. I'm pretty sure that it always fails at this point, though.
Restarting the analysis after the phone has finished rebooting doesn't work. It hangs forever and never gets into the
for (const app of apps)
loop.The problem is in
ensureFrida()
.adb shell /data/local/tmp/frida-server --version
works and returns the correct version. However,frida-ps -U
just hangs indefinitely. Runningps
on the phone, I can see that there is afrida
process running still:If I
kill -9
that, everything works again.