frida-kill
frida-kill
Command-line tool for terminating processes on local or remote devices. Accepts a process name or PID as the target.
Prerequisites: frida-tools Python package (pip install frida-tools). For remote/USB targets, frida-server must be running on the target device.
Synopsis
frida-kill [options] <process>
<process> is either a process name (string) or a PID (integer). Use frida-ps to discover available processes and their PIDs.
Device Selection Options
| Flag | Description |
|---|---|
-D ID, --device ID | Connect to device with the given ID (obtain IDs via frida-ls-devices) |
-U, --usb | Connect to USB-attached device |
-R, --remote | Connect to remote frida-server (default host) |
-H HOST, --host HOST | Connect to remote frida-server on HOST |
--certificate CERT | Speak TLS with HOST, expecting CERTIFICATE |
--origin ORIGIN | Set Origin header when connecting to remote server |
--token TOKEN | Authenticate with HOST using TOKEN |
--keepalive-interval N | Keepalive interval in seconds; 0 to disable (default: -1) |
--p2p | Establish peer-to-peer connection with target |
--stun-server ADDRESS | Set STUN server ADDRESS (used with --p2p) |
--relay addr,user,pass,turn-TYPE | Add TURN relay for --p2p (repeatable) |
--device-option option | Override backend-specific option (repeatable) |
Global Options
| Flag | Description |
|---|---|
-O FILE, --options-file FILE | Text file containing additional command line options |
--version | Print Frida version and exit |
Usage Examples
1# Kill process by PID on a specific USB device
2frida-kill -D 1d07b5f6a7a72552aca8ab0e6b706f3f3958f63e 5029
3
4# Kill process by name on USB device
5frida-kill -U Safari
6
7# Kill a local process by PID
8frida-kill 1234
Typical Workflow
1# Step 1: List running applications on device to find PID
2$ frida-ps -D 1d07b5f6a7a72552aca8ab0e6b706f3f3958f63e -a
3
4 PID Name Identifier
5---- ------------------ -------------------------------------------------
64433 Camera com.apple.camera
74001 Cydia com.saurik.Cydia
84997 Filza com.tigisoftware.Filza
94130 IPA Installer com.slugrail.ipainstaller
103992 Mail com.apple.mobilemail
114888 Maps com.apple.Maps
126494 Messages com.apple.MobileSMS
135029 Safari com.apple.mobilesafari
144121 Settings com.apple.Preferences
15
16# Step 2: Kill the target process
17$ frida-kill -D 1d07b5f6a7a72552aca8ab0e6b706f3f3958f63e 5029
18
19# Step 3: Confirm the process is gone
20$ frida-ps -D 1d07b5f6a7a72552aca8ab0e6b706f3f3958f63e -a
21
22 PID Name Identifier
23---- ------------------ -------------------------------------------------
244433 Camera com.apple.camera
254001 Cydia com.saurik.Cydia
264997 Filza com.tigisoftware.Filza
274130 IPA Installer com.slugrail.ipainstaller
283992 Mail com.apple.mobilemail
294888 Maps com.apple.Maps
306494 Messages com.apple.MobileSMS
314121 Settings com.apple.Preferences
32# Safari (PID 5029) is no longer listed
Notes
- On exit,
frida-killproduces no output on success; errors are printed to stderr. - Killing an iOS/Android application via
frida-killis equivalent to force-quitting it from the OS. - Device IDs for
-Dare obtained fromfrida-ls-devices. - To kill a process by name, pass the exact process name string (e.g.,
Safari, notcom.apple.mobilesafari).