The scripts crash, when the Frida server is not running on the target device. The script should quit gracefully and handle the exception.
Here's the traceback:
Traceback (most recent call last):
File "log_keys.py", line 32, in
process = frida.get_usb_device().attach(package_name)
File "/home/t0thkr1s/.local/lib/python3.8/site-packages/frida/core.py", line 26, in wrapper
return f(*args, *kwargs)
File "/home/t0thkr1s/.local/lib/python3.8/site-packages/frida/core.py", line 156, in attach
return Session(self._impl.attach(self._pid_of(target)))
File "/home/t0thkr1s/.local/lib/python3.8/site-packages/frida/core.py", line 180, in _pid_of
return self.get_process(target).pid
File "/home/t0thkr1s/.local/lib/python3.8/site-packages/frida/core.py", line 26, in wrapper
return f(args, **kwargs)
File "/home/t0thkr1s/.local/lib/python3.8/site-packages/frida/core.py", line 106, in get_process
matching = [process for process in self._impl.enumerate_processes() if fnmatch.fnmatchcase(process.name.lower(), process_name_lc)]
frida.ServerNotRunningError: unable to connect to remote frida-server: closed
The scripts crash, when the Frida server is not running on the target device. The script should quit gracefully and handle the exception.
Here's the traceback: