0

There's a file (stream.wav) which appears from time to time on the /sdcard and it grows large and eventually eats up all available space. I need to find out the application which opens this file and keeps it growing.

Is there any way to determine this?

PS. The Android device is rooted.

2
  • 1
    Afraid this would be hard: sdcard uses a file system which doesn't support ownership. What you could try, however, is utilizing adb shell and run the lsof command, e.g. adb shell "lsof | grep file.ext" (if that file is named file.ext). This would show which process/app is accessing it. Then grep for that owner in adb shell "ls -l /data/data | grep xxx" (replace xxx by the owner retrieved via lsof). In both cases, run the command as root.
    – Izzy
    Commented Sep 7, 2015 at 12:29
  • Great! Thanks for mentioning lsof, almost forgot about it! FS ownership is useless to me.
    – igorp1024
    Commented Sep 7, 2015 at 13:19

1 Answer 1

0

For rooted phones only, on the terminal (or after adb shell):

su 
lsof | grep -i stream.wav

The output will look like

sdcard     206   media_rw    7   ... /data/media/0/stream.wav
XXXXXXXXX  6226     u0_a94   27  ...  /storage/emulated/legacy/stream.wav

which shows XXXXXXXXX (masked) is responsible for the file.

Thanks to Izzy's comment, this is his answer, but a bit reformulated.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .