I'm currently working on a cool Android game which was about to be released real soon. Some of our beta testers started complaining that the game crashes with the
Do you really have 1024 files open (in which case I think you probably have a few architectural problems of your own)? Or are you forgetting to close your file handles and leaking them?
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:
Code:
lsof | grep ^sdcard
And this command will count the number of file descriptors the sdcard process has open:
Code:
lsof | grep ^sdcard -c
On my Nexus 7 (with a few apps running in the background) the sdcard process only has 23 open files.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.