I have a character devices file, say /dev/X and I would like to capture every interaction which goes in and out of /dev/X.
I'm looking for a way to create some kind of MITM/Proxy to that file.
Edit:
Regarding what X is, it is FM interface over android. So /dev/fm is the character device file.
The end goal is to intercept any command that is sent to this file.