On linux, I use lsof to verify that the file is opened by which process. I have an Android device but no lsof command. Can I find which process to open a particular file?
I will use it to verify that MediaPlayer contains fd, but it should be closed.
Install busybox, it has lsof command.
Lsof poor man must fulfill
ls -l /proc/[process id]/fd
However, you need to be root.
Thanks to Mike Jones and Jock for advice with the poor man. I used it in the following busybox (synology nas) section to list the fd directories grouped by each process:
for p in [0-9]*; do ls -l /proc/$p/fd ;done