androidprocesspidfrida

Frida server keeps respawning


I have a frida server running on my phone. I want to stop it and start a different one.

Running ps -A | grep frida gives me the PID to kill.

root         19124  1064  132952  48396 poll_schedule_timeout 7b141fd0c8 S frida-server
root         19359     1   15560   2420 poll_schedule_timeout f25206e0 S frida-helper-32

I run the kill command kill -9 19124. It does kill the process, how ever the issue is that new one spawns.

root         23450  1064  149372  48344 poll_schedule_timeout 73400400c8 S frida-server
root         23466     1   15580   2256 poll_schedule_timeout f3aad6e0 S frida-helper-32

How can I stop the current frida server from running? I even deleted the frida-server from /data/local/tmp and restarted the phone, and the issue still persists.


Solution

  • As you have deleted the frida-server binary I don't think that the re-appearing frida instance has something to with that installation.

    Assuming that your phone is running Android and you have rooted it using Magisk you may also have installed the Magisk-Frida module which provides a frida-server instance that is started automatically after device boot.

    Using the command ps -Af | grep frida you may see the process busybox sh /data/adb/modules/magisk-frida/service.sh. If this process is visible then the Frida server that is restarted after you kill it comes from this script. Disable or uninstall the Magisk module to finally stop frida-server.