Thread: The bug issue!
View Single Post
Old November 7th, 2012, 02:48 AM   #3 (permalink)
Join Date: Apr 2012
Location: London
Posts: 102
Device(s): ZTE Skate, Ainol Novo7 Aurora
Carrier: Not Provided

Thanks: 2
Thanked 24 Times in 23 Posts

If you don't already know which files are open (or you want to trackdown a leak) and you have access to a rooted device with busybox, you can run the "lsof" (list open file descriptors) command from "adb shell" or a terminal emulator application (you need to run it as root).

This command will list all the files which the sdcard process has open:
lsof | grep ^sdcard
And this command will count the number of file descriptors the sdcard process has open:
lsof | grep ^sdcard -c
On my Nexus 7 (with a few apps running in the background) the sdcard process only has 23 open files.
GeorgeN is offline  
Reply With Quote